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 750146 - [IMAPx] Deadlock when FETCH and STORE run at one time
[IMAPx] Deadlock when FETCH and STORE run at one time
Status: RESOLVED FIXED
Product: evolution-data-server
Classification: Platform
Component: Mailer
3.16.x (obsolete)
Other Linux
: Normal critical
: ---
Assigned To: evolution-mail-maintainers
Evolution QA team
Depends on:
Blocks:
 
 
Reported: 2015-05-30 13:58 UTC by André Klapper
Modified: 2015-06-01 19:00 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description André Klapper 2015-05-30 13:58:47 UTC
evolution-3.16.2.1-1.fc22.i686

1. Accessing my GMail account (set Concurrent Connections to 1 under "Receiving Options") 
2. on my not too flaky WiFi connection (package loss: 6 out of 3154 according to running "ping imap.gmail.com" at the same time) 
3. and trying to locally and automatically filter mail in Inbox (setting labels and moving to subfolder XY; I have a lot of local mail filters)
4. and then manually applying filters again in that subfolder XY, 
5. Evolution has now been stuck for more than an hour with 10 "Filtering Selected Messages" / "Filtering Selected Messages (50%)" / "Filtering Selected Messages (100%)" and 1 "Retrieving message '185563' in XY" message in the status bar.
6. Under gdb, I hit Ctrl+C (and later, continue again but had to kill Evolution). See below.
7. Also, trying to close the Evolution only greys out the UI. 
I received a window "Close Evolution with pending background operations? Evolution is taking a long time to shut down, possibly due to network connectivity issues. Would you like to cancel all pending operations and close immediately, or keep waiting?" and choose "Keep waiting" and nothing changed. I killed Evolution after 10 minutes of waiting.

$:andre\> gdb evolution
GNU gdb (GDB) Fedora 7.9.1-13.fc22
(gdb) run
Starting program: /usr/bin/evolution 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/libthread_db.so.1".

** (evolution:16826): CRITICAL **: categories_icon_theme_hack: assertion 'filename != NULL && *filename != '\0'' failed
[New Thread 0xb0a0cb40 (LWP 16834)]

(evolution:16826): GLib-GObject-WARNING **: The property GtkSettings:gtk-button-images is deprecated and shouldn't be used anymore. It will be removed in a future version.

(evolution:16826): Gtk-WARNING **: Failed to register client: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.gnome.SessionManager was not provided by any .service files
[New Thread 0xaf5ffb40 (LWP 16836)]
Detaching after fork from child process 16927.
[New Thread 0xac218b40 (LWP 16925)]
[New Thread 0xa7172b40 (LWP 16942)]

(evolution:16826): GLib-GObject-WARNING **: The property GtkSettings:gtk-menu-images is deprecated and shouldn't be used anymore. It will be removed in a future version.
[New Thread 0xa8975b40 (LWP 16939)]
[Thread 0xa7172b40 (LWP 16942) exited]
[Thread 0xa8975b40 (LWP 16939) exited]
[...]
[Thread 0xac218b40 (LWP 16925) exited]

(evolution:16826): GLib-GObject-WARNING **: The property GtkCellRendererPixbuf:stock-id is deprecated and shouldn't be used anymore. It will be removed in a future version.
Detaching after fork from child process 17413.
Detaching after fork from child process 17455.
Detaching after fork from child process 17480.
^C[New Thread 0xaa178b40 (LWP 17503)]
[New Thread 0x9adfdb40 (LWP 17502)]
[New Thread 0x9caffb40 (LWP 17501)]
[New Thread 0x991f9b40 (LWP 17477)]
[New Thread 0x9bdffb40 (LWP 17474)]
[New Thread 0xa09ffb40 (LWP 17473)]
[New Thread 0x9a1fbb40 (LWP 17472)]
[New Thread 0x9b5feb40 (LWP 17450)]
[New Thread 0xa85fdb40 (LWP 17448)]
[New Thread 0x9eaffb40 (LWP 17445)]
[New Thread 0x999fab40 (LWP 17185)]
[New Thread 0xa615fb40 (LWP 17068)]
[New Thread 0xa515db40 (LWP 17067)]
[New Thread 0xa7973b40 (LWP 17010)]
[New Thread 0xaca42b40 (LWP 16844)]
[New Thread 0xadf0bb40 (LWP 16843)]
[New Thread 0xae830b40 (LWP 16842)]
[New Thread 0xaff78b40 (LWP 16835)]

Program received signal SIGINT, Interrupt.
0xb7fdbbc8 in __kernel_vsyscall ()
(gdb) thread apply all bt


(gdb) list
421		EShell *shell;
422		GSettings *settings;
423	#ifdef DEVELOPMENT
424		gboolean skip_warning_dialog;
425	#endif
426		GError *error = NULL;
427	
428	#ifdef G_OS_WIN32
429		e_util_win32_initialize ();
430	#endif
(gdb)
Comment 1 André Klapper 2015-05-30 14:20:08 UTC
* I am not using "Quick Resync" (and I have no idea what that means). I enabled it for a while and it did not change anything.
* I am not using "Listen for server change notifications" (and I have no idea what that means)
Comment 2 Milan Crha 2015-06-01 13:59:45 UTC
Thanks for a bug report. It looks like a deadlock between threads on folder change save and message download.
Comment 3 Milan Crha 2015-06-01 19:00:42 UTC
The first problem was that the mailbox update lock was held for too long. When I moved the unlock elsewhere, then a problem of unlocking the lock from a different thread that holds the lock problem arose (that causes undefined behaviour). That led me to a change of a rec_mutex to a conditional variable (GCond).

Created commit 8b05e84 in eds master (3.17.3+)
Created commit f973902 in eds gnome-3-16 (3.16.3+)