[Users] [Bug 2953] New: cm leaks memory when connection fails
noreply at thewildbeast.co.uk
noreply at thewildbeast.co.uk
Sun Jun 30 02:38:11 CEST 2013
http://www.thewildbeast.co.uk/claws-mail/bugzilla/show_bug.cgi?id=2953
Bug ID: 2953
Summary: cm leaks memory when connection fails
Classification: Unclassified
Product: Claws Mail
Version: GIT
Hardware: Other
OS: Linux
Status: NEW
Severity: normal
Priority: P3
Component: Folders
Assignee: users at lists.claws-mail.org
Reporter: kardan at riseup.net
Created attachment 1278
-->
http://www.thewildbeast.co.uk/claws-mail/bugzilla/attachment.cgi?id=1278&action=edit
gdb ran claws overnight and greeted with a "double linked list" in the morning.
* Two times I saw "double linked list" with gdb so far
* SIGSEGV happends regularly when connection is dropped while IMAP downloads
are ongoing
If you inspect cm with valgrind and plugoff the ethernet cable you will see lot
of messages like the following.
$ valgrind --leak-check=yes claws-mail --debug
==26371== Memcheck, a memory error detector
==26371== Copyright (C) 2002-2012, and GNU GPL'd, by Julian Seward et al.
==26371== Using Valgrind-3.8.1 and LibVEX; rerun with -h for copyright info
==26371== Command: claws-mail --debug
==26371==
msgcache.c:603: Reading swapped message cache from
.claws-mail/imapcache//Queue/.claws_cach
e...
msgcache.c:619:using Noop Converter
msgcache.c:791:done. (0 items read)
msgcache.c:792:Cache size: 0 messages, 0 bytes
msgcache.c:822:reading swapped mark file.
==26371== Conditional jump or move depends on uninitialised value(s)
==26371== at 0x81399BD: msgcache_read_mark (msgcache.c:882)
==26371== by 0x80CE9C5: folder_item_read_cache (folder.c:2702)
==26371== by 0x80CF1A0: folder_item_get_msg_list (folder.c:2823)
==26371== by 0x80DC7A7: folderview_update_node (folderview.c:1606)
==26371== by 0x80DCCEF: folderview_gnode_func (folderview.c:1726)
==26371== by 0x82B0089: gtk_sctree_insert_gnode (gtksctree.c:1934)
==26371== by 0x82B019A: gtk_sctree_insert_gnode (gtksctree.c:1957)
==26371== by 0x80DD076: folderview_append_folder (folderview.c:1808)
==26371== by 0x80DACA9: folderview_set_folders (folderview.c:1007)
==26371== by 0x80DA36C: folderview_set (folderview.c:742)
==26371== by 0x80E04D3: folderview_update_folder (folderview.c:2798)
==26371== by 0x823E386: hooks_marshal (hooks.c:108)
==26371==
imap.c:5427:IMAP switching to batch mode
** Message: Konto 'riseup': Verbinde mit IMAP4-Server: mail.riseup.net:993...
imap-thread.c:388:found imap 0x78fda48
==26371== Thread 2:
==26371== Syscall param sendmsg(mmsg[0].msg_hdr) points to uninitialised
byte(s)
==26371== at 0x51D4E0C: sendmmsg (sendmmsg.c:36)
==26371== by 0x4D15445: __libc_res_nsend (res_send.c:1140)
==26371== by 0x4D12C07: __libc_res_nquery (res_query.c:226)
==26371== by 0x4D1324D: __libc_res_nquerydomain (res_query.c:582)
==26371== by 0xFEFD90F: ???
==26371== Address 0xfefc3c8 is on thread 2's stack
msgcache.c:619:using Noop Converter
[252/1995]
msgcache.c:791:done. (0 items read)
msgcache.c:792:Cache size: 0 messages, 0 bytes
msgcache.c:822:reading swapped mark file.
==26371== Thread 1:
==26371== Conditional jump or move depends on uninitialised value(s)
==26371== at 0x81399BD: msgcache_read_mark (msgcache.c:882)
==26371== by 0x80CE9C5: folder_item_read_cache (folder.c:2702)
==26371== by 0x80CF1A0: folder_item_get_msg_list (folder.c:2823)
==26371== by 0x80D5126: folder_item_apply_processing (folder.c:4433)
==26371== by 0x80FFCF3: initial_processing (main.c:2011)
==26371== by 0x80CA155: folder_func_to_all_folders_func (folder.c:1059)
==26371== by 0x4B72A29: g_node_traverse_pre_order (gnode.c:550)
==26371== by 0x62D662F: ???
==26371==
msgcache.c:911:reading swapped tags file.
folder.c:4620:Folder riseup wants sync
==26371== Conditional jump or move depends on uninitialised value(s)
==26371== at 0x51B470D: re_compile_fastmap_iter.isra.17 (regcomp.c:328)
==26371== by 0x51BB6B4: re_compile_fastmap (regcomp.c:280)
==26371== by 0x51BBD7F: regcomp (regcomp.c:516)
==26371== by 0x825A34B: subject_get_prefix_length (utils.c:3745)
==26371== by 0x825A154: subject_table_lookup (utils.c:3647)
==26371== by 0x80CDB3B: folder_item_scan_full (folder.c:2425)
==26371== by 0x80CE830: folder_item_read_cache (folder.c:2663)
==26371== by 0x80CF1A0: folder_item_get_msg_list (folder.c:2823)
==26371== by 0x7CC30CC: notification_traverse_hash_startup
(notification_core.c:351)
==26371== by 0x4B72A29: g_node_traverse_pre_order (gnode.c:550)
==26371== by 0x4B729DA: g_node_traverse_pre_order (gnode.c:545)
==26371== by 0x4B729DA: g_node_traverse_pre_order (gnode.c:545)
==26371==
==26371== Conditional jump or move depends on uninitialised value(s)
==26371== at 0x51B470D: re_compile_fastmap_iter.isra.17 (regcomp.c:328)
==26371== by 0x51BB6D4: re_compile_fastmap (regcomp.c:282)
==26371== by 0x51BBD7F: regcomp (regcomp.c:516)
==26371== by 0x51BB6D4: re_compile_fastmap (regcomp.c:282)
==26371== by 0x51BBD7F: regcomp (regcomp.c:516)
==26371== by 0x825A34B: subject_get_prefix_length (utils.c:3745)
==26371== by 0x825A154: subject_table_lookup (utils.c:3647)
==26371== by 0x80CDB3B: folder_item_scan_full (folder.c:2425)
==26371== by 0x80CE830: folder_item_read_cache (folder.c:2663)
==26371== by 0x80CF1A0: folder_item_get_msg_list (folder.c:2823)
==26371== by 0x7CC30CC: notification_traverse_hash_startup
(notification_core.c:351)
==26371== by 0x4B72A29: g_node_traverse_pre_order (gnode.c:550)
==26371== by 0x4B729DA: g_node_traverse_pre_order (gnode.c:545)
==26371== by 0x4B729DA: g_node_traverse_pre_order (gnode.c:545)
==26371==
imap.c:5446:IMAP switching away from batch mode
There are several kinds of leaks; the two most important categories are:
"definitely lost": your program is leaking memory -- fix it!
"probably lost": your program is leaking memory, unless you're doing funny
things with pointers (such as moving them to point to the middle of a heap
block).
==26475== 4 bytes in 4 blocks are definitely lost in loss record 185 of 8,243
==26475== at 0x402B498: malloc (vg_replace_malloc.c:270)
==26475== by 0x4B7021A: standard_malloc (gmem.c:85)
==26475== by 0x4B70592: g_malloc (gmem.c:159)
==26475== by 0x4B88538: g_strdup (gstrfuncs.c:364)
==26475== by 0x8172DB5: prefs_set_default (prefs_gtk.c:457)
==26475== by 0x8150F55: prefs_account_new (prefs_account.c:3440)
==26475== by 0x807DCBE: account_read_config_all (account.c:225)
==26475== by 0x80FDB23: main (main.c:1291)
==26475==
==26475== 5 bytes in 1 blocks are possibly lost in loss record 233 of 8,243
==26475== at 0x402B498: malloc (vg_replace_malloc.c:270)
==26475== by 0x4B7021A: standard_malloc (gmem.c:85)
==26475== by 0x4B70592: g_malloc (gmem.c:159)
==26475== by 0x4B88538: g_strdup (gstrfuncs.c:364)
==26475== LEAK SUMMARY:
==26475== definitely lost: 30,475 bytes in 114 blocks
==26475== indirectly lost: 39,192 bytes in 1,939 blocks
==26475== possibly lost: 5,930,101 bytes in 98,571 blocks
==26475== still reachable: 1,880,140 bytes in 19,952 blocks
==26475== suppressed: 0 bytes in 0 blocks
==26475== Reachable blocks (those to which a pointer was found) are not shown.
==26475== To see them, rerun with: --leak-check=full --show-reachable=yes
==26475==
==26475== For counts of detected and suppressed errors, rerun with: -v
==26475== Use --track-origins=yes to see where uninitialised values come from
==26475== ERROR SUMMARY: 3712 errors from 3647 contexts (suppressed: 0 from 0)
==26626== Invalid free() / delete / delete[] / realloc()
==26626== at 0x402A24C: free (vg_replace_malloc.c:446)
==26626== by 0x5231F54: __libc_freeres (in
/lib/i386-linux-gnu/i686/cmov/libc-2.17.so)
==26626== by 0x519CFDF: _Exit (_exit.S:29)
==26626== Address 0x528f230 is 0 bytes inside data symbol "noai6ai_cached"
==26626==
[1745/1841]
==26626== HEAP SUMMARY:
==26626== in use at exit: 7,871,114 bytes in 120,560 blocks
==26626== total heap usage: 477,869 allocs, 357,310 frees, 36,125,632 bytes
allocated
==26626==
==26626== 1 bytes in 1 blocks are possibly lost in loss record 4 of 8,241
==26626== at 0x402B498: malloc (vg_replace_malloc.c:270)
==26626== by 0x4B7021A: standard_malloc (gmem.c:85)
==26626== by 0x4B70592: g_malloc (gmem.c:159)
==26626== by 0x4B88538: g_strdup (gstrfuncs.c:364)
==26626== by 0x4AEF62B: g_param_spec_string (gparamspecs.c:2208)
==26626== by 0x4245EDD: gtk_settings_class_intern_init (gtksettings.c:563)
==26626== by 0x4AFF4D1: g_type_class_ref (gtype.c:2244)
==26626== by 0x4AE68ED: g_object_newv (gobject.c:1624)
==26626== by 0x4AE6DB7: g_object_new (gobject.c:1548)
==26626== by 0x42443EC: gtk_settings_get_for_screen (gtksettings.c:1086)
==26626== by 0x424446F: gtk_settings_get_default (gtksettings.c:1119)
==26626== by 0x80FDA3E: main (main.c:1232)
==26626==
==26626== 1 bytes in 1 blocks are possibly lost in loss record 5 of 8,241
==26626== at 0x402B498: malloc (vg_replace_malloc.c:270)
==26626== by 0x4B7021A: standard_malloc (gmem.c:85)
==26626== by 0x4B70592: g_malloc (gmem.c:159)
==26626== by 0x4B88538: g_strdup (gstrfuncs.c:364)
[1722/1841]
==26626== by 0x4AEF62B: g_param_spec_string (gparamspecs.c:2208)
==26626== by 0x42F32B8: gtk_tree_view_column_class_intern_init
(gtktreeviewcolumn.c:262)
==26626== by 0x4AFF4D1: g_type_class_ref (gtype.c:2244)
==26626== by 0x4AE68ED: g_object_newv (gobject.c:1624)
==26626== by 0x4AE6DB7: g_object_new (gobject.c:1548)
==26626== by 0x42F40F3: gtk_tree_view_column_new (gtktreeviewcolumn.c:1457)
==26626== by 0x4136FEC: gtk_combo_box_menu_setup.constprop.22
(gtkcombobox.c:3056)
==26626== by 0x4137446: gtk_combo_box_check_appearance (gtkcombobox.c:1287)
==26626==
==26626== 1 bytes in 1 blocks are possibly lost in loss record 6 of 8,241
==26626== at 0x402B498: malloc (vg_replace_malloc.c:270)
==26626== by 0x4B7021A: standard_malloc (gmem.c:85)
==26626== by 0x4B70592: g_malloc (gmem.c:159)
==26626== by 0x4B88538: g_strdup (gstrfuncs.c:364)
==26626== by 0x4AEF62B: g_param_spec_string (gparamspecs.c:2208)
==26626== by 0x41DE271: gtk_menu_item_class_intern_init (gtkmenuitem.c:302)
==26626== by 0x4AFF4D1: g_type_class_ref (gtype.c:2244)
==26626== by 0x4AFF16F: g_type_class_ref (gtype.c:2951)
==26626== by 0x4AE68ED: g_object_newv (gobject.c:1624)
==26626== by 0x4AE6DB7: g_object_new (gobject.c:1548)
==26626== by 0x4269083: gtk_tearoff_menu_item_new (gtktearoffmenuitem.c:51)
==26626== by 0x42FC65D: update_node (gtkuimanager.c:2424)
==26626== 1 bytes in 1 blocks are possibly lost in loss record 7 of 8,241
==26626== at 0x402B498: malloc (vg_replace_malloc.c:270)
==26626== by 0x4B7021A: standard_malloc (gmem.c:85)
==26626== by 0x4B70592: g_malloc (gmem.c:159)
==26626== by 0x4B88538: g_strdup (gstrfuncs.c:364)
==26626== by 0x4AEF62B: g_param_spec_string (gparamspecs.c:2208)
==26626== by 0x41BBC4F: gtk_label_class_intern_init (gtklabel.c:504)
==26626== by 0x4AFF4D1: g_type_class_ref (gtype.c:2244)
==26626== by 0x4AFF16F: g_type_class_ref (gtype.c:2951)
==26626== by 0x4AE68ED: g_object_newv (gobject.c:1624)
==26626== by 0x4AE6DB7: g_object_new (gobject.c:1548)
==26626== by 0x41DEA4C: gtk_menu_item_ensure_label (gtkmenuitem.c:2127)
==26626== by 0x41DEB3C: gtk_real_menu_item_set_label (gtkmenuitem.c:1468)
==26626==
==26626== 269,932 bytes in 2,994 blocks are possibly lost in loss record 8,239
of 8,241
==26626== at 0x402B498: malloc (vg_replace_malloc.c:270)
==26626== by 0x4B7021A: standard_malloc (gmem.c:85)
==26626== by 0x813832D: msgcache_read_cache (msgcache.c:685)
==26626== by 0x80CE783: folder_item_read_cache (folder.c:2646)
==26626== by 0x80CF1A0: folder_item_get_msg_list (folder.c:2823)
==26626== by 0x7CC30CC: notification_traverse_hash_startup
(notification_core.c:351)
==26626== by 0x4B72A29: g_node_traverse_pre_order (gnode.c:550)
==26626== by 0x4B729DA: g_node_traverse_pre_order (gnode.c:545)
==26626== by 0x4B729DA: g_node_traverse_pre_order (gnode.c:545)
==26626== by 0x4B729DA: g_node_traverse_pre_order (gnode.c:545)
==26626== by 0x4B729DA: g_node_traverse_pre_order (gnode.c:545)
==26626== by 0x4B736CF: g_node_traverse (gnode.c:869)
==26626== 276,416 bytes in 13,072 blocks are possibly lost in loss record 8,240
of 8,241
==26626== at 0x402B498: malloc (vg_replace_malloc.c:270)
==26626== by 0x4B7021A: standard_malloc (gmem.c:85)
==26626== by 0x4B70592: g_malloc (gmem.c:159)
==26626== by 0x4B88538: g_strdup (gstrfuncs.c:364)
==26626== by 0x81750F6: prefs_cache_sections (prefs_gtk.c:1017)
==26626== by 0x8175206: prefs_cache (prefs_gtk.c:1039)
==26626== by 0x8175327: prefs_prepare_cache (prefs_gtk.c:1059)
==26626== by 0x80FD1C2: main (main.c:1010)
==26626== 386,432 bytes in 3,019 blocks are possibly lost in loss record 8,241
of 8,241 [1268/1831]
==26626== at 0x402937B: calloc (vg_replace_malloc.c:593)
==26626== by 0x4B6FF32: standard_calloc (gmem.c:104)
==26626== by 0x8137D29: msgcache_read_cache (msgcache.c:672)
==26626== by 0x80CE783: folder_item_read_cache (folder.c:2646)
==26626== by 0x80CF1A0: folder_item_get_msg_list (folder.c:2823)
==26626== by 0x7CC30CC: notification_traverse_hash_startup
(notification_core.c:351)
==26626== by 0x4B72A29: g_node_traverse_pre_order (gnode.c:550)
==26626== by 0x4B729DA: g_node_traverse_pre_order (gnode.c:545)
==26626== by 0x4B729DA: g_node_traverse_pre_order (gnode.c:545)
==26626== by 0x4B729DA: g_node_traverse_pre_order (gnode.c:545)
==26626== by 0x4B729DA: g_node_traverse_pre_order (gnode.c:545)
==26626== by 0x4B736CF: g_node_traverse (gnode.c:869)
==26626==
==26626== LEAK SUMMARY:
==26626== definitely lost: 28,435 bytes in 113 blocks
==26626== indirectly lost: 39,192 bytes in 1,939 blocks
==26626== possibly lost: 5,923,021 bytes in 98,556 blocks
==26626== still reachable: 1,880,466 bytes in 19,952 blocks
==26626== suppressed: 0 bytes in 0 blocks
==26626== Reachable blocks (those to which a pointer was found) are not shown.
==26626== To see them, rerun with: --leak-check=full --show-reachable=yes
==26626== For counts of detected and suppressed errors, rerun with: -v
[1245/1831]
==26626== Use --track-origins=yes to see where uninitialised values come from
==26626== ERROR SUMMARY: 3711 errors from 3646 contexts (suppressed: 0 from 0)
==26642== Invalid free() / delete / delete[] / realloc()
==26642== at 0x402A24C: free (vg_replace_malloc.c:446)
==26642== by 0x5231F54: __libc_freeres (in
/lib/i386-linux-gnu/i686/cmov/libc-2.17.so)
==26642== by 0x519CFDF: _Exit (_exit.S:29)
==26642== Address 0x528f230 is 0 bytes inside data symbol "noai6ai_cached"
==26642==
==26642==
==26642== HEAP SUMMARY:
==26642== in use at exit: 7,871,162 bytes in 120,563 blocks
==26642== total heap usage: 477,872 allocs, 357,310 frees, 36,125,680 bytes
allocated
==26642== 386,432 bytes in 3,019 blocks are possibly lost in loss record 8,242
of 8,242
==26642== at 0x402937B: calloc (vg_replace_malloc.c:593)
==26642== by 0x4B6FF32: standard_calloc (gmem.c:104)
==26642== by 0x8137D29: msgcache_read_cache (msgcache.c:672)
==26642== by 0x80CE783: folder_item_read_cache (folder.c:2646)
==26642== by 0x80CF1A0: folder_item_get_msg_list (folder.c:2823)
==26642== by 0x7CC30CC: notification_traverse_hash_startup
(notification_core.c:351)
==26642== by 0x4B72A29: g_node_traverse_pre_order (gnode.c:550)
==26642== by 0x4B729DA: g_node_traverse_pre_order (gnode.c:545)
==26642== by 0x4B729DA: g_node_traverse_pre_order (gnode.c:545)
==26642== by 0x4B729DA: g_node_traverse_pre_order (gnode.c:545)
==26642== by 0x4B729DA: g_node_traverse_pre_order (gnode.c:545)
==26642== by 0x4B736CF: g_node_traverse (gnode.c:869)
==26642== LEAK SUMMARY:
[1/1877]
==26642== definitely lost: 28,435 bytes in 113 blocks
==26642== indirectly lost: 39,192 bytes in 1,939 blocks
==26642== possibly lost: 5,923,021 bytes in 98,556 blocks
==26642== still reachable: 1,880,514 bytes in 19,955 blocks
==26642== suppressed: 0 bytes in 0 blocks
==26642== Reachable blocks (those to which a pointer was found) are not shown.
==26642== To see them, rerun with: --leak-check=full --show-reachable=yes
==26642==
==26642== For counts of detected and suppressed errors, rerun with: -v
==26642== Use --track-origins=yes to see where uninitialised values come from
==26642== ERROR SUMMARY: 3711 errors from 3646 contexts (suppressed: 0 from 0)
==26661== Invalid free() / delete / delete[] / realloc()
==26661== at 0x402A24C: free (vg_replace_malloc.c:446)
==26661== by 0x5231F54: __libc_freeres (in
/lib/i386-linux-gnu/i686/cmov/libc-2.17.so)
==26661== by 0x519CFDF: _Exit (_exit.S:29)
==26661== Address 0x528f230 is 0 bytes inside data symbol "noai6ai_cached"
==26661==
==26661==
==26661== HEAP SUMMARY:
==26661== in use at exit: 7,871,169 bytes in 120,564 blocks
==26661== total heap usage: 477,873 allocs, 357,310 frees, 36,125,687 bytes
allocated
==26661== 386,432 bytes in 3,019 blocks are possibly lost in loss record 8,243
of 8,243
==26661== at 0x402937B: calloc (vg_replace_malloc.c:593)
==26661== by 0x4B6FF32: standard_calloc (gmem.c:104)
==26661== by 0x8137D29: msgcache_read_cache (msgcache.c:672)
==26661== by 0x80CE783: folder_item_read_cache (folder.c:2646)
==26661== by 0x80CF1A0: folder_item_get_msg_list (folder.c:2823)
==26661== by 0x7CC30CC: notification_traverse_hash_startup
(notification_core.c:351)
==26661== by 0x4B72A29: g_node_traverse_pre_order (gnode.c:550)
==26661== by 0x4B729DA: g_node_traverse_pre_order (gnode.c:545)
==26661== by 0x4B729DA: g_node_traverse_pre_order (gnode.c:545)
==26661== by 0x4B729DA: g_node_traverse_pre_order (gnode.c:545)
==26661== by 0x4B729DA: g_node_traverse_pre_order (gnode.c:545)
==26661== by 0x4B736CF: g_node_traverse (gnode.c:869)
==26661== LEAK SUMMARY:
[63/1838]
==26661== definitely lost: 28,435 bytes in 113 blocks
==26661== indirectly lost: 39,192 bytes in 1,939 blocks
==26661== possibly lost: 5,923,021 bytes in 98,556 blocks
==26661== still reachable: 1,880,521 bytes in 19,956 blocks
==26661== suppressed: 0 bytes in 0 blocks
==26661== Reachable blocks (those to which a pointer was found) are not shown.
==26661== To see them, rerun with: --leak-check=full --show-reachable=yes
==26661==
==26661== For counts of detected and suppressed errors, rerun with: -v
==26661== Use --track-origins=yes to see where uninitialised values come from
==26661== ERROR SUMMARY: 3711 errors from 3646 contexts (suppressed: 0 from 0)
sgpgme.c:666:GpgME Protocol: OpenPGP
Version: 1.4.12 (req 1.3.0)
Executable: /usr/bin/gpg
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the Users
mailing list