Bug 1644 - race condition between message move and mark as read after timeout
Summary: race condition between message move and mark as read after timeout
Status: RESOLVED FIXED
Alias: None
Product: Claws Mail (GTK 2)
Classification: Unclassified
Component: Folders/IMAP (show other bugs)
Version: 3.5.0
Hardware: PC Linux
: P3 normal
Assignee: users
URL:
: 1642 2145 2643 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-06-17 18:28 UTC by Paweł Paprota
Modified: 2014-05-22 21:41 UTC (History)
2 users (show)

See Also:


Attachments

Description Paweł Paprota 2008-06-17 18:28:57 UTC
Not reproducible, happened during "Building threads..." phase of displaying the message list.

Claws Mail version 3.4.0cvs96
GTK+ version 2.12.10 / GLib 2.16.3
Locale: en_US.utf8 (charset: UTF-8)
Features: IPv6 iconv compface OpenSSL LDAP GNU/aspell libetpan libSM
Operating system: Linux 2.6.25-ARCH (i686)
C Library: GNU libc 2.8
--
Using host libthread_db library "/lib/libthread_db.so.1".
[Thread debugging using libthread_db enabled]
[New Thread 0xb6e708e0 (LWP 7877)]
[New Thread 0xb696fb90 (LWP 7920)]
0xb7f35424 in __kernel_vsyscall ()
#0  0xb7f35424 in __kernel_vsyscall ()
No symbol table info available.
#1  0xb78c1acb in waitpid () from /lib/libpthread.so.0
No symbol table info available.
#2  0x080d0d6b in crash_handler (sig=11) at crash.c:547
	pid = 8012
	crashed_ = 1
#3  <signal handler called>
No symbol table info available.
#4  0xb77a7ac7 in g_str_hash () from /usr/lib/libglib-2.0.so.0
No symbol table info available.
#5  0xb7777947 in g_hash_table_lookup () from /usr/lib/libglib-2.0.so.0
No symbol table info available.
#6  0xb69dd80d in notification_notified_hash_msginfo_update ()
   from /usr/lib/claws-mail/plugins/notification_plugin.so
No symbol table info available.
#7  0xb69dc96d in my_msginfo_update_hook ()
   from /usr/lib/claws-mail/plugins/notification_plugin.so
No symbol table info available.
#8  0x08220099 in hooks_marshal (hook=0x99a4a80, data=0xbfb4f718)
    at hooks.c:107
	func = (gboolean (*)(gpointer, 
    gpointer)) 0xb69dc950 <my_msginfo_update_hook>
	marshal_data = (struct MarshalData *) 0xbfb4f718
#9  0xb7778dc0 in g_hook_list_marshal () from /usr/lib/libglib-2.0.so.0
No symbol table info available.
#10 0x08220152 in hooks_invoke (hooklist_name=0x8297e3b "msginfo_update", 
    source=0xbfb4f750) at hooks.c:125
	hooklist = (GHookList *) 0x9917710
	marshal_data = {source = 0xbfb4f750, abort = 0}
	__PRETTY_FUNCTION__ = "hooks_invoke"
#11 0x081c6525 in procmsg_msginfo_unset_flags (msginfo=0x9db2180, 
    perm_flags=3, tmp_flags=0) at procmsg.c:1961
	item = (FolderItem *) 0x99adcb0
	msginfo_update = {msginfo = 0x9db2180, flags = MSGINFO_UPDATE_FLAGS}
	perm_flags_new = 65536
	perm_flags_old = 65539
	tmp_flags_old = 0
	__PRETTY_FUNCTION__ = "procmsg_msginfo_unset_flags"
#12 0x081de478 in summary_msginfo_unset_flags (msginfo=0x9db2180, flags=3, 
    tmp_flags=0) at summaryview.c:3282
