/usr/libexec/gnome-remote-desktop-daemon:11:setChannelError:rdpgfx_server_thread_func:thread_launcher:start_thread:clone3

Bug #1970994 reported by errors.ubuntu.com bug bridge
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
freerdp2 (Ubuntu)
Fix Released
Medium
Jeremy Bícha
Jammy
Fix Released
Medium
Jeremy Bícha
gnome-remote-desktop (Ubuntu)
Invalid
Undecided
Jeremy Bícha

Bug Description

Impact
------
The Ubuntu Error Tracker has been receiving reports about a problem regarding gnome-remote-desktop. This problem was most recently seen with package version 42.0-4ubuntu1, the problem page at https://errors.ubuntu.com/problem/77f41623474304919ac793c6665505547b583b60 contains more details, including versions of packages affected, stacktrace or traceback, and individual crash reports.
If you do not have access to the Ubuntu Error Tracker and are a software developer, you can request it at http://forms.canonical.com/reports/.

Test Case 1
-----------
Unfortunately, we weren't able to identify a reliable test case.

We will know if this bug is fixed if errors.ubuntu.com stops reporting that error with a fully upgraded system. However, that means this update will need to be pushed to -updates

Test Case 2
-----------
Install all updates. Log out and log back in.
Open the Settings app to the Sharing page. Turn on Sharing and turn on Remote Desktop Sharing.
Turn it off then on because there may be a gnome-control-center bug with initial enabling.

From a second computer, connect to the first computer using Remmina.

The Remote Desktop page on the first computer provides the username and password to use. I wasn't able to get the "Remote Desktop Address" to work (maybe avahi doesn't work well?) so just use the first computer's IP address.

So something like:
RDP jeremy@192.168.1.1

Ensure that the connection works.

Then repeat the test after updating the second computer to use the updated freerdp2 since Remmina itself uses freerdp2. Basically we want to make sure things keep working after the update but also continue to work for connections between systems that aren't using the same version of freerdp2.

What Could Go Wrong
-------------------

[racb] This upload contains a significant rewrite of thread handling code. So the scope of a regression appears to be wide. Deadlocks, crashes and other race conditions may appear anywhere.

RDP Sharing using freerdp2 is a new feature for Ubuntu 22.04 LTS as part of GNOME 42.

RDP Sharing can be used for providing remote support so it's important that this feature works well because it may be difficult for the remote admin to fix issues in person.

freerdp2 is also used by the Remmina and GNOME Connections apps as the "client" app for RDP Sharing. (The GNOME feature is the "server" side.)

This fix is cherrypicked from the stable freerdp2 branch.

Jeremy Bícha (jbicha)
Changed in gnome-remote-desktop (Ubuntu):
status: New → Triaged
assignee: nobody → Jeremy Bicha (jbicha)
Changed in freerdp2 (Ubuntu):
status: New → Triaged
assignee: nobody → Jeremy Bicha (jbicha)
no longer affects: gnome-remote-desktop (Ubuntu Jammy)
description: updated
Jeremy Bícha (jbicha)
Changed in freerdp2 (Ubuntu Jammy):
status: New → Triaged
assignee: nobody → Jeremy Bicha (jbicha)
Revision history for this message
Pascal Nowack (pnowack) wrote (last edit ):

To provide some context, when this crash can happen: It can happen, after attempting to start a remote desktop session, when the screen is locked.
In such case, g-s directly refuses the start request and therefore the lifetime of the rdpgfx thread in FreeRDP is very short.

The journal message for this looks like this:
`Failed to start remote desktop session: GDBus.Error:org.freedesktop.DBus.Error.AccessDenied: Session creation inhibited`

Now, the error here is, that FreeRDP does not correctly wait for the rdpgfx thread to be created and this can lead to in this situation, that the rdpgfx thread is not teared down, when stopping the session, which can can lead to segfaults, like in this report or to memory corruption.

Personally, I was not able to reproduce the error. However, with the help of the journal entries I was able to find this cause.
https://github.com/FreeRDP/FreeRDP/pull/7836 takes care of the problem.

