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 656489 - Memory leak of list fetched with get_items()
Memory leak of list fetched with get_items()
Status: RESOLVED FIXED
Product: evolution-ews
Classification: Other
Component: Mail
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Evolution EWS maintainer(s)
Evolution EWS maintainer(s)
Depends on:
Blocks: 656525
 
 
Reported: 2011-08-14 00:07 UTC by David Woodhouse
Modified: 2011-08-17 00:02 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description David Woodhouse 2011-08-14 00:07:43 UTC
On running Evolution in valgrind:

==15562== 202,750 (96 direct, 202,654 indirect) bytes in 6 blocks are definitely lost in 
loss record 23,482 of 23,512
==15562==    at 0x4A0649D: malloc (vg_replace_malloc.c:236)
==15562==    by 0x3D33049600: g_malloc (gmem.c:164)
==15562==    by 0x3D3305E476: g_slice_alloc (gslice.c:842)
==15562==    by 0x3D3305F802: g_slist_append (gslist.c:254)
==15562==    by 0x19922118: get_items_response_cb (e-ews-connection.c:575)
==15562==    by 0x19923C4B: ews_response_cb (e-ews-connection.c:446)
==15562==    by 0x3D48043069: process_queue_item (soup-session-async.c:383)
==15562==    by 0x3D480432BF: run_queue (soup-session-async.c:418)
==15562==    by 0x3D48043912: idle_run_queue (soup-session-async.c:441)
==15562==    by 0x3D330427EC: g_main_context_dispatch (gmain.c:2441)
==15562==    by 0x3D33042FC7: g_main_context_iterate (gmain.c:3092)
==15562==    by 0x3D3304360C: g_main_loop_run (gmain.c:3300)
==15562==    by 0x19923455: e_ews_soup_thread (e-ews-connection.c:794)
==15562==    by 0x3D330683A5: g_thread_create_proxy (gthread.c:1955)
==15562==    by 0x3D31407B30: start_thread (pthread_create.c:305)
==15562==    by 0x3D310DFD2C: clone (clone.S:115)
==15562== 

This means that some user of the get_items call is not correctly calling g_slist_free() to free the *list* data structures.
Comment 1 David Woodhouse 2011-08-14 08:32:42 UTC
I strongly suspect something's leaking EEwsItems too, and it could be the same caller. After a few minutes of running with the code at http://blogs.gnome.org/danni/2011/02/17/ld_preload-gobject-lifetime-debugging-tool/ I find that I have 431 EEwsItem objects alive. The next morning I have 1682 of them.
Comment 2 David Woodhouse 2011-08-17 00:02:19 UTC
Fixed: http://git.gnome.org/browse/evolution-ews/commit/?id=0968dfa1