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 569253 - gnome-keyring-daemon crashes after resume from hibernate
gnome-keyring-daemon crashes after resume from hibernate
Status: RESOLVED FIXED
Product: gnome-keyring
Classification: Core
Component: general
unspecified
Other All
: Normal critical
: ---
Assigned To: GNOME keyring maintainer(s)
GNOME keyring maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2009-01-26 22:00 UTC by Sean Hodges
Modified: 2009-01-30 21:45 UTC
See Also:
GNOME target: ---
GNOME version: 2.21/2.22



Description Sean Hodges 2009-01-26 22:00:39 UTC
Steps to reproduce:
1 - Hibernate and resume the machine
2 - ps aux | grep gnome-keyring-daemon
3 - Attempt to connnect to a remote machine managed by gnome-keyring-manager

Stack trace:
Not applicable at this point. Can include with some assistance on where to find the logs.

Other information:
Downstream bug (Ubuntu/Launchpad): https://bugs.launchpad.net/ubuntu/+source/gnome-keyring/+bug/268141
Comment 1 Tim Starling 2009-01-26 23:54:02 UTC
As mentioned on LP:

I reproduced this issue on Intrepid by starting gnome-keyring-daemon in the foreground and then sending the computer into hibernate:

tstarling@shimmer:~$ killall gnome-keyring-daemon
tstarling@shimmer:~$ gnome-keyring-daemon -f
** Message: another SSH agent is running at: /tmp/keyring-3pQJ5l/ssh
GNOME_KEYRING_SOCKET=/tmp/keyring-idImLe/socket
SSH_AUTH_SOCK=/tmp/keyring-idImLe/ssh
GNOME_KEYRING_PID=21817
**
ERROR:gkr-keyring.c:504:gkr_keyring_lock: assertion failed: (keyring->password != NULL)
Aborted
tstarling@shimmer:~$

The assertion occurred shortly after I clicked "hibernate", I saw it in the terminal before the screen went off.

The line numbers in the Ubuntu source are:

495:gkr_keyring_lock (GkrKeyring *keyring)
496:{
497:	if (keyring->locked)
498:		return TRUE;
500:	/* Never lock the session keyring */
501:	if (!keyring->location)
502:		return TRUE;
504:	g_assert (keyring->password != NULL);
Comment 2 Stef Walter 2009-01-30 21:45:27 UTC
Thanks for isolating the cause of the problem. 

Committed a fix and test case. 

2009-01-30  Stef Walter  <stef@memberwebs.com>

	* daemon/keyrings/gkr-keyring.c:
	* daemon/keyrings/tests/unit-test-keyring-file.c: Don't assert when 
	trying to lock a keyring without a password. Fixes bug #569253