No locals.
#13 0x081de8fc in msginfo_mark_as_read (summaryview=0x98e8f00, 
    msginfo=0x9db2180, row=0x9eeae30) at summaryview.c:3366
	__PRETTY_FUNCTION__ = "msginfo_mark_as_read"
#14 0x081de972 in msginfo_mark_as_read_timeout (data=0x9e05f20)
    at summaryview.c:3385
	mdata = (MarkAsReadData *) 0x9e05f20
#15 0xb77856b6 in g_timeout_dispatch () from /usr/lib/libglib-2.0.so.0
No symbol table info available.
#16 0xb7784f88 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
No symbol table info available.
#17 0xb77884eb in g_main_context_iterate () from /usr/lib/libglib-2.0.so.0
No symbol table info available.
#18 0xb7788668 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
No symbol table info available.
#19 0xb7c0bcb4 in gtk_main_iteration () from /usr/lib/libgtk-x11-2.0.so.0
No symbol table info available.
#20 0x082115c9 in threaded_run (folder=0x99aab30, param=0xbfb4f984, 
    result=0xbfb4f978, func=0x8216200 <copy_run>) at imap-thread.c:428
	op = (struct etpan_thread_op *) 0x9dd9f60
	thread = (struct etpan_thread *) 0x9cffc68
#21 0x08216388 in imap_threaded_copy (folder=0x99aab30, set=0x9dc4628, 
    mb=0x9dd13c8 "INBOX/JIRA", source=0xbfb4fa08, dest=0xbfb4fa04)
    at imap-thread.c:3022
	param = {imap = 0x9de9008, set = 0x9dc4628, 
  mb = 0x9dd13c8 "INBOX/JIRA"}
	result = {error = 0, source = 0xb60088b8, dest = 0xb6016570}
	imap = (mailimap *) 0x9de9008
#22 0x0811240f in imap_cmd_copy (session=0x9ed08e8, set=0x9dc4628, 
    destfolder=0x9dd13c8 "INBOX/JIRA", uid_mapping=0x9e08b18, 
    source=0xbfb4fa08, dest=0xbfb4fa04) at imap.c:3726
	r = 164416088
	__PRETTY_FUNCTION__ = "imap_cmd_copy"
#23 0x0810d2be in imap_do_copy_msgs (folder=0x99aab30, dest=0x99be6f8, 
    msglist=0x9df4920, relation=0x9f843d8) at imap.c:1793
	seq_set = (struct mailimap_set *) 0x9dc4628
	source = (struct mailimap_set *) 0x0
	dest = (struct mailimap_set *) 0x0
	src = (FolderItem *) 0x99bd928
	destdir = (gchar *) 0x9dd13c8 "INBOX/JIRA"
	seq_list = (GSList *) 0x9e8b3a0
	cur = (GSList *) 0x9e8b3a0
	msginfo = (MsgInfo *) 0x9fbf9c8
	session = (IMAPSession *) 0x9ed08e8
	ok = 0
	uid_mapping = (GRelation *) 0x9e08b18
	last_num = 0
	single = 0
	__PRETTY_FUNCTION__ = "imap_do_copy_msgs"
#24 0x0810d88c in imap_copy_msgs (folder=0x99aab30, dest=0x99be6f8, 
    msglist=0x9df4920, relation=0x9f843d8) at imap.c:1922
	msginfo = (MsgInfo *) 0x9fbf9c8
	ret = -1078657240
	__PRETTY_FUNCTION__ = "imap_copy_msgs"
#25 0x080f6302 in do_copy_msgs (dest=0x99be6f8, msglist=0x9df4920, 
    remove_source=1) at folder.c:3314
	folder = (Folder *) 0x99aab30
	l = (GSList *) 0x0
	num = -1208897260
	lastnum = -1
	folderscan = 0
	relation = (GRelation *) 0x9f843d8
	not_moved = (GSList *) 0x0
	total = 0
	curmsg = 0
	msginfo = (MsgInfo *) 0x9fbf9c8
	__PRETTY_FUNCTION__ = "do_copy_msgs"
