Bug 3055 - Claws segfaults when cancelling a sticky search after changing folder
Summary: Claws segfaults when cancelling a sticky search after changing folder
Status: RESOLVED FIXED
Alias: None
Product: Claws Mail
Classification: Unclassified
Component: QuickSearch (show other bugs)
Version: 3.10.0
Hardware: PC Linux
: P3 normal
Assignee: users
URL:
Depends on:
Blocks:
 
Reported: 2014-01-10 03:20 CET by Philippe Gramoull
Modified: 2014-04-08 20:37 CEST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Philippe Gramoull 2014-01-10 03:20:39 CET
Hi,

Claws version : version 3.9.2-102-gc035b6-dirty
Linux 3.9-1-686-pae #1 SMP Debian 3.9.8-1 i686 GNU/Linux

Steps to reproduce:

1/ Go to a folder, do an Extended search, with sticky mode enabled
2/ Change directory (i go to my main inbox folder with many mails in it)
3/ As i realize that it will take quite some time, i hit the "Clear" button
3/ Claws segfaults

Below is a backtrace of the segfault

I'll try to update to latest GIT soon in case the problem has already been fixed. 

Truly yours,

Philippe


(gdb) file /usr/local/sylpheed-claws-cvs-gtk2/bin/claws-mail
Reading symbols from /usr/local/sylpheed-claws-cvs-gtk2/bin/claws-mail...done.
(gdb) r
Starting program: /usr/local/sylpheed-claws-cvs-gtk2/bin/claws-mail 
warning: Could not load shared library symbols for linux-gate.so.1.
Do you need "set solib-search-path" or "set sysroot"?
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/i386-linux-gnu/i686/cmov/libthread_db.so.1".


(claws-mail:19713): Claws-Mail-WARNING **: sc_html_get_tag(): syntax error in tag: 'a href="http://www.target.com/exec/obidos/flex-sign-in/?opt=a&page=help/ya-sign-in-secure.html&response=subst/products/services/new-for-you/email-management.html&return-url-code=3'



Program received signal SIGSEGV, Segmentation fault.
0x081170ab in matcherlist_match (matchers=0x8437418, info=0xace1250) at matcher.c:1815
1815                    MatcherProp *matcher = (MatcherProp *) l->data;
(gdb) 
(gdb) thread apply all bt full

Thread 1 (Thread 0xb631d900 (LWP 19713)):
#0  0x081170ab in matcherlist_match (matchers=0x8437418, info=0xace1250) at matcher.c:1815
        matcher = 0x9649260
        l = 0x11
        result = 1
#1  0x080d6721 in folder_item_search_msgs_local (folder=0x8770498, container=0x87fa8e8, msgs=0xbfffd180, 
    on_server=0xbfffd17c, predicate=0x8437418, progress_cb=0x8095688 <search_progress_notify_cb>, 
    progress_data=0x8619820) at folder.c:4806
        msgnum = 33195
        msg = 0xace1250
        result = 0x0
        cur = 0x94fe800
        matched_count = 0
        processed_count = 300
        msgcount = 7863
        nums = 0x94fd980
#2  0x080d65e0 in folder_item_search_msgs (folder=0x8770498, container=0x87fa8e8, msgs=0xbfffd180, 
    on_server=0xbfffd17c, predicate=0x8437418, progress_cb=0x8095688 <search_progress_notify_cb>, 
    progress_data=0x8619820) at folder.c:4749
        result = -1
#3  0x0809572c in search_filter_folder (msgnums=0xbfffd180, search=0x8619820, folderItem=0x87fa8e8, 
    onServer=0) at advsearch.c:472
        matched = 0
        tried_server = 0
#4  0x080958db in search_impl (messages=0xbfffd270, search=0x8619820, folderItem=0x87fa8e8, recursive=0)
    at advsearch.c:515
        msgnums = 0x0
        cur = 0x800008
        msgs = 0x0
        can_search_on_server = 0
