Bug 1325487 - [IMAPx] Release idle_lock before disconnecting the cancellable
Summary: [IMAPx] Release idle_lock before disconnecting the cancellable
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: evolution-data-server
Version: 24
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Milan Crha
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-04-09 06:39 UTC by Mikhail
Modified: 2016-04-11 13:34 UTC (History)
4 users (show)

Fixed In Version: evolution-data-server-3.20.2
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-04-11 13:34:04 UTC
Type: Bug


Attachments (Terms of Use)
screenshot (256.31 KB, image/png)
2016-04-09 06:39 UTC, Mikhail
no flags Details
backtraces (9.12 KB, application/x-gzip)
2016-04-09 06:42 UTC, Mikhail
no flags Details
evolution console output (64.00 KB, text/plain)
2016-04-09 06:44 UTC, Mikhail
no flags Details

Description Mikhail 2016-04-09 06:39:30 UTC
Created attachment 1145357 [details]
screenshot

Description of problem:
Evolution not hangs, but symptoms I see as earlier. Many spinners in the bottom panel. And on every spinner showed popup message "Release unused memory for folder 'INBOX'"

Comment 1 Mikhail 2016-04-09 06:42:35 UTC
Created attachment 1145358 [details]
backtraces

Comment 2 Mikhail 2016-04-09 06:44:40 UTC
Created attachment 1145359 [details]
evolution console output

Comment 3 Milan Crha 2016-04-11 13:34:04 UTC
Thanks for a bug report. I see that there are many threads trying to update the folder structure, read it from the server. There is also one thread disconnecting your IMAPx account, waiting for a lock (maybe that's the cause). The screenshot also shows an issue with .ru account, the code failed to obtain a password for it. I suppose you have it configured in the GNOME Online Accounts, thus it can be that the goa-daemon failed/crashed for some reason, then the evolution(-data-server) failed to ask the goa-daemon for the password. That all can be eventually related to an intermittent disconnect.

I think the problem is the Thread 15 and Thread 16 of the Evolution waiting on each other. Namely Thread 15 holds the GCancellable lock (as part of the g_cancellable_cancel() call) and is waiting for an idle_lock, of the CamelIMAPXServer in the imapx_server_wait_idle_stop_cancelled_cb().
The Thread 16 is holding the idle_lock in the camel_imapx_server_stop_idle_sync((), where it also calls g_cancellable_disconnect(), which seems to require the global GCancellable lock as well, but that one if held by the Thread 15 already.

I fixed this with the below commits, but it was too late for the 3.20.1 release, thus it's part of the next release.

Created commit 53dcb98 in eds master (3.21.1+) [1]
Created commit b59863d in eds gnome-3-20 (3.20.2+)

[1] https://git.gnome.org/browse/evolution-data-server/commit/?id=53dcb98


Note You need to log in before you can comment on or make changes to this bug.