#26 0x080f6a6a in folder_item_move_msgs (dest=0x99be6f8, msglist=0x9df4920)
    at folder.c:3508
	result = -1
	__PRETTY_FUNCTION__ = "folder_item_move_msgs"
#27 0x080ebdaa in filtering_move_and_copy_msgs (msgs=0x9ccb558)
    at filtering.c:246
	info = (MsgInfo *) 0x9fbf9c8
	batch = (GSList *) 0x9df4920
	cur = (GSList *) 0x0
	found = 7
	messages = (GSList *) 0x9ccb880
	last_item = (FolderItem *) 0x99be6f8
	cur_op = IS_MOVE
#28 0x080f3564 in folder_item_scan_full (item=0x99bd928, filtering=1)
    at folder.c:2250
	unfiltered = (GSList *) 0x9daa1c8
	elem = (GSList *) 0x0
	to_filter = (GSList *) 0x99a9848
	do_filter = 1
	folder = (Folder *) 0x99aab30
	folder_list = (GSList *) 0x9cca058
	cache_list = (GSList *) 0x9e8b5d0
	folder_list_cur = (GSList *) 0x0
	cache_list_cur = (GSList *) 0x0
	new_list = (GSList *) 0x9dab3a0
	exists_list = (GSList *) 0x9dab558
	elem = (GSList *) 0x822a366
	newmsg_list = (GSList *) 0x9ccb558
	newcnt = 0
	unreadcnt = 0
	totalcnt = 0
	markedcnt = 0
	unreadmarkedcnt = 0
	repliedcnt = 0
	forwardedcnt = 0
	lockedcnt = 0
	ignoredcnt = 0
	watchedcnt = 0
	cache_max_num = 2802
	folder_max_num = 2822
	cache_cur_num = 2147483647
	folder_cur_num = 2147483647
	update_flags = 0
	old_uids_valid = 1
	subject_table = (GHashTable *) 0x9dd9368
	__PRETTY_FUNCTION__ = "folder_item_scan_full"
#29 0x080f3b1c in folder_item_scan (item=0x99bd928) at folder.c:2373
No locals.
#30 0x080fe817 in folderview_check_new (folder=0x99aab30) at folderview.c:1270
	str = (gchar *) 0x9ed8828 ""
	list = (GList *) 0x98e8bd0
	item = (FolderItem *) 0x99bd928
	folderview = (FolderView *) 0x989fe88
	ctree = (GtkCTree *) 0x980f180
	node = (GtkCTreeNode *) 0x99bb740
	new_msgs = 0
	former_new_msgs = 0
	former_new = 0
	former_unread = 0
	former_total = 339
#31 0x0811e160 in inc_all_account_mail (mainwin=0x981f308, autocheck=0, 
    notify=0) at inc.c:366
	account = (PrefsAccount *) 0x9964a20
	list = (GList *) 0x9964280
	queue_list = (GList *) 0x0
	inc_dialog = (IncProgressDialog *) 0x0
	new_msgs = 4
	account_new_msgs = 0
#32 0x08203863 in inc_all_account_mail_cb (data=0x981f308, action=0, 
    widget=0x0) at toolbar.c:2521
	mainwin = (MainWindow *) 0x981f308
#33 0x081f6503 in toolbar_inc_all_cb (widget=0x98870a8, data=0x9885ce0)
    at toolbar.c:1077
	toolbar_item = (ToolbarItem *) 0x9885ce0
	mainwin = (MainWindow *) 0x981f308
	__PRETTY_FUNCTION__ = "toolbar_inc_all_cb"
