View Issue Details

IDProjectCategoryView StatusLast Update
0005050Talerexchange API (C)public2017-06-06 14:18
ReporterChristian GrothoffAssigned ToChristian Grothoff 
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionfixed 
Platformi7OSDebian GNU/LinuxOS Versionsqueeze
Product VersionSVN HEAD 
Target Version0.3Fixed in Version0.3 
Summary0005050: memory leaks in libtalerexchange
Description

==26071== 15 bytes in 1 blocks are definitely lost in loss record 18 of 86
==26071== at 0x4C2BBAF: malloc (vg_replace_malloc.c:299)
==26071== by 0x5B9189C: GNUNET_xmalloc_unchecked_ (common_allocation.c:227)
==26071== by 0x5B9123A: GNUNET_xmalloc_ (common_allocation.c:75)
==26071== by 0x65C0AA1: parse_variable_data (json_helper.c:138)
==26071== by 0x65BF910: GNUNET_JSON_parse (json.c:60)
==26071== by 0x4E4A635: parse_reserve_history (exchange_api_reserve.c:164)
==26071== by 0x4E4C8B0: reserve_withdraw_payment_required (exchange_api_reserve.c:790)
==26071== by 0x4E4CCC7: handle_reserve_withdraw_finished (exchange_api_reserve.c:871)
==26071== by 0x5978936: GNUNET_CURL_perform (curl.c:472)
==26071== by 0x5978EAC: context_task (curl_reschedule.c:94)
==26071== by 0x5BCF30D: run_ready (scheduler.c:670)
==26071== by 0x5BCFC58: GNUNET_SCHEDULER_run (scheduler.c:937)
==26071==
==26071== 16 bytes in 1 blocks are definitely lost in loss record 26 of 86
==26071== at 0x4C2BBAF: malloc (vg_replace_malloc.c:299)
==26071== by 0x5B9189C: GNUNET_xmalloc_unchecked_ (common_allocation.c:227)
==26071== by 0x5B9123A: GNUNET_xmalloc_ (common_allocation.c:75)
==26071== by 0x5B91CA0: GNUNET_xstrdup_ (common_allocation.c:354)
==26071== by 0x4E3D963: parse_json_auditor (exchange_api_handle.c:400)
==26071== by 0x4E3E988: decode_keys_json (exchange_api_handle.c:596)
==26071== by 0x4E3EF47: keys_completed_cb (exchange_api_handle.c:717)
==26071== by 0x5978936: GNUNET_CURL_perform (curl.c:472)
==26071== by 0x5978EAC: context_task (curl_reschedule.c:94)
==26071== by 0x5BCF30D: run_ready (scheduler.c:670)
==26071== by 0x5BCFC58: GNUNET_SCHEDULER_run (scheduler.c:937)
==26071== by 0x1156CF: main (test_exchange_api.c:3755)
==26071==
==26071== 30 bytes in 2 blocks are definitely lost in loss record 34 of 86
==26071== at 0x4C2BBAF: malloc (vg_replace_malloc.c:299)
==26071== by 0x5B9189C: GNUNET_xmalloc_unchecked_ (common_allocation.c:227)
==26071== by 0x5B9123A: GNUNET_xmalloc_ (common_allocation.c:75)
==26071== by 0x65C0AA1: parse_variable_data (json_helper.c:138)
==26071== by 0x65BF910: GNUNET_JSON_parse (json.c:60)
==26071== by 0x4E4A635: parse_reserve_history (exchange_api_reserve.c:164)
==26071== by 0x4E4BD4C: handle_reserve_status_finished (exchange_api_reserve.c:472)
==26071== by 0x5978936: GNUNET_CURL_perform (curl.c:472)
==26071== by 0x5978EAC: context_task (curl_reschedule.c:94)
==26071== by 0x5BCF30D: run_ready (scheduler.c:670)
==26071== by 0x5BCFC58: GNUNET_SCHEDULER_run (scheduler.c:937)
==26071== by 0x1156CF: main (test_exchange_api.c:3755)
==26071==
==26071== 40 bytes in 1 blocks are definitely lost in loss record 38 of 86
==26071== at 0x4C2BBAF: malloc (vg_replace_malloc.c:299)
==26071== by 0x5B9189C: GNUNET_xmalloc_unchecked_ (common_allocation.c:227)
==26071== by 0x5B9123A: GNUNET_xmalloc_ (common_allocation.c:75)
==26071== by 0x4E3DA17: parse_json_auditor (exchange_api_handle.c:408)
==26071== by 0x4E3E988: decode_keys_json (exchange_api_handle.c:596)
==26071== by 0x4E3EF47: keys_completed_cb (exchange_api_handle.c:717)
==26071== by 0x5978936: GNUNET_CURL_perform (curl.c:472)
==26071== by 0x5978EAC: context_task (curl_reschedule.c:94)
==26071== by 0x5BCF30D: run_ready (scheduler.c:670)
==26071== by 0x5BCFC58: GNUNET_SCHEDULER_run (scheduler.c:937)
==26071== by 0x1156CF: main (test_exchange_api.c:3755)
==26071==
==26071== 290 (128 direct, 162 indirect) bytes in 1 blocks are definitely lost in loss record 70 of 86
==26071== at 0x4C2BBAF: malloc (vg_replace_malloc.c:299)
==26071== by 0x5DF956C: ??? (in /usr/lib/x86_64-linux-gnu/libjansson.so.4.9.0)
==26071== by 0x5DFDD16: json_object (in /usr/lib/x86_64-linux-gnu/libjansson.so.4.9.0)
==26071== by 0x5DFCB64: ??? (in /usr/lib/x86_64-linux-gnu/libjansson.so.4.9.0)
==26071== by 0x5DFCF68: json_vpack_ex (in /usr/lib/x86_64-linux-gnu/libjansson.so.4.9.0)
==26071== by 0x5DFD17F: json_pack (in /usr/lib/x86_64-linux-gnu/libjansson.so.4.9.0)
==26071== by 0x5369812: handle_admin_add_incoming (fakebank.c:359)
==26071== by 0x536A418: handle_mhd_request (fakebank.c:637)
==26071== by 0x6C5E7FE: call_connection_handler (connection.c:1929)
==26071== by 0x6C60716: MHD_connection_handle_idle (connection.c:3134)
==26071== by 0x6C6300E: call_handlers (daemon.c:1154)
==26071== by 0x6C670A0: internal_run_from_select (daemon.c:3375)
==26071==
==26071== 501 (63 direct, 438 indirect) bytes in 1 blocks are definitely lost in loss record 76 of 86
==26071== at 0x4C2BBAF: malloc (vg_replace_malloc.c:299)
==26071== by 0x5DF97BA: ??? (in /usr/lib/x86_64-linux-gnu/libjansson.so.4.9.0)
==26071== by 0x5DFE756: json_object_set_new_nocheck (in /usr/lib/x86_64-linux-gnu/libjansson.so.4.9.0)
==26071== by 0x5DFAD95: ??? (in /usr/lib/x86_64-linux-gnu/libjansson.so.4.9.0)
==26071== by 0x5DFAD69: ??? (in /usr/lib/x86_64-linux-gnu/libjansson.so.4.9.0)
==26071== by 0x5DFAF59: ??? (in /usr/lib/x86_64-linux-gnu/libjansson.so.4.9.0)
==26071== by 0x5DFAD69: ??? (in /usr/lib/x86_64-linux-gnu/libjansson.so.4.9.0)
==26071== by 0x5DFB105: ??? (in /usr/lib/x86_64-linux-gnu/libjansson.so.4.9.0)
==26071== by 0x5DFB3AD: json_loadb (in /usr/lib/x86_64-linux-gnu/libjansson.so.4.9.0)
==26071== by 0x59784E5: download_get_result (curl.c:413)
==26071== by 0x5978915: GNUNET_CURL_perform (curl.c:469)
==26071== by 0x5978EAC: context_task (curl_reschedule.c:94)
==26071==
==26071== 580 (160 direct, 420 indirect) bytes in 2 blocks are definitely lost in loss record 78 of 86
==26071== at 0x4C2BBAF: malloc (vg_replace_malloc.c:299)
==26071== by 0x5DFDCEA: json_object (in /usr/lib/x86_64-linux-gnu/libjansson.so.4.9.0)
==26071== by 0x5DFCB64: ??? (in /usr/lib/x86_64-linux-gnu/libjansson.so.4.9.0)
==26071== by 0x5DFCF68: json_vpack_ex (in /usr/lib/x86_64-linux-gnu/libjansson.so.4.9.0)
==26071== by 0x5DFD17F: json_pack (in /usr/lib/x86_64-linux-gnu/libjansson.so.4.9.0)
==26071== by 0x5369812: handle_admin_add_incoming (fakebank.c:359)
==26071== by 0x536A418: handle_mhd_request (fakebank.c:637)
==26071== by 0x6C5E7FE: call_connection_handler (connection.c:1929)
==26071== by 0x6C60716: MHD_connection_handle_idle (connection.c:3134)
==26071== by 0x6C6300E: call_handlers (daemon.c:1154)
==26071== by 0x6C670A0: internal_run_from_select (daemon.c:3375)
==26071== by 0x6C67798: MHD_select (daemon.c:3636)
==26071==
==26071== 580 (116 direct, 464 indirect) bytes in 2 blocks are definitely lost in loss record 79 of 86
==26071== at 0x4C2BBAF: malloc (vg_replace_malloc.c:299)
==26071== by 0x5DF97BA: ??? (in /usr/lib/x86_64-linux-gnu/libjansson.so.4.9.0)
==26071== by 0x5DFE756: json_object_set_new_nocheck (in /usr/lib/x86_64-linux-gnu/libjansson.so.4.9.0)
==26071== by 0x5DFCC11: ??? (in /usr/lib/x86_64-linux-gnu/libjansson.so.4.9.0)
==26071== by 0x5DFCF68: json_vpack_ex (in /usr/lib/x86_64-linux-gnu/libjansson.so.4.9.0)
==26071== by 0x5DFD17F: json_pack (in /usr/lib/x86_64-linux-gnu/libjansson.so.4.9.0)
==26071== by 0x5369812: handle_admin_add_incoming (fakebank.c:359)
==26071== by 0x536A418: handle_mhd_request (fakebank.c:637)
==26071== by 0x6C5E7FE: call_connection_handler (connection.c:1929)
==26071== by 0x6C60716: MHD_connection_handle_idle (connection.c:3134)
==26071== by 0x6C6300E: call_handlers (daemon.c:1154)
==26071== by 0x6C670A0: internal_run_from_select (daemon.c:3375)
==26071==
==26071== 1,002 (160 direct, 842 indirect) bytes in 2 blocks are definitely lost in loss record 84 of 86
==26071== at 0x4C2BBAF: malloc (vg_replace_malloc.c:299)
==26071== by 0x5DFDCEA: json_object (in /usr/lib/x86_64-linux-gnu/libjansson.so.4.9.0)
==26071== by 0x5DFACC4: ??? (in /usr/lib/x86_64-linux-gnu/libjansson.so.4.9.0)
==26071== by 0x5DFAD69: ??? (in /usr/lib/x86_64-linux-gnu/libjansson.so.4.9.0)
==26071== by 0x5DFAF59: ??? (in /usr/lib/x86_64-linux-gnu/libjansson.so.4.9.0)
==26071== by 0x5DFAD69: ??? (in /usr/lib/x86_64-linux-gnu/libjansson.so.4.9.0)
==26071== by 0x5DFB105: ??? (in /usr/lib/x86_64-linux-gnu/libjansson.so.4.9.0)
==26071== by 0x5DFB3AD: json_loadb (in /usr/lib/x86_64-linux-gnu/libjansson.so.4.9.0)
==26071== by 0x59784E5: download_get_result (curl.c:413)
==26071== by 0x5978915: GNUNET_CURL_perform (curl.c:469)
==26071== by 0x5978EAC: context_task (curl_reschedule.c:94)
==26071== by 0x5BCF30D: run_ready (scheduler.c:670)
==26071==
==26071== 3,132 (48 direct, 3,084 indirect) bytes in 1 blocks are definitely lost in loss record 86 of 86
==26071== at 0x4C2BBAF: malloc (vg_replace_malloc.c:299)
==26071== by 0x5DFDF3A: json_array (in /usr/lib/x86_64-linux-gnu/libjansson.so.4.9.0)
==26071== by 0x5DFAEAC: ??? (in /usr/lib/x86_64-linux-gnu/libjansson.so.4.9.0)
==26071== by 0x5DFAD69: ??? (in /usr/lib/x86_64-linux-gnu/libjansson.so.4.9.0)
==26071== by 0x5DFAF59: ??? (in /usr/lib/x86_64-linux-gnu/libjansson.so.4.9.0)
==26071== by 0x5DFAD69: ??? (in /usr/lib/x86_64-linux-gnu/libjansson.so.4.9.0)
==26071== by 0x5DFB105: ??? (in /usr/lib/x86_64-linux-gnu/libjansson.so.4.9.0)
==26071== by 0x5DFB3AD: json_loadb (in /usr/lib/x86_64-linux-gnu/libjansson.so.4.9.0)
==26071== by 0x59784E5: download_get_result (curl.c:413)
==26071== by 0x5978915: GNUNET_CURL_perform (curl.c:469)
==26071== by 0x5978EAC: context_task (curl_reschedule.c:94)
==26071== by 0x5BCF30D: run_ready (scheduler.c:670)
==26071==
==26071== LEAK SUMMARY:
==26071== definitely lost: 776 bytes in 14 blocks
==26071== indirectly lost: 5,410 bytes in 83 blocks
==26071== possibly lost: 0 bytes in 0 blocks
==26071== still reachable: 4,722 bytes in 69 blocks
==26071== suppressed: 0 bytes in 0 blocks
==26071== Reachable blocks (those to which a pointer was found) are not shown.
==26071== To see them, rerun with: --leak-check=full --show-leak-kinds=all
Steps To ReproduceFound by valgrinding the test. Suggests code needs to be checked more carefully...
TagsNo tags attached.