#5  0x08094955 in advsearch_search_msgs_in_folders (search=0x8619820, messages=0xbfffd270, 
    folderItem=0x87fa8e8, recursive=0) at advsearch.c:124
No locals.
#6  0x082d6077 in quicksearch_run_on_folder (quicksearch=0x86197b8, folderItem=0x87fa8e8, result=0xbfffd270)
---Type <return> to continue, or q <return> to quit--- 
    at quicksearch.c:172
        searchres = 0
#7  0x081c757e in summary_show (summaryview=0x860e6c0, item=0x87fa8e8) at summaryview.c:1373
        start = {tv_sec = 1389318455, tv_usec = 634302}
        end = {tv_sec = -1213708615, tv_usec = -1228992512}
        diff = {tv_sec = 139088432, tv_usec = 0}
        timing_name = 0x8388ae4 "quicksearch"
        ctree = 0x84cc4c0
        node = 0x0
        mlist = 0x0
        buf = 0x8b93ce0 "Searching in inbox... "
        is_refresh = 0
        selected_msgnum = 0
        displayed_msgnum = 0
        cur = 0x865cde0
        not_killed = 0x810b371 <main_window_cursor_normal+96>
        hidden_removed = 0
        start = {tv_sec = 1389318455, tv_usec = 622207}
        end = {tv_sec = 139019776, tv_usec = -1073753488}
        diff = {tv_sec = -1073753384, tv_usec = -1230039941}
        timing_name = 0x8388221 ""
        __FUNCTION__ = "summary_show"
#8  0x080df458 in folderview_selected (ctree=0x84cc200, row=0x882c070, column=-1, folderview=0x85ce578)
    at folderview.c:2214
        can_select = 0
        opened = 0
        item = 0x87fa8e8
        buf = 0x8f1c6c8 "4A7F1170.3020307@abcd.fr"
        res = 0
        old_opened = 0x8836ba0
        start = {tv_sec = 1389318455, tv_usec = 467120}
        end = {tv_sec = 139248128, tv_usec = -1073753256}
        diff = {tv_sec = 0, tv_usec = 138286600}
        timing_name = 0x82e996f ""
        __FUNCTION__ = "folderview_selected"
---Type <return> to continue, or q <return> to quit---
#9  0x082ddf5a in claws_marshal_VOID__POINTER_INT (closure=0x8605978, return_value=0x0, n_param_values=3, 
    param_values=0xbfffd4c0, invocation_hint=0xbfffd46c, marshal_data=0x0) at claws-marshal.c:348
        data1 = 0x84cc200
        data2 = 0x85ce578
        __PRETTY_FUNCTION__ = "claws_marshal_VOID__POINTER_INT"
#10 0xb767369e in g_closure_invoke () from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0
No symbol table info available.
#11 0xb7685149 in ?? () from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0
No symbol table info available.
#12 0xb768cb85 in g_signal_emit_valist () from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0
No symbol table info available.
#13 0xb768cdd3 in g_signal_emit () from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0
No symbol table info available.
#14 0x0829cc43 in gtk_cmctree_select (ctree=0x84cc200, node=0x882c070) at gtkcmctree.c:3903
No locals.
#15 0x082975fb in real_unselect_all (clist=0x84cc200) at gtkcmctree.c:2881
        ctree = 0x84cc200
        node = 0xb7696b1c <g_type_value_table_peek+12>
        list = 0x83e1608
#16 0x082c2465 in gtk_sctree_real_unselect_all (clist=0x84cc200) at gtksctree.c:792
        sctree = 0x84cc200
        should_freeze = 0
#17 0x082b1251 in gtk_cmclist_unselect_all (clist=0x84cc200) at gtkcmclist.c:3666
No locals.
#18 0x082c0e27 in select_row (sctree=0x84cc200, row=1, col=0, state=0, _node=0x0) at gtksctree.c:383
        range = 0
        additive = 0
