GNOME Bugzilla – Bug 591415
gnome-keyring-daemon dumps core when exiting
Last modified: 2009-08-30 02:07:06 UTC
If you logout and login again, you can find a core file under the HOME directory. core 'core' of 7534: gnome-keyring-daemon --start fea22485 _lwp_kill (1, 5, 8046b48, fe9cac0e) + 15 fe9cac1a raise (5, 0) + 22 feb29832 g_logv (fef33cf8, 4, fef33d00, 8046fdc, 0, 0) + 402 feb298f0 g_log (fef33cf8, 4, fef33d00, fef33d30, 181, fef33cb3) + 40 fef32d05 g_thread_join_posix_impl (81493ac, 0) + 95 feb576b8 g_thread_join (8149390, 0) + 148 08102034 gck_timer_shutdown (8136e6c, 80f2f09, 814c018, 80470b0, 80d1e59, 814c018) + f4 080f30c1 gck_module_finalize (814c018, 0) + 1c1 080d1e59 gck_user_module_finalize (814c018, 0) + 109 fec0b156 g_object_unref (814c018, 0) + 266 080cadc4 gck_C_Finalize (0, 0) + 104 080a042d plex_C_Finalize (0, 0) + dd 08084f85 auth_C_Finalize (0, 0) + 35 080844de pkcs11_daemon_cleanup (0, 0) + 6e 08108158 egg_cleanup_perform (8147ba8, 80472c0, 80471f4, 807e23d, 1, 8047200) + a8 0807f576 main (1, 8047200, 804720c, 80471bc) + 1d6 0807e23d _start (2, 8047328, 0, 0, 8047345, 804736a) + 7d
This looks that timer_thread_func exits due to some unknown reasons. It cores at g_thread_join, it it likely it is the main thread is trying to join a thread that has been done.
It looks like just not join the thread can solve the issue. Is there a better solution for this? Stef, how the thread of 'timer_thread_func' exit out?
Thanks for your research into this. This seems to be the same problem as: bug #590004. The timer_thread_func thread exits in an orderly fashion, as you would expect by setting a flag, firing off a GCond and then it stops it's loop. There's unit tests that verify this behavior. There's a few more wrinkles. This is line that's (sent to /var/log/auth.log) where the gnome-keyring-daemon is aborting (signal 5): Jul 28 14:22:16 test910 gnome-keyring-daemon[2319]: GThread: file /build/buildd/glib2.0-2.21.4/gthread/gthread-posix.c: line 385 (g_thread_join_posix_impl): error 'No such process' during 'pthread_join (*(pthread_t*)thread, &ignore)' The thread is started as a joinable thread, so we should run join on it. Running it as non-joinable might be a work around, but I'm not sure it would fix the problem, although you could try that. I've tried to duplicate the problem, but haven't been able to. If you can duplicate it consistently, the first thing to check is that join isn't being called twice (in quick succession?). This change would cause that to show up in the logs: diff --git a/pkcs11/gck/gck-timer.c b/pkcs11/gck/gck-timer.c index 4776c3b..ddfeb67 100644 --- a/pkcs11/gck/gck-timer.c +++ b/pkcs11/gck/gck-timer.c @@ -134,6 +134,7 @@ gck_timer_shutdown (void) g_cond_broadcast (timer_cond); g_assert (timer_thread); + g_message ("joining timer thread"); g_thread_join (timer_thread); timer_thread = NULL; I'm wondering if perhaps this is something to do with the interaction of signals and threads. gnome-keyring-daemon exits via the SIGTERM signal. This is caught, (in daemon/gkr-daemon.c) and then an orderly shutdown is run. But perhaps the timer_thread_func is killed via the SIGTERM?
Created attachment 140445 [details] [review] Possible patch Does this fix the problem for you?
(In reply to comment #4) > Created an attachment (id=140445) [edit] > Possible patch > > Does this fix the problem for you? > No, this patch can not fix the problem.
(In reply to comment #3) > Thanks for your research into this. This seems to be the same problem as: bug > #590004. > > The timer_thread_func thread exits in an orderly fashion, as you would expect > by setting a flag, firing off a GCond and then it stops it's loop. There's unit > tests that verify this behavior. There's a few more wrinkles. > > This is line that's (sent to /var/log/auth.log) where the gnome-keyring-daemon > is aborting (signal 5): > > Jul 28 14:22:16 test910 gnome-keyring-daemon[2319]: GThread: file > /build/buildd/glib2.0-2.21.4/gthread/gthread-posix.c: line 385 > (g_thread_join_posix_impl): error 'No such process' during 'pthread_join > (*(pthread_t*)thread, &ignore)' > > The thread is started as a joinable thread, so we should run join on it. > Running it as non-joinable might be a work around, but I'm not sure it would > fix the problem, although you could try that. > > I've tried to duplicate the problem, but haven't been able to. If you can > duplicate it consistently, the first thing to check is that join isn't being > called twice (in quick succession?). This change would cause that to show up in > the logs: > > diff --git a/pkcs11/gck/gck-timer.c b/pkcs11/gck/gck-timer.c > index 4776c3b..ddfeb67 100644 > --- a/pkcs11/gck/gck-timer.c > +++ b/pkcs11/gck/gck-timer.c > @@ -134,6 +134,7 @@ gck_timer_shutdown (void) > g_cond_broadcast (timer_cond); > > g_assert (timer_thread); > + g_message ("joining timer thread"); > g_thread_join (timer_thread); > timer_thread = NULL; > > > I'm wondering if perhaps this is something to do with the interaction of > signals and threads. gnome-keyring-daemon exits via the SIGTERM signal. This is > caught, (in daemon/gkr-daemon.c) and then an orderly shutdown is run. But > perhaps the timer_thread_func is killed via the SIGTERM? > The thread is only joined once.
*** This bug has been marked as a duplicate of bug 590004 ***