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 590004 - gnome-keyring-daemon crashed with signal 5 in g_thread_join()
gnome-keyring-daemon crashed with signal 5 in g_thread_join()
Status: RESOLVED FIXED
Product: gnome-keyring
Classification: Core
Component: general
2.27.x
Other Linux
: Normal critical
: ---
Assigned To: Stef Walter
GNOME keyring maintainer(s)
: 591415 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2009-07-28 12:46 UTC by Pedro Villavicencio
Modified: 2009-08-30 02:07 UTC
See Also:
GNOME target: ---
GNOME version: 2.27/2.28


Attachments
output of "strace gnome-keyring-daemon --debug" (61.41 KB, text/x-log)
2009-08-27 00:36 UTC, Savvas Radević
  Details
Patch which instruments quit paths with messages (1.34 KB, patch)
2009-08-29 16:13 UTC, Stef Walter
none Details | Review

Description Pedro Villavicencio 2009-07-28 12:46:17 UTC
this report has been filed here:

https://bugs.edge.launchpad.net/ubuntu/+source/gnome-keyring/+bug/405667

reporters stated that they get the crash after updating the package to 2.27.5

".

Thread 1 (process 3217)

  • #0 IA__g_logv
  • #1 IA__g_log
  • #2 g_thread_join_posix_impl
    at /build/buildd/glib2.0-2.21.4/gthread/gthread-posix.c line 385
  • #3 IA__g_thread_join
    at /build/buildd/glib2.0-2.21.4/glib/gthread.c line 703
  • #4 gck_timer_shutdown
    at gck-timer.c line 137
  • #5 gck_module_finalize
    at gck-module.c line 611
  • #6 gck_user_module_finalize
    at gck-user-module.c line 309
  • #7 IA__g_object_unref
    at /build/buildd/glib2.0-2.21.4/gobject/gobject.c line 2421
  • #8 gck_C_Finalize
    at ../../pkcs11/gck/gck-module-ep.h line 104
  • #9 plex_C_Finalize
    at gck-plex-layer.c line 191
  • #10 auth_C_Finalize
    at gkr-pkcs11-auth-ep.c line 240
  • #11 pkcs11_daemon_cleanup
    at gkr-pkcs11-daemon.c line 63
  • #12 egg_cleanup_perform
    at egg-cleanup.c line 82
  • #13 main
    at gkr-daemon.c line 771

Comment 1 Stef Walter 2009-07-28 15:32:33 UTC
Thanks for the bug report. Please attach the output of gnome-keyring-daemon when this happens. This may be in /var/log/auth.log or ~/.xsession-errors
Comment 3 Sebastien Bacher 2009-07-29 07:30:57 UTC
You might want to read directly the launchpad comments too 
Comment 4 Stef Walter 2009-07-30 02:31:08 UTC
Thanks. I'm looking into this further. 

A very odd stack trace. The stack trace shows that gnome-keyring-daemon was in the process of exiting (such as during a logout), and yet the users say they were just using their computers...
Comment 5 Sebastien Bacher 2009-07-30 12:50:07 UTC
The crash could be a crash on closing, users would not notice until getting the apport notification in the next session
Comment 6 Pedro Villavicencio 2009-08-26 15:44:42 UTC
Is there anything else we could provide to help the bug to be fixed? Downstream report has currently ~50 duplicates. Thanks in advance.
Comment 7 Savvas Radević 2009-08-27 00:36:32 UTC
Created attachment 141813 [details]
output of "strace gnome-keyring-daemon --debug"

Confirming the bug too. I killed the gnome-keyring-daemon and tried to restart it using: strace gnome-keyring-daemon --debug

I have attached the log, I hope it gives more information. :)
Comment 8 Stef Walter 2009-08-29 16:13:55 UTC
Created attachment 141986 [details] [review]
Patch which instruments quit paths with messages

Sorry for taking a while to get back to this... Could you apply the attached patch. I'm interested in the messages generated in /var/log/auth.log. 

Since this bug seems to happen at logout, after applying the patch and rebuilding gnome-keyring, you'll need to log out twice. Once to start running the new code, and the second time to make the bug happen with the messages this patch adds.

All the comments on launchpad are pretty useless, because Ubuntu doesn't seem to tell people that the crash happened during their last session, and so everyone thinks what they're currently doing is causing the bug :(
Comment 9 Andreas Moog 2009-08-29 23:37:15 UTC
If it helps:

The following procedure makes gnome-keyring-daemon crash reliably for me:

$ gnome-keyring-daemon
** Message: couldn't set environment variable in session: Setenv interface is only available during the Initialization phase
GNOME_KEYRING_SOCKET=/tmp/keyring-IWfyTd/socket
SSH_AUTH_SOCK=/tmp/keyring-IWfyTd/socket.ssh
GNOME_KEYRING_PID=32713
$ export GNOME_KEYRING_SOCKET=/tmp/keyring-IWfyTd/socket
$ export SSH_AUTH_SOCK=/tmp/keyring-IWfyTd/socket.ssh
$ export GNOME_KEYRING_PID=32713
$ gnome-keyring-daemon --start
GNOME_KEYRING_SOCKET=/tmp/keyring-IWfyTd/socket
SSH_AUTH_SOCK=/tmp/keyring-IWfyTd/socket.ssh
$ kill 32713

Messages in /var/log/auth.log:

Aug 30 01:35:09 apophis gnome-keyring-daemon[32713]: quitting via signal: 15
Aug 30 01:35:09 apophis gnome-keyring-daemon[32713]: quitting main loop...
Aug 30 01:35:09 apophis gnome-keyring-daemon[32713]: GThread: file /build/buildd/glib2.0-2.21.5/gthread/gthread-posix.c: line 385 (g_thread_join_posix_impl): error 'No such process' during 'pthread_join (*(pthread_t*)thread, &ignore)'
Comment 10 Stef Walter 2009-08-30 00:05:09 UTC
Thank you Andreas. I can now replicate this bug on my local setup.
Comment 11 Stef Walter 2009-08-30 02:05:32 UTC
These commits should fix the problem. Could you confirm that this fixes the problem? They're committed to git master at git.gnome.org:

commit 0fa6f05cfcedef35dd5de25908cbc1aceb50e61d
Author: Stef Walter <stef@memberwebs.com>
Date:   Sun Aug 30 02:02:38 2009 +0000

    [egg] Remove unneeded signal handling code.

commit 7d19e6eb281a60b6f39af32b1242b808f0f7edd0
Author: Stef Walter <stef@memberwebs.com>
Date:   Sun Aug 30 02:00:07 2009 +0000

    [daemon] Rework signal handling, startup procedure.
    
    Reworking the signal handling, so we have a specific thread for
    handling signals. All other threads ignore signals. This is the
    recommended way to 'mix' signals and threads.
    
    In addition we move the part of startup that we can perform
    after forking into separate procedures. In particular we try
    to prevent starting threads until after we've forked. Besides
    the obvious sanity, this helps the signal handling to work
    for all threads.
Comment 12 Stef Walter 2009-08-30 02:07:06 UTC
*** Bug 591415 has been marked as a duplicate of this bug. ***