#19 0x082c1907 in gtk_sctree_button_press (widget=0x84cc200, event=0x8859960) at gtksctree.c:554
        sctree = 0x84cc200
        clist = 0x84cc200
        on_row = 1
        row = 1
        col = 0
        retval = 0
#20 0xb7c24b8e in ?? () from /usr/lib/i386-linux-gnu/libgtk-x11-2.0.so.0
---Type <return> to continue, or q <return> to quit---
No symbol table info available.
#21 0xb76721c4 in ?? () from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0
No symbol table info available.
#22 0xb767369e in g_closure_invoke () from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0
No symbol table info available.
#23 0xb7684da0 in ?? () from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0
No symbol table info available.
#24 0xb768c884 in g_signal_emit_valist () from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0
No symbol table info available.
#25 0xb768cdd3 in g_signal_emit () from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0
No symbol table info available.
#26 0xb7d517a3 in ?? () from /usr/lib/i386-linux-gnu/libgtk-x11-2.0.so.0
No symbol table info available.
#27 0xb7c22f64 in gtk_propagate_event () from /usr/lib/i386-linux-gnu/libgtk-x11-2.0.so.0
No symbol table info available.
#28 0xb7c23360 in gtk_main_do_event () from /usr/lib/i386-linux-gnu/libgtk-x11-2.0.so.0
No symbol table info available.
#29 0xb7a9df38 in ?? () from /usr/lib/i386-linux-gnu/libgdk-x11-2.0.so.0
No symbol table info available.
#30 0xb75a942e in g_main_context_dispatch () from /lib/i386-linux-gnu/libglib-2.0.so.0
No symbol table info available.
#31 0xb75a97d8 in ?? () from /lib/i386-linux-gnu/libglib-2.0.so.0
No symbol table info available.
#32 0xb75a9c3b in g_main_loop_run () from /lib/i386-linux-gnu/libglib-2.0.so.0
No symbol table info available.
#33 0xb7c22140 in gtk_main () from /usr/lib/i386-linux-gnu/libgtk-x11-2.0.so.0
No symbol table info available.
#34 0x080fe7f3 in main (argc=1, argv=0xbffff624) at main.c:1551
        userrc = 0x84936c8 "/home/claws/.claws-mail/imapcache"
        mainwin = 0x84cb3c8
        folderview = 0x85ce578
        icon = 0x84c7d30
        crash_file_present = 1
        num_folder_class = 13
        asked_for_migration = 0
---Type <return> to continue, or q <return> to quit---
        start_done = 1
        plug_list = 0x0
        never_ran = 0
        mainwin_shown = 1
        start = {tv_sec = 1389318400, tv_usec = 841250}
        end = {tv_sec = 1389318425, tv_usec = 761207}
        diff = {tv_sec = 24, tv_usec = 919957}
        timing_name = 0x82ef1d3 "startup"
        __FUNCTION__ = "main"
(gdb)
Comment 1 Philippe Gramoull 2014-01-11 22:49:12 CET
Hi,

Updated claws to 3.9.3-9-g597f1d-dirty

Segfault still happens. backtrace is almost identical, so i have included only last calls

Thanks

Philippe


(gdb) thread apply all bt full

Thread 1 (Thread 0xb6320900 (LWP 481)):
#0  0x081175a0 in matcherlist_match (matchers=0x88cbbf0, info=0x87e1500) at matcher.c:1823
        matcher = 0x10
        l = 0x865b0f8
        result = 1
#1  0x080d6a36 in folder_item_search_msgs_local (folder=0x877a140, container=0x8804558, msgs=0xbfffd180, 
    on_server=0xbfffd17c, predicate=0x88cbbf0, progress_cb=0x809583d <search_progress_notify_cb>, progress_data=0x8623308)
    at folder.c:4818
        msgnum = 32865
        msg = 0x87e1500
        result = 0x0
        cur = 0x95cddb8
        matched_count = 0
        processed_count = 100
        msgcount = 7732
        nums = 0x95cd9c0
