GNOME Bugzilla – Bug 543943
Evolution failed to allocate memory
Last modified: 2013-09-13 01:01:17 UTC
Evolution 2.23.5 I left evolution running on friday. When i checked today morning, evolution was closed due to unavailability of memory. I had pop, imap and group wise all there accounts configured. See the attached valgrind. These were the error messages on terminal (evolution:23931): camel-local-provider-WARNING **: Could not save summary for local providers Error in SQL SELECT statement: SELECT COUNT (*) FROM 'Mailbox' WHERE deleted = 1 [out of memory] Error in SQL SELECT statement: SELECT COUNT (*) FROM 'Mailbox' WHERE read = 0 [out of memory] (process:23931): GLib-ERROR (recursed) **: gmem.c:175: failed to allocate 32 bytes aborting...
Created attachment 114899 [details] Valgrind of evolution process
It seems the db-summary leaks like a hell :) I'll attach patch for eds and evo to let it leak a bit less. Hopefully in an hour or so.
Created attachment 115024 [details] [review] proposed eds patch for evolution-data-server; The eds part. Please notice my change in chunk @@ -608,7 +608,11 @@ summary_header_from_db (CamelFolderSumma other changes are quite boring.
Created attachment 115025 [details] [review] proposed evo patch for evolution; A little evo's part here.
The eds part contains patch for leaks I faced and I think are most common. It will still leak somewhere else probably, but not so much. If accepted, I think we can close this bug (maybe rather after a weekend Akhil's test).
I just noticed some invalid reads. I am putting all together here so that we don't end up filing separate bugs. ==17145== ==17145== Thread 1: ==17145== Invalid read of size 1 ==17145== at 0x4025A70: memcpy (in /usr/lib/valgrind/x86-linux/vgpreload_memcheck.so) ==17145== by 0x5A0522D: g_strdup (gstrfuncs.c:93) ==17145== by 0x6B66F08: emfv_list_message_selected (em-folder-view.c:2628) ==17145== by 0x6B54F14: emfb_gui_folder_changed (em-folder-browser.c:1880) ==17145== by 0x6B9B2C2: do_async_event (mail-mt.c:684) ==17145== by 0x6B9D271: mail_msg_idle_cb (mail-mt.c:494) ==17145== by 0x59E2230: g_idle_dispatch (gmain.c:4173) ==17145== by 0x59E4177: g_main_context_dispatch (gmain.c:2068) ==17145== by 0x59E7812: g_main_context_iterate (gmain.c:2701) ==17145== by 0x59E7D31: g_main_loop_run (gmain.c:2924) ==17145== by 0x4E7E0A2: bonobo_main (bonobo-main.c:311) ==17145== by 0x805DBE4: main (main.c:783) ==17145== Address 0xb9f79a8 is 0 bytes inside a block of size 3 free'd ==17145== at 0x4023B7A: free (in /usr/lib/valgrind/x86-linux/vgpreload_memcheck.so) ==17145== by 0x59EC6A5: g_free (gmem.c:190) ==17145== by 0x6B51AD2: emfb_list_message_selected (em-folder-browser.c:1364) ==17145== by 0x597D309: g_cclosure_marshal_VOID__STRING (gmarshal.c:496) ==17145== by 0x596EC2A: g_closure_invoke (gclosure.c:767) ==17145== by 0x5986434: signal_emit_unlocked_R (gsignal.c:3244) ==17145== by 0x5987B4D: g_signal_emit_valist (gsignal.c:2977) ==17145== by 0x5987FD5: g_signal_emit (gsignal.c:3034) ==17145== by 0x6BAF53A: message_list_select_uid (message-list.c:660) ==17145== by 0x6B681F3: emfv_set_message (em-folder-view.c:798) ==17145== by 0x6B54F14: emfb_gui_folder_changed (em-folder-browser.c:1880) ==17145== by 0x6B9B2C2: do_async_event (mail-mt.c:684) ==17145==
==17145== ==17145== Invalid read of size 1 ==17145== at 0x4025473: strlen (in /usr/lib/valgrind/x86-linux/vgpreload_memcheck.so) ==17145== by 0x7F4022B: groupwise_folder_item_to_msg (camel-groupwise-folder.c:283) ==17145== by 0x7F425B4: gw_update_cache (camel-groupwise-folder.c:1438) ==17145== by 0x7F432C0: update_update (camel-groupwise-folder.c:2001) ==17145== by 0x42A42B1: session_thread_proxy (camel-session.c:592) ==17145== by 0x5A0FE35: g_thread_pool_thread_proxy (gthreadpool.c:265) ==17145== by 0x5A0E79E: g_thread_create_proxy (gthread.c:635) ==17145== by 0x4F94174: start_thread (in /lib/libpthread-2.8.so) ==17145== by 0x5B4FDCD: clone (in /lib/libc-2.8.so) ==17145== Address 0x7c5a3fc is 0 bytes after a block of size 36 alloc'd ==17145== at 0x4022E12: calloc (in /usr/lib/valgrind/x86-linux/vgpreload_memcheck.so) ==17145== by 0x59EC78B: g_malloc0 (gmem.c:151) ==17145== by 0x59BF51D: g_base64_decode (gbase64.c:371) ==17145== by 0x61B5CCB: e_gw_item_new_from_soap_parameter (e-gw-item.c:1955) ==17145== by 0x61A7F5C: e_gw_connection_get_item (e-gw-connection.c:1440) ==17145== by 0x7F42232: gw_update_cache (camel-groupwise-folder.c:1275) ==17145== by 0x7F432C0: update_update (camel-groupwise-folder.c:2001) ==17145== by 0x42A42B1: session_thread_proxy (camel-session.c:592) ==17145== by 0x5A0FE35: g_thread_pool_thread_proxy (gthreadpool.c:265) ==17145== by 0x5A0E79E: g_thread_create_proxy (gthread.c:635) ==17145== by 0x4F94174: start_thread (in /lib/libpthread-2.8.so) ==17145== by 0x5B4FDCD: clone (in /lib/libc-2.8.so) ==17145== ==17145== Invalid read of size 1 ==17145== at 0x4025A70: memcpy (in /usr/lib/valgrind/x86-linux/vgpreload_memcheck.so) ==17145== by 0x59BDA49: g_array_append_vals (garray.c:134) ==17145== by 0x59BDAAF: g_byte_array_append (garray.c:653) ==17145== by 0x438CE23: camel_stream_mem_new_with_buffer (camel-stream-mem.c:147) ==17145== by 0x4376C98: camel_mime_part_set_content (camel-mime-part.c:1052) ==17145== by 0x7F40242: groupwise_folder_item_to_msg (camel-groupwise-folder.c:283) ==17145== by 0x7F425B4: gw_update_cache (camel-groupwise-folder.c:1438) ==17145== by 0x7F432C0: update_update (camel-groupwise-folder.c:2001) ==17145== by 0x42A42B1: session_thread_proxy (camel-session.c:592) ==17145== by 0x5A0FE35: g_thread_pool_thread_proxy (gthreadpool.c:265) ==17145== by 0x5A0E79E: g_thread_create_proxy (gthread.c:635) ==17145== by 0x4F94174: start_thread (in /lib/libpthread-2.8.so) ==17145== Address 0x7c5a3fc is 0 bytes after a block of size 36 alloc'd ==17145== at 0x4022E12: calloc (in /usr/lib/valgrind/x86-linux/vgpreload_memcheck.so) ==17145== by 0x59EC78B: g_malloc0 (gmem.c:151) ==17145== by 0x59BF51D: g_base64_decode (gbase64.c:371) ==17145== by 0x61B5CCB: e_gw_item_new_from_soap_parameter (e-gw-item.c:1955) ==17145== by 0x61A7F5C: e_gw_connection_get_item (e-gw-connection.c:1440) ==17145== by 0x7F42232: gw_update_cache (camel-groupwise-folder.c:1275) ==17145== by 0x7F432C0: update_update (camel-groupwise-folder.c:2001) ==17145== by 0x42A42B1: session_thread_proxy (camel-session.c:592) ==17145== by 0x5A0FE35: g_thread_pool_thread_proxy (gthreadpool.c:265) ==17145== by 0x5A0E79E: g_thread_create_proxy (gthread.c:635) ==17145== by 0x4F94174: start_thread (in /lib/libpthread-2.8.so) ==17145== by 0x5B4FDCD: clone (in /lib/libc-2.8.so)
==17145== Invalid read of size 1 ==17145== at 0x5A07617: g_str_hash (gstring.c:95) ==17145== by 0x59D6B36: g_hash_table_lookup (ghash.c:118) ==17145== by 0x42B3B8A: message_info_from_uid (camel-vee-summary.c:174) ==17145== by 0x4287E7F: camel_folder_summary_uid (camel-folder-summary.c:545) ==17145== by 0x4287EE4: camel_folder_summary_index (camel-folder-summary.c:393) ==17145== by 0x42B5621: vtrash_getv (camel-vtrash-folder.c:145) ==17145== by 0x4386289: camel_object_get (camel-object.c:1589) ==17145== by 0x4292728: camel_folder_get_unread_message_count (camel-folder.c:660) ==17145== by 0x6B9A0B4: update_1folder (mail-folder-cache.c:319) ==17145== by 0x6B9A27E: folder_changed (mail-folder-cache.c:434) ==17145== by 0x43872BF: camel_object_trigger_event (camel-object.c:1495) ==17145== by 0x42B47FC: vtrash_folder_changed (camel-vtrash-folder.c:506) ==17145== Address 0x6212638 is 0 bytes inside a block of size 13 free'd ==17145== at 0x4023B7A: free (in /usr/lib/valgrind/x86-linux/vgpreload_memcheck.so) ==17145== by 0x59EC6A5: g_free (gmem.c:190) ==17145== by 0x42B4234: vee_message_info_free (camel-vee-summary.c:47) ==17145== by 0x4288284: camel_message_info_free (camel-folder-summary.c:4044) ==17145== by 0x42B4539: vtrash_uid_removed (camel-vtrash-folder.c:425) ==17145== by 0x42B46CF: vtrash_folder_changed (camel-vtrash-folder.c:477) ==17145== by 0x42AE821: folder_changed (camel-vee-folder.c:1584) ==17145== by 0x43872BF: camel_object_trigger_event (camel-object.c:1495) ==17145== by 0x7F59B56: imap_rescan (camel-imap-folder.c:977) ==17145== by 0x7F5D5D9: imap_refresh_info (camel-imap-folder.c:724) ==17145== by 0x427EBB5: disco_refresh_info (camel-disco-folder.c:269) ==17145== by 0x4292A58: camel_folder_refresh_info (camel-folder.c:336) ==17145==
commit it milan
eds part committed to trunk. Committed revision 9171. evo part committed to trunk. Committed revision 35826. I'm keeping this opened, because of the above invalid reads.
Created attachment 115143 [details] Valgrind of evolution process Yesterday i applied both the memory leak fixes (evolution and eds) provided by Milan. I did run evolution for almost 24 hrs. Attached file has valgrind traces. Hope it will help in identifying some more leaks.
Nothing much reflects in the db summary code. sqlite3 leaks. I have disabled sqlite free mem.
(In reply to comment #12) > Nothing much reflects in the db summary code. sqlite3 leaks. I have disabled > sqlite free mem. Did you revert those patches? If not, then why did you change their status from "committed" to "none"?
Oops I didn't intend to it. FF refresh :(
Worth keeping this open?
It depends on the actual state of this: (In reply to comment #12) > Nothing much reflects in the db summary code. sqlite3 leaks. I have disabled > sqlite free mem.
Its all enabled from 2.23.6 (iirc)
In that case sure, closing as fixed.