Activities

Christian Grothoff

2017-06-04 12:18

manager   ~0012211

As of ad850ce..4694810, only this one is left (and this one is TRICKY):

==568==
==568== 3,132 (48 direct, 3,084 indirect) bytes in 1 blocks are definitely lost in loss record 67 of 67
==568== at 0x4C2BBAF: malloc (vg_replace_malloc.c:299)
==568== by 0x5DFDF3A: json_array (in /usr/lib/x86_64-linux-gnu/libjansson.so.4.9.0)
==568== by 0x5DFAEAC: ??? (in /usr/lib/x86_64-linux-gnu/libjansson.so.4.9.0)
==568== by 0x5DFAD69: ??? (in /usr/lib/x86_64-linux-gnu/libjansson.so.4.9.0)
==568== by 0x5DFAF59: ??? (in /usr/lib/x86_64-linux-gnu/libjansson.so.4.9.0)
==568== by 0x5DFAD69: ??? (in /usr/lib/x86_64-linux-gnu/libjansson.so.4.9.0)
==568== by 0x5DFB105: ??? (in /usr/lib/x86_64-linux-gnu/libjansson.so.4.9.0)
==568== by 0x5DFB3AD: json_loadb (in /usr/lib/x86_64-linux-gnu/libjansson.so.4.9.0)
==568== by 0x59784E5: download_get_result (curl.c:413)
==568== by 0x5978915: GNUNET_CURL_perform (curl.c:469)
==568== by 0x5978EAC: context_task (curl_reschedule.c:94)
==568== by 0x5BCF30D: run_ready (scheduler.c:670)
==568== by 0x5BCFC58: GNUNET_SCHEDULER_run (scheduler.c:937)
==568== by 0x1156CF: main (test_exchange_api.c:3755)
==568==

Christian Grothoff

2017-06-04 12:25

manager   ~0012212

Should be all fixed in 4694810..2f74a5b

Issue History

Date Modified Username Field Change
2017-06-01 23:04 Christian Grothoff New Issue
2017-06-01 23:04 Christian Grothoff Status new => assigned
2017-06-01 23:04 Christian Grothoff Assigned To => Christian Grothoff
2017-06-04 12:18 Christian Grothoff Note Added: 0012211
2017-06-04 12:25 Christian Grothoff Status assigned => resolved
2017-06-04 12:25 Christian Grothoff Resolution open => fixed
2017-06-04 12:25 Christian Grothoff Fixed in Version => 0.3
2017-06-04 12:25 Christian Grothoff Note Added: 0012212
2017-06-06 14:18 Christian Grothoff Status resolved => closed