GNOME Bugzilla – Bug 730788
[IMAPx] Deadlock during IDLE start
Last modified: 2014-07-08 14:32:41 UTC
Here is a CAMEL_DEBUG=all log of imapx:A getting stuck with evolution/eds 3.13.2. The UI is responsive, there are two spinners in the status bar a "Refreshing folder INBOX" and "Expunging folder 'INBOX'" ....... [imapx:A] ** Starting next command [imapx:A] adding command, format = 'EXPUNGE' [imapx:A] completing command buffer is [7] 'EXPUNGE' [imapx:A] enqueue job 'EXPUNGE' [imapx:A] * no, no jobs [imapx:A] adding command, format = 'IDLE' [imapx:A] completing command buffer is [4] 'IDLE' [imapx:A] ** Starting next command [imapx:A] - we're selected on 'INBOX', current jobs? [imapx:A] -- Checking job queue [imapx:A] -- 150 'EXPUNGE'? [imapx:A] --> starting 'EXPUNGE' [imapx:A] completing command buffer is [0] '' [imapx:A] Starting command (active=1,) A00126 EXPUNGE [imapx:A] I/O: 'A00126 EXPUNGE' [imapx:A] ** Starting next command [imapx:A] I/O: '* 36971 EXPUNGE * 36970 EXPUNGE A00126 OK Expunge completed.' [imapx:A] got untagged response [imapx:A] Have token 'EXPUNGE' id 36971 Thread 0x7f8f8c007680 > Get folder info(0xc782f0:0, '<null>') = full_name: INBOX flags: 00000454 full_name: INBOX/Archive flags: 00000008 ............................. imapx_find_connection_unlocked: for-expensive:0 will return:(nil) cmd-count:-2 has-expensive:-2 found:0; connections opened:1 max:2 cmds:1 has-expensive:0 avail:0 cinfo:0x7f8f8c0038f0 server:0x7f8f8c0021b0 ............................. full_name: .#evolution/Trash flags: 00000cf2 full_name: .#evolution/Junk flags: 000010f2 < 0x7f8f8c007680 > [imapx:B] I/O: '* PREAUTH [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE IDLE SORT SORT=DISPLAY THREAD=REFERENCES THREAD=REFS THREAD=ORDEREDSUBJECT MULTIAPPEND URL-PARTIAL CATENATE UNSELECT CHILDREN NAMESPACE UIDPLUS LIST-EXTENDED I18NLEVEL=1 CONDSTORE QRESYNC ESEARCH ESORT SEARCHRES WITHIN CONTEXT=SEARCH LIST-STATUS SPECIAL-USE BINARY MOVE] Logged in as yaneti' .....
Created attachment 277260 [details] process pstack
Pasting backtrace inline:
+ Trace 233635
Thread 16 (Thread 0x7f8f7bfff700 (LWP 2355))
Thread 6 (Thread 0x7f8f98df3700 (LWP 2396))
Thread 4 (Thread 0x7f8f99df5700 (LWP 2595))
Created attachment 277262 [details] [review] proposed eds patch for evolution-data-server; There seem to happen a deadlock in IDLE processing, a race between the idle_lock and the queue lock. Please test this patch.
Created attachment 277263 [details] [review] proposed eds patch ][ for evolution-data-server; Oops, no, this one will be better. It makes sure that he queue lock and the idle_lock are not held at once.
Running with attachment 277263 [details] [review] for a while now and it seems to work where before it got stuck in the first few minutes of use. Thanks
Thanks for the testing. Created commit 14f4897 in eds master (3.13.3+) [1] Created commit 920750e in eds evolution-data-server-3-12 (3.12.3+) [1] https://git.gnome.org/browse/evolution-data-server/commit/?id=14f4897
It seems I caused a regression with this patch, reported as bug #732366.
I've seen the behavior described in 732366 before the patch here. My attempt to describe it was bug 725720