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 621221 - imapx deadlock
imapx deadlock
Status: RESOLVED DUPLICATE of bug 617261
Product: evolution-data-server
Classification: Platform
Component: Mailer
2.30.x (obsolete)
Other Linux
: Normal normal
: ---
Assigned To: evolution-mail-maintainers
Evolution QA team
Depends on:
Blocks:
 
 
Reported: 2010-06-10 16:31 UTC by David Woodhouse
Modified: 2010-06-10 17:02 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description David Woodhouse 2010-06-10 16:31:31 UTC
Program received signal SIGINT, Interrupt.
0x00000031506d7e13 in poll () from /lib64/libc.so.6
(gdb) thread a a bt

Thread 24 (Thread 0x7fffbebfd710 (LWP 8596))

  • #0 __lll_lock_wait
    from /lib64/libpthread.so.0
  • #1 _L_lock_868
    from /lib64/libpthread.so.0
  • #2 pthread_mutex_lock
    from /lib64/libpthread.so.0
  • #3 g_static_rec_mutex_lock
    from /lib64/libglib-2.0.so.0
  • #4 camel_folder_summary_insert
    at camel-folder-summary.c line 2020
  • #5 camel_read_mir_callback
    at camel-folder-summary.c line 1273
  • #6 sqlite3_exec
    from /usr/lib64/libsqlite3.so.0
  • #7 camel_db_select
    at camel-db.c line 919
  • #8 camel_db_read_message_info_records
    at camel-db.c line 1787
  • #9 camel_folder_summary_reload_from_db
    at camel-folder-summary.c line 1024
  • #10 ??
    from /usr/lib64/evolution/2.30/libevolution-mail.so.0
  • #11 ??
  • #12 ??
    from /lib64/libglib-2.0.so.0
  • #13 ??
    from /lib64/libglib-2.0.so.0
  • #14 start_thread
    from /lib64/libpthread.so.0
  • #15 clone
    from /lib64/libc.so.6

Thread 20 (Thread 0x7fffdf5fe710 (LWP 8592))

  • #0 __lll_lock_wait
    from /lib64/libpthread.so.0
  • #1 _L_lock_868
    from /lib64/libpthread.so.0
  • #2 pthread_mutex_lock
    from /lib64/libpthread.so.0
  • #3 camel_db_select
  • #4 camel_db_read_message_info_record_with_uid
    at camel-db.c line 1769
  • #5 message_info_from_uid
    at camel-folder-summary.c line 580
  • #6 imapx_index_next
    at camel-imapx-server.c line 2910
  • #7 imapx_job_scan_changes_done
    at camel-imapx-server.c line 3087
  • #8 imapx_completion
    at camel-imapx-server.c line 1624
  • #9 imapx_step
    at camel-imapx-server.c line 1648
  • #10 parse_contents
    at camel-imapx-server.c line 3836
  • #11 imapx_parser_thread
    at camel-imapx-server.c line 3883
  • #12 ??
    from /lib64/libglib-2.0.so.0
  • #13 start_thread
    from /lib64/libpthread.so.0
  • #14 clone
    from /lib64/libc.so.6

Comment 1 David Woodhouse 2010-06-10 16:52:41 UTC
Classic AB-BA deadlock.

In Thread 20, frame #5 message_info_from_uid() we obtain the summary_lock.
Then in frame #3 camel_db_select() tries to get cdb->lock.

In Thread 24, frame #7 camel_db_select() holds cdb->lock.
Then in frame #4 folder_summary_insert() tries to get summary_lock.

Which order are these locks supposed to be obtained in? One of the above code paths is buggy.
Comment 2 Milan Crha 2010-06-10 17:02:34 UTC
Thanks for a bug report. With recent changes in gnome-2-30 (added recursive locks for the camel-folder-summary) one can do the same (almost the same) as in bug #617261 to avoid the bug. I'm marking this as a duplicate and I'm committing similar patch to gnome-2-30 of eds.

*** This bug has been marked as a duplicate of bug 617261 ***