GNOME Bugzilla – Bug 638810
Crash in camel_folder_search_set_folder with IMAP account
Last modified: 2013-05-08 22:37:52 UTC
Moving this from a downstream bug report: https://bugzilla.redhat.com/show_bug.cgi?id=665741 abrt version: 1.1.14 architecture: i686 Attached file: backtrace cmdline: evolution component: evolution crash_function: camel_folder_search_set_folder executable: /usr/bin/evolution kernel: 2.6.35.10-72.fc14.i686.PAE package: evolution-2.32.1-1.fc14 rating: 4 reason: Process /usr/bin/evolution was killed by signal 11 (SIGSEGV) release: Fedora release 14 (Laughlin) How to reproduce: It was startup . Unfortunately, I've not the slightest clue. . I submit because I hope to reproduce with more info. ------------------------------------------------------------------------------ Package: evolution-2.32.1-1.fc14 Architecture: x86_64 OS Release: Fedora release 14 (Laughlin) How to reproduce ----- 1. Restart computer 2. Launch Evolution Comment ----- I lauch Evolution and the UI appears for a couple of seconds and then goes away with this crash. This issue appears to happen the first time Evolution starts and on occasions after the first start. It does not appear to be consistent. Core was generated by `evolution'. Program terminated with signal 11, Segmentation fault.
+ Trace 225425
Thread 14 (Thread 7173)
Thread 1 (Thread 7208)
*** Bug 661456 has been marked as a duplicate of this bug. ***
As I noted in bug #661456, one thread is freeing a folder, while another is still using it. That may happen when folder's initial search takes longer than the vFolder "expects". I'll check the code and update the bug with my findings.
I would like to ask for more information. It seems to me that it's not exactly what I thought in comment #2. The folder is reffed properly, on the first look. What I see from the backtrace is that the folder it crashes on is a real trash folder (in Edit->Preferences->Mail Accounts-><IMAP account>->Defaults tab is checked to use Real Trash folder). But apart of that I do not see things I would like to know. Could anyone of you answer these questions, please? a) am I right with the real trash folder? b) is also junk folder being set as a real folder? c) how is setup the search folder? (any search folder involving IMAP account) d) in Edit->Preferences->Mail preferences-> tab General, section "Start up", what options are checked there? I would like to get as close to your setup as possible, to be able to reproduce it here. Thanks in advance.
I tried to reproduce the bug again (I do not use search folders anymore). I have created a new search folder (search-folder.png screenshot) with one condition : State is not read. My IMAP account is configured with custom IMAP folder for trash and junk (imap-account.png screenshot). I mark some emails as not read. I select my new search folder then close Evolution. I open Evolution and sometimes I get a crash (~1/5 run) in camel_folder_search_set_folder.
Created attachment 204684 [details] search-folder screenshot
Created attachment 204685 [details] imap-account screenshot
(In reply to comment #3) > ... > Could anyone of you answer these questions, please? > > a) am I right with the real trash folder? Yes. This is true for multiple IMAP accounts. > b) is also junk folder being set as a real folder? Yes. This is true for multiple IMAP accounts. > c) how is setup the search folder? (any search folder involving IMAP account) Yes. I have a search folder for Unread messages in any account which includes multiple IMAP accounts. I also have a search folder for To Do messages which are messages from any account that are labeled with ToDo. > d) in Edit->Preferences->Mail preferences-> tab General, section "Start up", > what options are checked there? Well, I am using 2.32.3 but I do not see a Start up section. But, what I have: Message Display: Mark messages as read after 1.5 seconds = TRUE Do not display messages when text size exceeds 4096 KB = TRUE Shrink To / CC / Bcc headers to 5 addresses = TRUE Enable Magic Spacebar = TRUE Enable Search Folder = TRUE Delete Mail: Confirm when expunging a folder = TRUE
Thank you both for an update. I was finally able to reproduce this, though only when cheating the code. I added g_usleep (2000000); into imap_folder_finalize(), just below the call to camel_offline_journal_write(). Then I can reproduce this pretty consistently. I filled an enhancement request against GLib in bug #667424, to provide better mechanisms than I'll use here, and if they approve, then this can be changed in a development version of evolution. See that bug for a little explanation what is going on here.
Created attachment 204760 [details] [review] eds patch for evolution-data-server; This is a change in the first cache of folders, to remove the disposing object just before its dispose method is invoked. It doesn't work fully, a change in evolution is needed too. I added also some sanitizing code to CamelFolderSearch, thus it will not crash any more, but will claim on a console instead.
Created attachment 204761 [details] [review] evo patch for evolution; Evolution part, which uses another cache (mail-folder-cache), where cannot be used the toggle_ref. That's a reason of the GLib enhancement bug. This change is just a workaround for now.
Created commit 3ee0ee8 in eds master (3.3.4+) Created commit 02bcba4 in evo master (3.3.4+) Created commit f7d9eda in eds gnome-3-2 (3.2.3+) Created commit a0c7def in evo gnome-3-2 (3.2.3+)
This appears to be broken too, unfortunately — the toggle_ref support isn't thread-safe. See bug 699909.