#34 0x081f755b in toolbar_buttons_cb (widget=0x98870a8, item=0x9885ce0)
    at toolbar.c:1729
	num_items = 36
	i = 0
	callbacks = {{index = 0, func = 0x81f64a5 <toolbar_inc_all_cb>}, {
    index = 1, func = 0x81f6445 <toolbar_inc_cb>}, {index = 2, 
    func = 0x81f6505 <toolbar_send_queued_cb>}, {index = 3, 
    func = 0x81f6743 <toolbar_compose_cb>}, {index = 4, 
    func = 0x81f6743 <toolbar_compose_cb>}, {index = 5, 
    func = 0x81f6a2c <toolbar_reply_cb>}, {index = 6, 
    func = 0x81f6ac5 <toolbar_reply_to_sender_cb>}, {index = 7, 
    func = 0x81f6a5f <toolbar_reply_to_all_cb>}, {index = 8, 
    func = 0x81f6a92 <toolbar_reply_to_list_cb>}, {index = 10, 
    func = 0x81f6b62 <toolbar_forward_cb>}, {index = 11, 
    func = 0x81f65ad <toolbar_trash_cb>}, {index = 12, 
    func = 0x81f6678 <toolbar_delete_cb>}, {index = 13, 
    func = 0x81f6565 <toolbar_exec_cb>}, {index = 14, 
    func = 0x81f6b7d <toolbar_prev_unread_cb>}, {index = 15, 
    func = 0x81f6ce8 <toolbar_next_unread_cb>}, {index = 16, 
    func = 0x81f6e53 <toolbar_ignore_thread_cb>}, {index = 17, 
    func = 0x81f6ee5 <toolbar_watch_thread_cb>}, {index = 18, 
    func = 0x81f6fb3 <toolbar_print_cb>}, {index = 19, 
    func = 0x81f692a <toolbar_learn_cb>}, {index = 20, 
    func = 0x81f7441 <toolbar_go_folders_cb>}, {index = 22, 
    func = 0x81f7045 <toolbar_send_cb>}, {index = 23, 
    func = 0x81f7060 <toolbar_send_later_cb>}, {index = 24, 
    func = 0x81f707b <toolbar_draft_cb>}, {index = 9, 
    func = 0x81f713a <toolbar_open_mail_cb>}, {index = 35, 
    func = 0x81f7096 <toolbar_close_cb>}, {index = 21, 
    func = 0x81f712d <toolbar_preferences_cb>}, {index = 25, 
    func = 0x81f7212 <toolbar_insert_cb>}, {index = 26, 
    func = 0x81f722d <toolbar_attach_cb>}, {index = 27, 
    func = 0x81f7248 <toolbar_sig_cb>}, {index = 28, 
    func = 0x81f7263 <toolbar_ext_editor_cb>}, {index = 29, 
    func = 0x81f727e <toolbar_linewrap_current_cb>}, {index = 30, 
    func = 0x81f7299 <toolbar_linewrap_all_cb>}, {index = 31, 
    func = 0x81f6af8 <toolbar_addrbook_cb>}, {index = 32, 
    func = 0x81f72b4 <toolbar_check_spelling_cb>}, {index = 33, 
    func = 0x81f72cf <toolbar_actions_execute_cb>}, {index = 34, 
    func = 0x81f6f77 <toolbar_cancel_inc_cb>}}
#35 0xb7817114 in g_cclosure_marshal_VOID__VOID ()
   from /usr/lib/libgobject-2.0.so.0
No symbol table info available.
#36 0xb7809b0b in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
No symbol table info available.
#37 0xb781cd17 in signal_emit_unlocked_R () from /usr/lib/libgobject-2.0.so.0
No symbol table info available.
#38 0xb781e1be in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0
No symbol table info available.
#39 0xb781e4a5 in g_signal_emit_by_name () from /usr/lib/libgobject-2.0.so.0
No symbol table info available.
#40 0xb7ced2b7 in button_clicked () from /usr/lib/libgtk-x11-2.0.so.0
No symbol table info available.
#41 0xb7817114 in g_cclosure_marshal_VOID__VOID ()
   from /usr/lib/libgobject-2.0.so.0
