GNOME Bugzilla – Bug 602319
Segfault on startup when database disk image is malformed
Last modified: 2021-05-19 11:56:02 UTC
After a hard shutdown, evolution now segfaults reproducably on startup for me, with this message: camel-imap-provider-Message: Unable to load summary: database disk image is malformed The program then segfaults here: Program received signal SIGSEGV, Segmentation fault.
+ Trace 219166
Thread 2986318704 (LWP 2870)
In frame 3, in vee_rebuild_folder: (gdb) p match->pdata[3] $13 = (gpointer) 0x0 and the segfault is upon trying to hash that NULL pointer with g_str_hash. This is on Fedora 11 with: evolution-2.26.3-1.fc11.i586 evolution-data-server-2.26.3-2.fc11.i586
I was able to work around this my moving the corrupted file out of the way: mv ~/.evolution/mail/imap/NAME_OF_ACCOUNT/folders.db \ ~/.evolution/mail/imap/NAME_OF_ACCOUNT/folders.db-old and Evolution was able to start up. (Ideally it ought to handle this case more gracefully, of course)
I have a proposal for doing both a database integrity check and a database vacuum at startup. Haven't formalized it anywhere yet, but it's kind of a combination of bug #573125 comment #2 and bug #595389 comment #15. One problem with blowing away the database, though, is that it stores not only message summaries but also user-defined tags and labels. They need to be split into separate databases so folders.db can be safely discarded. The other part of the problem is that database corruption tends to be caused by --force-shutdown, which immediately kills all evolution processes without even giving them a chance to shutdown cleanly. I have another proposal elsewhere to have --force-shutdown first -ask- the processes to shutdown gracefully and then kill the ones that don't respond.
BTW, in this context, "hard shutdown" involved holding the power button until the power to the machine was cut off :-(
Yeah, that would do it too.
Similar downstream bug report about some automatic action request to be done when the underlying camel database is corrupted: https://bugzilla.redhat.com/show_bug.cgi?id=656933
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org. As part of that, we are mass-closing older open tickets in bugzilla.gnome.org which have not seen updates for a longer time (resources are unfortunately quite limited so not every ticket can get handled). If you can still reproduce the situation described in this ticket in a recent and supported software version, then please follow https://wiki.gnome.org/Community/GettingInTouch/BugReportingGuidelines and create a new bug report ticket at https://gitlab.gnome.org/GNOME/evolution/-/issues/ Thank you for your understanding and your help.