GNOME Bugzilla – Bug 610316
Cleanup suspend/resume code
Last modified: 2013-02-21 09:58:08 UTC
A patch from Bill Filler in https://bugs.launchpad.net/bugs/369522 I didn't tested. « There appears to be a race condition on suspend/resume and hibernate/thaw which causes obexpushd and obexftp to not get correctly shutdown on suspend/hibernate and it attempts to restart them on resume, which fails. This makes any subsequent attempt to transfer files to the system via bluetooth fail. I've traced this to src/user-share.c consolekit_init() method and sessionchanged_cb(). When the condition fails, sessionchanged_cb gets an "Active" on suspend/hibernate rather than "Inactive" which causes the services to not get stopped. It gets another "Active" on resume/thaw and then all hell breaks loose. I've attached a patch which simplifies the dbus code to register a callback which is passed the active/inactive state, thus eliminating the race condition.»
Please attach the patch here along with clear reproducer steps.
Created attachment 154322 [details] [review] git updated patch. I'll ask the steps to the reporter, and I attach the patch I updated to latest git.
To reproduce do the following steps: 1) you need 2 machines involved to test 2) install gnome-user-share, gnome-bluetooth, bluez 3) via gnome-user-share UI setup each machine to be able send/receive files over bluetooth case 1: 4) via gnome-bluetooth UI, send file over bluetooth from machine a to machine b, verify it works 5) suspend machine b, resume machine b 6) repeat step 4, it should fail now 7) if not failing, repeat steps 4 and 5 a few times until failure case 2: 4) via gnome-bluetooth UI, send file over bluetooth from machine a to machine b, verify it works 5) suspend machine a, resume machine a 6) repeat step 4, it should fail now 7) if not failing, repeat steps 4 and 5 a few times until failure
That code has now been removed, as we now use gnome-session's SessionIsActive property, which proxies either systemd or ConsoleKit, depending on the system. commit b459856c3eea5b40cd5a8aee7e9a1ac2778ad850 Author: Bastien Nocera <hadess@hadess.net> Date: Thu Feb 21 09:18:21 2013 +0100 user-share: Use gnome-session to track the active session Removes the direct dependency on the obsolete ConsoleKit.