No symbol table info available.
#42 0xb7809b0b in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
No symbol table info available.
#43 0xb781cd17 in signal_emit_unlocked_R () from /usr/lib/libgobject-2.0.so.0
No symbol table info available.
#44 0xb781e1be in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0
No symbol table info available.
#45 0xb781e606 in g_signal_emit () from /usr/lib/libgobject-2.0.so.0
No symbol table info available.
#46 0xb7b33b7a in gtk_button_clicked () from /usr/lib/libgtk-x11-2.0.so.0
No symbol table info available.
#47 0xb7b34d38 in gtk_real_button_released () from /usr/lib/libgtk-x11-2.0.so.0
No symbol table info available.
#48 0xb7817114 in g_cclosure_marshal_VOID__VOID ()
   from /usr/lib/libgobject-2.0.so.0
No symbol table info available.
#49 0xb7808289 in g_type_class_meta_marshal ()
   from /usr/lib/libgobject-2.0.so.0
No symbol table info available.
#50 0xb7809b0b in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
No symbol table info available.
#51 0xb781c590 in signal_emit_unlocked_R () from /usr/lib/libgobject-2.0.so.0
No symbol table info available.
#52 0xb781e1be in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0
No symbol table info available.
#53 0xb781e606 in g_signal_emit () from /usr/lib/libgobject-2.0.so.0
No symbol table info available.
#54 0xb7b33c1a in gtk_button_released () from /usr/lib/libgtk-x11-2.0.so.0
No symbol table info available.
#55 0xb7b33c53 in gtk_button_button_release ()
   from /usr/lib/libgtk-x11-2.0.so.0
No symbol table info available.
#56 0xb7c119c6 in _gtk_marshal_BOOLEAN__BOXED ()
   from /usr/lib/libgtk-x11-2.0.so.0
No symbol table info available.
#57 0xb7808289 in g_type_class_meta_marshal ()
   from /usr/lib/libgobject-2.0.so.0
No symbol table info available.
#58 0xb7809b0b in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
No symbol table info available.
#59 0xb781c9cf in signal_emit_unlocked_R () from /usr/lib/libgobject-2.0.so.0
No symbol table info available.
#60 0xb781e04c in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0
No symbol table info available.
#61 0xb781e606 in g_signal_emit () from /usr/lib/libgobject-2.0.so.0
No symbol table info available.
#62 0xb7d3956e in gtk_widget_event_internal ()
   from /usr/lib/libgtk-x11-2.0.so.0
No symbol table info available.
#63 0xb7c0a64c in gtk_propagate_event () from /usr/lib/libgtk-x11-2.0.so.0
No symbol table info available.
#64 0xb7c0b91f in gtk_main_do_event () from /usr/lib/libgtk-x11-2.0.so.0
No symbol table info available.
#65 0xb7a7f3fa in gdk_event_dispatch () from /usr/lib/libgdk-x11-2.0.so.0
No symbol table info available.
#66 0xb7784f88 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
No symbol table info available.
#67 0xb77884eb in g_main_context_iterate () from /usr/lib/libglib-2.0.so.0
No symbol table info available.
#68 0xb77889ba in g_main_loop_run () from /usr/lib/libglib-2.0.so.0
No symbol table info available.
#69 0xb7c0be59 in gtk_main () from /usr/lib/libgtk-x11-2.0.so.0
No symbol table info available.
#70 0x0812edca in main (argc=1, argv=0xbfb514f4) at main.c:1629
	connection = (DBusGConnection *) 0x97ee94c
	error = (GError *) 0x0
	userrc = (gchar *) 0x97f3030 "/home/ppawel/.claws-mail/imapcache"
	mainwin = (MainWindow *) 0x981f308
	folderview = (FolderView *) 0x989fe88
	icon = (GdkPixbuf *) 0x98085a8
	crash_file_present = 0
	num_folder_class = 4
	asked_for_migration = 0
	start_done = 1
	start = {tv_sec = 1213719658, tv_usec = 566724}
	end = {tv_sec = 1213719665, tv_usec = 46570}
	diff = {tv_sec = 6, tv_usec = 479846}
	timing_name = 0x827bc9f "startup"
	__FUNCTION__ = "main"
