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 666764 - SQL error migrating folders
SQL error migrating folders
Status: RESOLVED FIXED
Product: evolution-data-server
Classification: Platform
Component: general
3.2.x (obsolete)
Other Linux
: Normal normal
: ---
Assigned To: Evolution Shell Maintainers Team
Evolution QA team
Depends on:
Blocks:
 
 
Reported: 2011-12-23 12:49 UTC by Fabien Tassin
Modified: 2012-01-20 10:33 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
eds patch (1.61 KB, patch)
2012-01-20 10:33 UTC, Milan Crha
committed Details | Review

Description Fabien Tassin 2011-12-23 12:49:05 UTC
I'm getting lots of "GLib-WARNING **: GError set over the top of a previous GError or uninitialized memory." logs in my .xsession-errors related to IMAP & Folder migration.

GLib-WARNING **: GError set over the top of a previous GError or uninitialized memory.
This indicates a bug in someone's code. You must ensure an error is NULL before it's set.
The overwriting error message was: no such table: mem.INBOX/PERSO/zzz

digging into it gives me:

Program received signal SIGTRAP, Trace/breakpoint trap.
g_logv (log_domain=0x98d4ce "GLib", log_level=<optimized out>, 
    format=0x990e68 "GError set over the top of a previous GError or uninitialized memory.\nThis indicates a bug in someone's code. You must ensure an error is NULL before it's set.\nThe overwriting error message was: %s", 
    args1=0xb05fdc9c "\210B3\201\210\024a\200`\231", <incomplete sequence \332>) at /build/buildd/glib2.0-2.31.7+git20111222.3f3e141e/./glib/gmessages.c:765
765	in /build/buildd/glib2.0-2.31.7+git20111222.3f3e141e/./glib/gmessages.c
(gdb) bt
  • #0 g_logv
    at /build/buildd/glib2.0-2.31.7+git20111222.3f3e141e/./glib/gmessages.c line 765
  • #1 g_log
    at /build/buildd/glib2.0-2.31.7+git20111222.3f3e141e/./glib/gmessages.c line 792
  • #2 g_set_error
    at /build/buildd/glib2.0-2.31.7+git20111222.3f3e141e/./glib/gerror.c line 551
  • #3 cdb_sql_exec
    at camel-db.c line 397
  • #4 camel_db_migrate_folder_recreate
    at camel-db.c line 1495
  • #5 camel_db_prepare_message_info_table
    at camel-db.c line 1623
  • #6 save_message_infos_to_db
    at camel-folder-summary.c line 2201
  • #7 camel_folder_summary_save_to_db
    at camel-folder-summary.c line 2271
  • #8 camel_folder_summary_save_to_db
    at camel-folder-summary.c line 2239
  • #9 camel_imap_folder_changed
    at camel-imap-folder.c line 4427
  • #10 imap_rescan
    at camel-imap-folder.c line 1045
  • #11 camel_imap_folder_selected
    at camel-imap-folder.c line 658
  • #12 imap_refresh_info_sync
    at camel-imap-folder.c line 848
  • #13 camel_folder_refresh_info_sync
    at camel-folder.c line 3516
  • #14 refresh_folders_exec
    at mail-send-recv.c line 990
  • #15 mail_msg_proxy
    at mail-mt.c line 416
  • #16 g_thread_pool_thread_proxy
    at /build/buildd/glib2.0-2.31.7+git20111222.3f3e141e/./glib/gthreadpool.c line 317
  • #17 g_thread_proxy
    at /build/buildd/glib2.0-2.31.7+git20111222.3f3e141e/./glib/gthread.c line 801
  • #18 start_thread
    at pthread_create.c line 304
  • #19 clone
    at ../sysdeps/unix/sysv/linux/i386/clone.S line 130

I get one log per folder, each time evolution rechecks that IMAP account, over and over again. It's been doing that for weeks.
The SQL error here is 'no such table', most probably meaning the migration has already been done.
Maybe the 'DROP TABLE' there should be a 'DROP TABLE IF EXISTS' like at some other places in the camel code.

This is with evolution 3.2.2 and a pretty recent glib & gnome stack.
I didn't try evolution 3.3.x yet, but looking at trunk, camel-db.c doesn't seem to have changed.
Comment 1 Akhil Laddha 2011-12-26 03:44:51 UTC
From which evolution version did you upgrade to 3.2.2 ?

Regenerating folder db might help. You can follow steps mentioned in faq wiki [1]

[1] http://live.gnome.org/Evolution/FAQ#Why_do_I_get_an_error_.22Summary_and_folder_mismatch.2C_even_after_a_sync.22.3F
Comment 2 Fabien Tassin 2011-12-26 18:50:12 UTC
I'm a long time evolution user. I used all the versions that Ubuntu shipped over the years. Looking at my logs:
2.30.3 -> 2.32.0 -> 2.32.2 -> 3.0.0 -> 3.0.2 -> 3.1.2 -> 3.1.3 -> 3.1.4 -> 3.1.5 -> 3.1.92 -> 3.2.0 -> 3.2.1 -> 3.2.2

I looked at my .ibex.index files locally, I just have a few (Draft, Outbox, Sent & Templates) but the warnings I'm seeing are all about my IMAP folders, and there's no .ibex.index there (just a cmeta & a journal file per folder)
Comment 3 Milan Crha 2012-01-20 10:29:39 UTC
I can confirm this. The issue is that the "<tablename>_version" has set old version, and the code to migrate doesn't count with an issue of a nonexistent table.
Comment 4 Milan Crha 2012-01-20 10:33:04 UTC
Created attachment 205688 [details] [review]
eds patch

for evolution-data-server;

This fixes it for me.
Comment 5 Milan Crha 2012-01-20 10:33:54 UTC
Created commit cf05b71 in eds master (3.3.5+)