#2  0x080d68f5 in folder_item_search_msgs (folder=0x877a140, container=0x8804558, msgs=0xbfffd180, on_server=0xbfffd17c, 
    predicate=0x88cbbf0, progress_cb=0x809583d <search_progress_notify_cb>, progress_data=0x8623308) at folder.c:4761
        result = -1
#3  0x080958e1 in search_filter_folder (msgnums=0xbfffd180, search=0x8623308, folderItem=0x8804558, onServer=0)
    at advsearch.c:472
        matched = 0
        tried_server = 0
#4  0x08095a90 in search_impl (messages=0xbfffd270, search=0x8623308, folderItem=0x8804558, recursive=0)
    at advsearch.c:515
        msgnums = 0x0
        cur = 0x800008
        msgs = 0x0
        can_search_on_server = 0
#5  0x08094b0a in advsearch_search_msgs_in_folders (search=0x8623308, messages=0xbfffd270, folderItem=0x8804558, 
    recursive=0) at advsearch.c:124
No locals.
#6  0x082d67df in quicksearch_run_on_folder (quicksearch=0x86232a0, folderItem=0x8804558, result=0xbfffd270)
    at quicksearch.c:172
        searchres = 0
Comment 2 Paul 2014-03-21 07:51:34 CET
please re-open if you are able to reproduce this. I tried but failed to reproduce it.
Comment 3 Philippe Gramoull 2014-03-21 23:51:45 CET
Hi,

I reopened the bug as it still happens for me with latest GIT.

To trigger the bug, i made the following extended search: B "some text"
, switched to my main inbox (9000+ mails), and hit "clear" when CM had searched about 900 mails (~10%)

-> CM segfaults one or two seconds later.

Thanks

Philippe
Comment 4 Colin Leroy 2014-04-08 16:14:38 CEST
I can reproduce - although at the start I missed the necessary "sticky" and "after changing folder" part :)
Comment 5 users 2014-04-08 16:44:06 CEST
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-04-08 16:44:04.115909636 +0200
http://git.claws-mail.org/?p=claws.git;a=commitdiff;h=ef42e8c103984198a04ed73c6883b88e0481d08e
Merge: b5860f9 2baec79
Author: Colin Leroy <colin@colino.net>
Date:   Tue Apr 8 16:44:03 2014 +0200

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

http://git.claws-mail.org/?p=claws.git;a=commitdiff;h=2baec79262e41790484f46e9b3b9ccc5b3f49983
Author: Colin Leroy <colin@colino.net>
Date:   Tue Apr 8 16:42:25 2014 +0200

    Probably fix bug #3050, "Claws mail closes when one attempts to delete a tag"

http://git.claws-mail.org/?p=claws.git;a=commitdiff;h=5b2da67e96294dd8906d5231e1aa8dc0375737cc
Author: Colin Leroy <colin@colino.net>
Date:   Tue Apr 8 16:13:04 2014 +0200

    Fix bug #3055, "Claws segfaults when cancelling a sticky search
    after changing folder"

http://git.claws-mail.org/?p=claws.git;a=commitdiff;h=d8c5586abe9e3657f28e2fc002788af3f7de5a45
Author: Colin Leroy <colin@colino.net>
Date:   Tue Apr 8 15:34:51 2014 +0200

    Fix bug #3123, "Clean up git". Patch by Christian Hesse.
Comment 6 Colin Leroy 2014-04-08 17:01:45 CEST
Marking FIXED!
Comment 7 Philippe Gramoull 2014-04-08 20:37:58 CEST
Hi Colin,

You rock, as usual !!

I can confirm that i don't have that bug anymore :)

Thanks & Cheers

Philippe

PS: ça déchire, ca tabasse, comme d'hab', bref, encore merci ! :)