Kill the program being debugged? (y or n) [answered Y; input not from terminal]
Comment 1 Holger Berndt 2008-06-17 18:39:25 UTC
You don't happen to have a --debug log of that crash, do you?
Comment 2 Pawe&#322; Paprota 2008-06-17 19:00:00 UTC
Nope.
Comment 3 Colin Leroy 2008-06-17 22:29:12 UTC
I'd say Notification ;)
Comment 4 Holger Berndt 2008-06-17 22:34:14 UTC
(In reply to comment #3)
> I'd say Notification ;)

I'd say not :p

To me, it looks like notification gets called with a garbage (non-NULL) msgid.
Comment 5 Colin Leroy 2008-06-18 08:36:49 UTC
Do you happen to have "Mark as read after N seconds" set?
Comment 6 Pawe&#322; Paprota 2008-06-18 09:42:07 UTC
Yes, it is set to 1 second.
Comment 7 Colin Leroy 2008-06-18 09:46:07 UTC
Thanks, and was the currently opened mail in the list of mails to move?
Comment 8 Colin Leroy 2008-06-18 09:47:50 UTC
*** Bug 1642 has been marked as a duplicate of this bug. ***
Comment 9 users 2014-05-01 11:08:05 UTC
Changes related to this bug have been committed.
Please check latest Git and update the bug accordingly.
You can also get the patch from:
http://git.claws-mail.org/

++ ChangeLog	2014-05-01 11:08:05.059847812 +0200
http://git.claws-mail.org/?p=claws.git;a=commitdiff;h=2f82c4d478562869a5c1740326d13f269bedc6f4
Merge: ec473b1 cbcbd9f
Author: Colin Leroy <colin@colino.net>
Date:   Thu May 1 11:08:04 2014 +0200

    Merge branch 'master' of file:///home/git/claws

http://git.claws-mail.org/?p=claws.git;a=commitdiff;h=cbcbd9f670977dc662cc57ffc16c9da0785d09e5
Author: Colin Leroy <colin@colino.net>
Date:   Thu May 1 11:07:02 2014 +0200

    Better fix: cancel cb also when moving, exec'ing, etc

http://git.claws-mail.org/?p=claws.git;a=commitdiff;h=69ad42ac63e99ea220f04043b6fc832f57654ff4
Author: Colin Leroy <colin@colino.net>
Date:   Thu May 1 10:54:47 2014 +0200

    Track the mark-as-read timeout to be able to cancel it properly
    when changing message or folder. Should fix bug #1644, "race condition
    between message move and mark as read after timeout", bug #2145 "Claws
    becomes unresponsive and gets Killed while moving messages between imap
    folders", and bug #2643 "claws crash when accessing imap folder"

http://git.claws-mail.org/?p=claws.git;a=commitdiff;h=37c645c548099e584a0e81a0b50d412d397e1d61
Author: Colin Leroy <colin@colino.net>
Date:   Thu May 1 10:19:56 2014 +0200

    Better fix

http://git.claws-mail.org/?p=claws.git;a=commitdiff;h=3b9495ffd45462514899cf4d247e9703dcf5e748
Author: Colin Leroy <colin@colino.net>
Date:   Thu May 1 10:18:57 2014 +0200

    Fix type
Comment 10 Colin Leroy 2014-05-01 11:09:09 UTC
*** Bug 2145 has been marked as a duplicate of this bug. ***
Comment 11 Colin Leroy 2014-05-01 11:10:40 UTC
*** Bug 2643 has been marked as a duplicate of this bug. ***
Comment 12 Colin Leroy 2014-05-22 21:41:29 UTC
Marking fixed :)

Note You need to log in before you can comment on or make changes to this bug.