Stuck in gcr_system_prompt_open_for_prompter()
@mcrha
Submitted by Milan Crha Link to original bug (#697877)
Description
Created attachment 241351 test.c; compile with the first line comment command
There are some users facing an issue with password prompt in evolution, claiming that they are not asked at all. Even it's still unsure what could happen in the background for them, I think I found some corner cases when I can make the gcr prompt stuck forever. It's a corner case, because I "simulate" an unexpected crash of the gcr-prompter (I can do similar issue with libsecret as well), but I hope it's not too bizarre (at least not for libsecret, which seems to be tight for the DBus object forever, in its simplified API).
Anyway, with the test.c (attached), when I kill running gcr-prompter in time of
waiting before close... Then I get this thread as stuck (see below). This thread is waiting in the next prompt, which was waiting for a finish of the previous one. It is not visible on the console, but it's there in the backtrace.
Thread 4 (Thread 0x7fdbc7143700 (LWP 9096)):
#0 0x00000038b8ee998d in poll () from /lib64/libc.so.6
#1 0x00000038bb647d24 in g_main_context_poll (priority=2147483647, n_fds=1, fds=0x7fdbb800b640, timeout=-1, context=0x7fdbb8005190) at gmain.c:3584
#2 g_main_context_iterate (context=0x7fdbb8005190, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at gmain.c:3285
#3 0x00000038bb648182 in g_main_loop_run (loop=0x7fdbb80053e0) at gmain.c:3484
#4 0x00000038d9c43dfa in gcr_system_prompt_real_init (initable=0x7fdbb8006030, cancellable=0x0, error=0x7fdbc7142c18) at gcr-system-prompt.c:906
#5 0x00000038bda58fdf in g_initable_new_valist (object_type=<optimized out>, first_property_name=first_property_name@entry=0x38d9c6b9f1 "timeout-seconds", var_args=var_args@entry=0x7fdbc7142af8, cancellable=cancellable@entry=0x0, error=error@entry=0x7fdbc7142c18) at ginitable.c:228
#6 0x00000038bda590c9 in g_initable_new (object_type=<optimized out>, cancellable=cancellable@entry=0x0, error=error@entry=0x7fdbc7142c18, first_property_name=first_property_name@entry=0x38d9c6b9f1 "timeout-seconds") at ginitable.c:148
#7 0x00000038d9c45c19 in gcr_system_prompt_open_for_prompter (prompter_name=0x0, timeout_seconds=-1, cancellable=0x0, error=0x7fdbc7142c18) at gcr-system-prompt.c:1294
#8 0x0000000000400edc in test_prompt () at test.c:22
#9 0x0000000000401219 in test_prompt_thread (user_data=0x0) at test.c:122
#10 0x00000038bb66b605 in g_thread_proxy (data=0xbe8c50) at gthread.c:797
#11 0x00000038b9207d15 in start_thread () from /lib64/libpthread.so.0
#12 0x00000038b8ef246d in clone () from /lib64/libc.so.6
Attachment 241351, "test.c; compile with the first line comment command":
test.c
Version: 3.6.x