After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 610316 - Cleanup suspend/resume code
Cleanup suspend/resume code
Status: RESOLVED OBSOLETE
Product: gnome-user-share
Classification: Core
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: gnome-user-share maintainers
gnome-user-share maintainers
Depends on:
Blocks:
 
 
Reported: 2010-02-17 22:09 UTC by Baptiste Mille-Mathias
Modified: 2013-02-21 09:58 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
git updated patch. (5.29 KB, patch)
2010-02-21 15:33 UTC, Baptiste Mille-Mathias
none Details | Review

Description Baptiste Mille-Mathias 2010-02-17 22:09:34 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.»
Comment 1 Bastien Nocera 2010-02-21 14:58:13 UTC
Please attach the patch here along with clear reproducer steps.
Comment 2 Baptiste Mille-Mathias 2010-02-21 15:33:18 UTC
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.
Comment 3 Bill Filler 2010-03-10 23:17:48 UTC
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
Comment 4 Bastien Nocera 2013-02-21 09:58:08 UTC
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.