View Issue Details

IDProjectCategoryView StatusLast Update
0004001GNUnetcadet servicepublic2018-06-07 00:24
ReporterBart Polot Assigned ToBart Polot  
PrioritynormalSeverityminorReproducibilityrandom
Status closedResolutionfixed 
Product VersionGit master 
Target Version0.11.0pre66 
Summary0004001: Cadet leaks memory when sending orphan messages
DescriptionSending messages that belong to no connection (connection_destroy, connection_broken) cadet seems to leak memory on shutdown.

HEAP SUMMARY:
==26412== in use at exit: 37,370 bytes in 484 blocks
==26412== total heap usage: 1,475,489,189 allocs, 1,475,488,705 frees, 53,059,490,153 bytes allocated
==26412==
==26412== 376 (176 direct, 200 indirect) bytes in 2 blocks are definitely lost in loss record 88 of 114
==26412== at 0x4C28C10: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==26412== by 0x5055C9C: GNUNET_xmalloc_unchecked_ (common_allocation.c:154)
==26412== by 0x505582A: GNUNET_xmalloc_ (common_allocation.c:75)
==26412== by 0x42EA15: GCP_queue_add (gnunet-service-cadet_peer.c:1457)
==26412== by 0x414C1B: send_broken_unknown (gnunet-service-cadet_connection.c:1049)
==26412== by 0x4163EF: connection_timeout (gnunet-service-cadet_connection.c:1538)
==26412== by 0x41648D: connection_fwd_timeout (gnunet-service-cadet_connection.c:1567)
==26412== by 0x5093967: run_ready (scheduler.c:587)
==26412== by 0x5094279: GNUNET_SCHEDULER_run (scheduler.c:868)
==26412== by 0x50A2AB5: GNUNET_SERVICE_run (service.c:1503)
==26412== by 0x4351F4: main (gnunet-service-cadet.c:174)
==26412==
==26412== 468 (88 direct, 380 indirect) bytes in 1 blocks are definitely lost in loss record 94 of 114
==26412== at 0x4C28C10: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==26412== by 0x5055C9C: GNUNET_xmalloc_unchecked_ (common_allocation.c:154)
==26412== by 0x505582A: GNUNET_xmalloc_ (common_allocation.c:75)
==26412== by 0x42EA15: GCP_queue_add (gnunet-service-cadet_peer.c:1457)
==26412== by 0x41D2EF: GCC_send_prebuilt_message (gnunet-service-cadet_connection.c:3570)
==26412== by 0x419245: GCC_handle_destroy (gnunet-service-cadet_connection.c:2335)
==26412== by 0x56E2A6D: main_notify_handler (core_api.c:967)
==26412== by 0x5051248: receive_task (client.c:623)
==26412== by 0x5093967: run_ready (scheduler.c:587)
==26412== by 0x5094279: GNUNET_SCHEDULER_run (scheduler.c:868)
==26412== by 0x50A2AB5: GNUNET_SERVICE_run (service.c:1503)
==26412== by 0x4351F4: main (gnunet-service-cadet.c:174)
==26412==
==26412== 752 (88 direct, 664 indirect) bytes in 1 blocks are definitely lost in loss record 103 of 114
==26412== at 0x4C28C10: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==26412== by 0x5055C9C: GNUNET_xmalloc_unchecked_ (common_allocation.c:154)
==26412== by 0x505582A: GNUNET_xmalloc_ (common_allocation.c:75)
==26412== by 0x42EA15: GCP_queue_add (gnunet-service-cadet_peer.c:1457)
==26412== by 0x414C1B: send_broken_unknown (gnunet-service-cadet_connection.c:1049)
==26412== by 0x4163EF: connection_timeout (gnunet-service-cadet_connection.c:1538)
==26412== by 0x4164EB: connection_bck_timeout (gnunet-service-cadet_connection.c:1589)
==26412== by 0x5093967: run_ready (scheduler.c:587)
==26412== by 0x5094279: GNUNET_SCHEDULER_run (scheduler.c:868)
==26412== by 0x50A2AB5: GNUNET_SERVICE_run (service.c:1503)
==26412== by 0x4351F4: main (gnunet-service-cadet.c:174)
==26412==
==26412== 1,120 (32 direct, 1,088 indirect) bytes in 1 blocks are definitely lost in loss record 105 of 114
==26412== at 0x4C28C10: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==26412== by 0x5055C9C: GNUNET_xmalloc_unchecked_ (common_allocation.c:154)
==26412== by 0x505582A: GNUNET_xmalloc_ (common_allocation.c:75)
==26412== by 0x41D275: GCC_send_prebuilt_message (gnunet-service-cadet_connection.c:3568)
==26412== by 0x414919: send_broken (gnunet-service-cadet_connection.c:1009)
==26412== by 0x41C21D: GCC_neighbor_disconnected (gnunet-service-cadet_connection.c:3319)
==26412== by 0x42AFF7: notify_broken (gnunet-service-cadet_peer.c:363)
==26412== by 0x506820F: GNUNET_CONTAINER_multihashmap_iterate (container_multihashmap.c:358)
==26412== by 0x42B822: core_disconnect (gnunet-service-cadet_peer.c:485)
==26412== by 0x56DED58: disconnect_and_free_peer_entry (core_api.c:389)
==26412== by 0x50698F2: GNUNET_CONTAINER_multipeermap_iterate (container_multipeermap.c:361)
==26412== by 0x56DF55E: reconnect_later (core_api.c:450)
==26412==
==26412== 2,220 (88 direct, 2,132 indirect) bytes in 1 blocks are definitely lost in loss record 111 of 114
==26412== at 0x4C28C10: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==26412== by 0x5055C9C: GNUNET_xmalloc_unchecked_ (common_allocation.c:154)
==26412== by 0x505582A: GNUNET_xmalloc_ (common_allocation.c:75)
==26412== by 0x42EA15: GCP_queue_add (gnunet-service-cadet_peer.c:1457)
==26412== by 0x41D2EF: GCC_send_prebuilt_message (gnunet-service-cadet_connection.c:3570)
==26412== by 0x414919: send_broken (gnunet-service-cadet_connection.c:1009)
==26412== by 0x41C21D: GCC_neighbor_disconnected (gnunet-service-cadet_connection.c:3319)
==26412== by 0x42AFF7: notify_broken (gnunet-service-cadet_peer.c:363)
==26412== by 0x506820F: GNUNET_CONTAINER_multihashmap_iterate (container_multihashmap.c:358)
==26412== by 0x42B822: core_disconnect (gnunet-service-cadet_peer.c:485)
==26412== by 0x56DED58: disconnect_and_free_peer_entry (core_api.c:389)
==26412== by 0x50698F2: GNUNET_CONTAINER_multipeermap_iterate (container_multipeermap.c:361)
==26412==
==26412== LEAK SUMMARY:
==26412== definitely lost: 472 bytes in 6 blocks
==26412== indirectly lost: 4,464 bytes in 51 blocks
==26412== possibly lost: 0 bytes in 0 blocks
==26412== still reachable: 32,434 bytes in 427 blocks
==26412== suppressed: 0 bytes in 0 blocks
==26412== Reachable blocks (those to which a pointer was found) are not shown.
==26412== To see them, rerun with: --leak-check=full --show-leak-kinds=all
==26412==
==26412== For counts of detected and suppressed errors, rerun with: -v
==26412== ERROR SUMMARY: 5 errors from 5 contexts (suppressed: 0 from 0)
TagsNo tags attached.

Activities

Bart Polot

2016-03-30 11:19

manager   ~0010338

Fixed in r36967.

Issue History

Date Modified Username Field Change
2015-10-08 20:01 Bart Polot New Issue
2015-10-08 20:01 Bart Polot Status new => assigned
2015-10-08 20:01 Bart Polot Assigned To => Bart Polot
2016-03-30 11:19 Bart Polot Note Added: 0010338
2016-03-30 11:19 Bart Polot Status assigned => resolved
2016-03-30 11:19 Bart Polot Resolution open => fixed
2018-06-07 00:24 Christian Grothoff Status resolved => closed