Sessions, that are not locked, should not be affected by this issue.

Jeremy Bícha (jbicha)
description: updated
Changed in gnome-remote-desktop (Ubuntu):
status: Triaged → Invalid
Changed in freerdp2 (Ubuntu):
status: Triaged → Fix Released
Changed in freerdp2 (Ubuntu Jammy):
status: Triaged → In Progress
Changed in freerdp2 (Ubuntu):
importance: Undecided → Medium
Changed in freerdp2 (Ubuntu Jammy):
importance: Undecided → Medium
Revision history for this message
Robie Basak (racb) wrote :

This needed rebasing onto to the security update 2.6.1+dfsg1-3ubuntu2.1. To save time I've done that and sponsored a re-upload for you, using the version string 2.6.1+dfsg1-3ubuntu2.2. I trust that's OK.

This upload contains a significant rewrite of thread handling code. Normally that would be unsuitable for an SRU on the basis of a microrelease update. It's not something I'd expect to see in an upstream "stable" branch, and I think casts doubt on whether this is an appropriate upstream project to take "stable" microrelease updates from in general without a change-by-change analysis an individual justifications each time.

So, thank you for submitting this change on an individual basis. I think the error counts for this particular issue do justify the SRU in this case.

However, I do think there is considerable regression risk. Because of the nature of the change being introduced, the scope of a regression appears to be wide. Deadlocks, crashes and other race conditions may appear anywhere. Please look out for this during SRU verification.

description: updated
Changed in freerdp2 (Ubuntu Jammy):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-jammy
Revision history for this message
Robie Basak (racb) wrote : Please test proposed package

Hello errors.ubuntu.com, or anyone else affected,

Accepted freerdp2 into jammy-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/freerdp2/2.6.1+dfsg1-3ubuntu2.2 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-jammy to verification-done-jammy. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-jammy. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Revision history for this message
Jeremy Bícha (jbicha) wrote :

I successfully completed Test Case 2. Test Case 1 is not really testable until we release this to jammy-updates. We will be watching errors.ubuntu.com to see if this error reappears there.

tags: added: verification-done verification-done-jammy
removed: verification-needed verification-needed-jammy
Revision history for this message
Brian Murray (brian-murray) wrote :

There are a surprising number of people with -proposed enabled in stable releases of Ubuntu so the Ubuntu Error Tracker would actually be a valuable source of information right now. We'd want to look for individual crashes from systems with the binary version of freerdp2 packages from -proposed installed. I have some code to do this, which may require some minor updates, and will try and run this query before the end of 2022-06-30. If I don't get to it let's go ahead and release since it is a large source of crashes.

tags: added: block-proposed-jammy
Revision history for this message
Brian Murray (brian-murray) wrote :

I constructed a database query which searched for crashes in the bucket linked to from the bug description and checked the Dependencies field in the those crashes for the version of libfreerdp2-2 installed. I'll attach the full results of the query but the summary follows:

    121 2.6.1+dfsg1-3ubuntu1
     41 2.6.1+dfsg1-3ubuntu2
     73 2.6.1+dfsg1-3ubuntu2.1

Subsequently, I'm going to accept the new version to -proposed.

tags: removed: block-proposed-jammy
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package freerdp2 - 2.6.1+dfsg1-3ubuntu2.2

---------------
freerdp2 (2.6.1+dfsg1-3ubuntu2.2) jammy; urgency=medium

  * Cherry-pick !7836 to fix a crash seen when trying to connect to
    an Ubuntu/GNOME session when the screen is locked LP: #1970994

 -- Jeremy Bicha <email address hidden> Wed, 01 Jun 2022 13:51:01 -0400

Changed in freerdp2 (Ubuntu Jammy):
status: Fix Committed → Fix Released
Revision history for this message
Brian Murray (brian-murray) wrote : Update Released

The verification of the Stable Release Update for freerdp2 has completed successfully and the package is now being released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.