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 602319 - Segfault on startup when database disk image is malformed
Segfault on startup when database disk image is malformed
Status: RESOLVED OBSOLETE
Product: evolution
Classification: Applications
Component: Mailer
2.26.x (obsolete)
Other Linux
: Normal critical
: ---
Assigned To: evolution-mail-maintainers
Evolution QA team
evolution[disk-summary]
Depends on:
Blocks:
 
 
Reported: 2009-11-18 16:05 UTC by Dave Malcolm
Modified: 2021-05-19 11:56 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Dave Malcolm 2009-11-18 16:05:23 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.

Thread 2986318704 (LWP 2870)

  • #0 IA__g_str_hash
    at gstring.c line 95
  • #1 g_hash_table_lookup_node_for_insertion
    at ghash.c line 268
  • #2 g_hash_table_insert_internal
    at ghash.c line 862
  • #3 vee_rebuild_folder
    at camel-vee-folder.c line 1156
  • #4 vee_add_folder
    at camel-vee-folder.c line 1915
  • #5 camel_vee_folder_add_folder
    at camel-vee-folder.c line 225
  • #6 camel_store_get_folder
    at camel-store.c line 351
  • #7 mail_tool_uri_to_folder
    at mail-tools.c line 331
  • #8 get_folder_exec
    at mail-ops.c line 1220
  • #9 mail_msg_proxy
    at mail-mt.c line 520
  • #10 g_thread_pool_thread_proxy
    at gthreadpool.c line 265
  • #11 g_thread_create_proxy
    at gthread.c line 635
  • #4 vee_add_folder
    at camel-vee-folder.c line 1915
  • #5 camel_vee_folder_add_folder
    at camel-vee-folder.c line 225
  • #6 camel_store_get_folder
    at camel-store.c line 351
  • #7 mail_tool_uri_to_folder
    at mail-tools.c line 331
  • #8 get_folder_exec
    at mail-ops.c line 1220
  • #9 mail_msg_proxy
    at mail-mt.c line 520
  • #10 g_thread_pool_thread_proxy
    at gthreadpool.c line 265
  • #11 g_thread_create_proxy
    at gthread.c line 635

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
Comment 1 Dave Malcolm 2009-11-18 16:10:37 UTC
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)
Comment 2 Matthew Barnes 2009-11-18 16:58:56 UTC
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.
Comment 3 Dave Malcolm 2009-11-18 22:40:31 UTC
BTW, in this context, "hard shutdown" involved holding the power button until the power to the machine was cut off :-(
Comment 4 Matthew Barnes 2009-11-18 22:50:34 UTC
Yeah, that would do it too.
Comment 5 Milan Crha 2010-11-29 10:28:36 UTC
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
Comment 6 André Klapper 2021-05-19 11:56:02 UTC
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.