GNOME Bugzilla – Bug 573125
Evolution crashes right after startup when having broken ~/.evolution
Last modified: 2011-07-26 09:25:41 UTC
Note: this happens after recovery from RAID1 array crashdown, so data are in inconsistent state for sure... but evo still shouldn't crash. evolution-2.25.91-1.fc11.x86_64 evolution-data-server-2.25.91-1.fc11.x86_64 evolution-spamassassin-2.25.91-1.fc11.x86_64 evolution-perl-2.25.91-1.fc11.x86_64 Distribution: Fedora release 10.91 (Rawhide) Gnome Release: 2.25.91 2009-02-19 (Red Hat, Inc) BugBuddy Version: 2.25.2 System: Linux 2.6.28-zen8 #1 SMP PREEMPT Mon Feb 9 16:38:56 CET 2009 x86_64 X Vendor: The X.Org Foundation X Vendor Release: 10599903 Selinux: Enforcing Accessibility: Disabled GTK+ Theme: ClearlooksClassic Icon Theme: Fedora GTK+ Modules: canberra-gtk-module, gnomebreakpad Memory status: size: 763351040 vsize: 763351040 resident: 30429184 share: 20529152 rss: 30429184 rss_rlim: 18446744073709551615 CPU usage: start_time: 1235574087 rtime: 47 utime: 42 stime: 5 cutime:0 cstime: 0 timeout: 0 it_real_value: 0 frequency: 100 Backtrace was generated from '/usr/bin/evolution' [?1034h[Thread debugging using libthread_db enabled] [New Thread 0x7ff535506910 (LWP 4531)] [New Thread 0x7ff5377fe910 (LWP 4525)] [New Thread 0x7ff537fff910 (LWP 4523)] [New Thread 0x7ff53cfcc910 (LWP 4522)] 0x0000003f2b20f21f in waitpid () from /lib64/libpthread.so.0
+ Trace 212896
Thread 4 (Thread 0x7ff537fff910 (LWP 4523))
----------- .xsession-errors (15 sec old) --------------------- warning: the debug information found in "/usr/lib/debug//lib64/libdl-2.9.90.so.debug" does not match "/lib64/libdl.so.2" (CRC mismatch). warning: the debug information found in "/usr/lib/debug/lib64/libdl-2.9.90.so.debug" does not match "/lib64/libdl.so.2" (CRC mismatch). (gnome-appearance-properties:4513): Gtk-WARNING **: Error loading theme icon 'gtk-missing-image' for stock: Error opening file: No such file or directory (gnome-appearance-properties:4513): Gtk-WARNING **: Error loading theme icon 'gtk-missing-image' for stock: Error opening file: No such file or directory (gnome-appearance-properties:4513): Gtk-WARNING **: Error loading theme icon 'gtk-missing-image' for stock: Error opening file: No such file or directory (gnome-panel:4151): Gtk-WARNING **: Error loading theme icon 'gtk-missing-image' for stock: Error opening file: No such file or directory --------------------------------------------------
Created attachment 129562 [details] [review] proposed eds patch for evolution-data-server; I'm able to reproduce this by inserting manually an empty line to one folder's table in folders.db. These are places it crashed to me.
Just a thought, but if we can detect database corruption would it make sense to send up a user alert saying The message summary database for this account appears to be corrupted. Rebuilding the database should restore its integrity but may take some time. Would you like to rebuild now? [ Do Not Rebuild ] [ Rebuild Database ]
please see bug 568539 , bug 574179 and mark them dupe if they are. Both are in exchange (mapi and owa connector) so i am not able to decide, thanks,
Matt, that would be a nice idea. Rebuilding index would be a better/wiser choice. Thoughts on how to detect DB corruption?
(In reply to comment #4) > Matt, that would be a nice idea. Rebuilding index would be a better/wiser > choice. Thoughts on how to detect DB corruption? PRAGMA integrity_check and/or PRAGMA quick_check http://www.sqlite.org/pragma.html#debug The documentation claims 'quick_check' should run much faster, but I think it depends on the number of indexes in the database. When I ran it on the database for my Red Hat IMAP account (by far my largest account), both commands took roughly three seconds. Are we not using indexes in folders.db? Not sure if SQLite blocks other database operations during an integrity check, or if -we- should, or if at least read operations are safe. Need to research that more. Ideally this could run in the background at startup and not block summary loading, because three seconds (probably more for mailing list hoarders) is a pretty noticable delay. Also, should add a scrolled window to the rebuild dialog showing the actual integrity check errors, just to make it more scary looking.
Sounds fine to me. May when the store is inited, we can check it. But not always IMO. May be we should time it. It would *block*, Infact, I have a 'vaccum' that I should also schedule. We index the tables for our usage. Most of the cols are indexed, except 1-2. May be there should be an option evolution --rebuild-summary which should force it.
*** Bug 579973 has been marked as a duplicate of this bug. ***
*** Bug 582734 has been marked as a duplicate of this bug. ***
Srag, how is it going with your auto-vaccum? Though I see that will not help for these situations, neither the integrity_check, as with the table itself is nothing wrong, only some values are NULL. Thus I believe some test-before-use might be good to have there.
Milan, I haven't got time for that yet. Ideally its just a mail_ops task that runs once a month or so, to vaccum the accounts. Thatz the model I want to take. This mail-ops task, should not be a start up task, but just a task starts a bit late or idle.
*** Bug 583179 has been marked as a duplicate of this bug. ***
*** Bug 589498 has been marked as a duplicate of this bug. ***
Any news here? Patch available.
*** Bug 593216 has been marked as a duplicate of this bug. ***
*** Bug 593262 has been marked as a duplicate of this bug. ***
Would anyone dare to comment on the patch, instead of spending time identifying duplicates of the bug ? ;-)
Copy-paste of https://bugs.launchpad.net/evolution/+bug/339169: Using http://www.gnome.org/~sragavan/evolution-rebuild-summarydb stated that my DB was corrupt: $ ./evolution-rebuild-summarydb Rebuilding Table ./local/folders.db Rebuilding Table ./vfolder/folders.db Rebuilding Table ./imap/jwarnier@mail.b.n/folders.db SQL error: database disk image is malformed I'm using IMAP, so all my e-mail is stored on the server. I then completely deleted my local cache directory: ~/.evolution/mail/imap/jwarnier@mail.b.be/. I started Evolution, which resynchronized all my e-mail and is working again. Hope it helps even more people.
*** Bug 604937 has been marked as a duplicate of this bug. ***
The above bug #604937 contains more extended patch.
So this crash occurs when the uid or flags field is NULL; I haven't checked but I suspect that the rows are inserted and then later updated, so a crash between those transactions can create this situation without any sqlite level corruption. The callback has to be changed to handle NULL fields.
Oh, and the larger patch - http://bugzilla-attachments.gnome.org/attachment.cgi?id=150013 - is definitely the one to apply AFAICT. Meta: It seems nuts to me to close the patch with the better patch as the dup :). I'll link Ted's patch here to make it more accessible.
Created attachment 150750 [details] [review] Ted's more comprehensive patch.
*** Bug 622356 has been marked as a duplicate of this bug. ***
*** Bug 626794 has been marked as a duplicate of this bug. ***
*** Bug 619295 has been marked as a duplicate of this bug. ***
*** Bug 594756 has been marked as a duplicate of this bug. ***
*** Bug 606701 has been marked as a duplicate of this bug. ***
Created attachment 176129 [details] [review] eds patch for evolution-data-server; I merged idea from the above patches and from the patch from bug #606701, plus added a few of my ideas to it too, and this is the result. There are also a follow up changes in evolution-exchange and evolution-mapi, which I'm not going to attach here, but simply commit them. (They are using new API functions instead of EXTRACT_... macros.)
Created commit ceb9060 in eds master (2.91.4+) Created commit 7566563 in eex master (2.91.4+) Created commit 8db2654 in ema master (2.91.4+)
Really great to see that old and weird bugs like that get fixed eventually! ;-)
*** Bug 641865 has been marked as a duplicate of this bug. ***
Downstream bug report about the same from 2.32.2: https://bugzilla.redhat.com/show_bug.cgi?id=720010