2018-11-21 05:25 CET

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0005465GNUnetutil librarypublic2018-11-01 18:02
Reporterch3 
Assigned ToChristian Grothoff 
PriorityurgentSeveritycrashReproducibilitysometimes
StatusresolvedResolutionfixed 
Product VersionSVN HEAD 
Target Version0.11.0Fixed in Version0.11.0 
Summary0005465: Cadet crash (rps profiler)
DescriptionValgrind output:

==84170== Memcheck, a memory error detector
==84170== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==84170== Using Valgrind-3.13.0 and LibVEX; rerun with -h for copyright info
==84170== Command: /home/ch3/.local/lib//gnunet/libexec/gnunet-service-cadet -c /tmp/testbedbyc08h/108/config
==84170== Parent PID: 83941
==84170==
==84170== Invalid read of size 8
==84170== at 0x50646A0: GNUNET_CONTAINER_multihashmap_get_multiple (container_multihashmap.c:837)
==84170== by 0x5057DDD: recv_message (client.c:334)
==84170== by 0x507F582: GNUNET_MST_from_buffer (mst.c:232)
==84170== by 0x5058D4A: receive_ready (client.c:421)
==84170== by 0x5093B2E: GNUNET_SCHEDULER_do_work (scheduler.c:2113)
==84170== by 0x5094999: select_loop (scheduler.c:2410)
==84170== by 0x5094999: GNUNET_SCHEDULER_run (scheduler.c:725)
==84170== by 0x50991D1: GNUNET_SERVICE_run_ (service.c:1875)
==84170== by 0x404532: main (gnunet-service-cadet.c:1510)
==84170== Address 0xbafffe0 is 16 bytes inside a block of size 24 free'd
==84170== at 0x4C2E180: free (in /gnu/store/s0ngbigcw6n6vhqwq7jif008n7qzbaxw-valgrind-3.13.0/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==84170== by 0x5063D5B: GNUNET_CONTAINER_multihashmap_remove (container_multihashmap.c:425)
==84170== by 0x56CE5D2: GNUNET_DHT_get_stop (dht_api.c:1179)
==84170== by 0x41238E: GCD_search_stop (gnunet-service-cadet_dht.c:345)
==84170== by 0x41D574: GCP_path_entry_add (gnunet-service-cadet_peer.c:883)
==84170== by 0x41B461: GCPP_try_path_from_dht (gnunet-service-cadet_paths.c:577)
==84170== by 0x411F48: dht_get_id_handler (gnunet-service-cadet_dht.c:123)
==84170== by 0x56CD1A1: process_client_result (dht_api.c:785)
==84170== by 0x5064709: GNUNET_CONTAINER_multihashmap_get_multiple (container_multihashmap.c:839)
==84170== by 0x5057DDD: recv_message (client.c:334)
==84170== by 0x507F582: GNUNET_MST_from_buffer (mst.c:232)
==84170== by 0x5058D4A: receive_ready (client.c:421)
==84170== Block was alloc'd at
==84170== at 0x4C2EE18: calloc (in /gnu/store/s0ngbigcw6n6vhqwq7jif008n7qzbaxw-valgrind-3.13.0/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==84170== by 0x5059C78: GNUNET_xmalloc_ (common_allocation.c:73)
==84170== by 0x50643CA: GNUNET_CONTAINER_multihashmap_put (container_multihashmap.c:785)
==84170== by 0x56CE32F: GNUNET_DHT_get_start (dht_api.c:1108)
==84170== by 0x4122A9: GCD_search (gnunet-service-cadet_dht.c:316)
==84170== by 0x41C125: consider_peer_activate (gnunet-service-cadet_peer.c:437)
==84170== by 0x41E738: GCP_get_tunnel (gnunet-service-cadet_peer.c:1344)
==84170== by 0x409EFE: GCCH_channel_local_new (gnunet-service-cadet_channel.c:710)
==84170== by 0x406917: handle_channel_create (gnunet-service-cadet.c:601)
==84170== by 0x5095059: service_client_mst_cb (service.c:2160)
==84170== by 0x507F582: GNUNET_MST_from_buffer (mst.c:232)
==84170== by 0x509ABE4: service_client_recv (service.c:2181)
==84170==
==84170== Invalid read of size 8
==84170== at 0x50646AB: GNUNET_CONTAINER_multihashmap_get_multiple (container_multihashmap.c:836)
==84170== by 0x5057DDD: recv_message (client.c:334)
==84170== by 0x507F582: GNUNET_MST_from_buffer (mst.c:232)
==84170== by 0x5058D4A: receive_ready (client.c:421)
==84170== by 0x5093B2E: GNUNET_SCHEDULER_do_work (scheduler.c:2113)
==84170== by 0x5094999: select_loop (scheduler.c:2410)
==84170== by 0x5094999: GNUNET_SCHEDULER_run (scheduler.c:725)
==84170== by 0x50991D1: GNUNET_SERVICE_run_ (service.c:1875)
==84170== by 0x404532: main (gnunet-service-cadet.c:1510)
==84170== Address 0xbafffd8 is 8 bytes inside a block of size 24 free'd
==84170== at 0x4C2E180: free (in /gnu/store/s0ngbigcw6n6vhqwq7jif008n7qzbaxw-valgrind-3.13.0/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==84170== by 0x5063D5B: GNUNET_CONTAINER_multihashmap_remove (container_multihashmap.c:425)
==84170== by 0x56CE5D2: GNUNET_DHT_get_stop (dht_api.c:1179)
==84170== by 0x41238E: GCD_search_stop (gnunet-service-cadet_dht.c:345)
==84170== by 0x41D574: GCP_path_entry_add (gnunet-service-cadet_peer.c:883)
==84170== by 0x41B461: GCPP_try_path_from_dht (gnunet-service-cadet_paths.c:577)
==84170== by 0x411F48: dht_get_id_handler (gnunet-service-cadet_dht.c:123)
==84170== by 0x56CD1A1: process_client_result (dht_api.c:785)
==84170== by 0x5064709: GNUNET_CONTAINER_multihashmap_get_multiple (container_multihashmap.c:839)
==84170== by 0x5057DDD: recv_message (client.c:334)
==84170== by 0x507F582: GNUNET_MST_from_buffer (mst.c:232)
==84170== by 0x5058D4A: receive_ready (client.c:421)
==84170== Block was alloc'd at
==84170== at 0x4C2EE18: calloc (in /gnu/store/s0ngbigcw6n6vhqwq7jif008n7qzbaxw-valgrind-3.13.0/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==84170== by 0x5059C78: GNUNET_xmalloc_ (common_allocation.c:73)
==84170== by 0x50643CA: GNUNET_CONTAINER_multihashmap_put (container_multihashmap.c:785)
==84170== by 0x56CE32F: GNUNET_DHT_get_start (dht_api.c:1108)
==84170== by 0x4122A9: GCD_search (gnunet-service-cadet_dht.c:316)
==84170== by 0x41C125: consider_peer_activate (gnunet-service-cadet_peer.c:437)
==84170== by 0x41E738: GCP_get_tunnel (gnunet-service-cadet_peer.c:1344)
==84170== by 0x409EFE: GCCH_channel_local_new (gnunet-service-cadet_channel.c:710)
==84170== by 0x406917: handle_channel_create (gnunet-service-cadet.c:601)
==84170== by 0x5095059: service_client_mst_cb (service.c:2160)
==84170== by 0x507F582: GNUNET_MST_from_buffer (mst.c:232)
==84170== by 0x509ABE4: service_client_recv (service.c:2181)
==84170==
==84170== Invalid read of size 8
==84170== at 0x50646AF: GNUNET_CONTAINER_multihashmap_get_multiple (container_multihashmap.c:837)
==84170== by 0x5057DDD: recv_message (client.c:334)
==84170== by 0x507F582: GNUNET_MST_from_buffer (mst.c:232)
==84170== by 0x5058D4A: receive_ready (client.c:421)
==84170== by 0x5093B2E: GNUNET_SCHEDULER_do_work (scheduler.c:2113)
==84170== by 0x5094999: select_loop (scheduler.c:2410)
==84170== by 0x5094999: GNUNET_SCHEDULER_run (scheduler.c:725)
==84170== by 0x50991D1: GNUNET_SERVICE_run_ (service.c:1875)
==84170== by 0x404532: main (gnunet-service-cadet.c:1510)
==84170== Address 0xdf0adba0df0adc2 is not stack'd, malloc'd or (recently) free'd
==84170==
==84170==
==84170== Process terminating with default action of signal 11 (SIGSEGV): dumping core
==84170== General Protection Fault
==84170== at 0x50646AF: GNUNET_CONTAINER_multihashmap_get_multiple (container_multihashmap.c:837)
==84170== by 0x5057DDD: recv_message (client.c:334)
==84170== by 0x507F582: GNUNET_MST_from_buffer (mst.c:232)
==84170== by 0x5058D4A: receive_ready (client.c:421)
==84170== by 0x5093B2E: GNUNET_SCHEDULER_do_work (scheduler.c:2113)
==84170== by 0x5094999: select_loop (scheduler.c:2410)
==84170== by 0x5094999: GNUNET_SCHEDULER_run (scheduler.c:725)
==84170== by 0x50991D1: GNUNET_SERVICE_run_ (service.c:1875)
==84170== by 0x404532: main (gnunet-service-cadet.c:1510)
==84170==
==84170== HEAP SUMMARY:
==84170== in use at exit: 185,108 bytes in 3,387 blocks
==84170== total heap usage: 701,841 allocs, 698,454 frees, 21,268,712 bytes allocated
==84170==
==84170== LEAK SUMMARY:
==84170== definitely lost: 0 bytes in 0 blocks
==84170== indirectly lost: 0 bytes in 0 blocks
==84170== possibly lost: 0 bytes in 0 blocks
==84170== still reachable: 185,108 bytes in 3,387 blocks
==84170== suppressed: 0 bytes in 0 blocks
==84170== Rerun with --leak-check=full to see details of leaked memory
==84170==
==84170== For counts of detected and suppressed errors, rerun with: -v
==84170== ERROR SUMMARY: 3 errors from 3 contexts (suppressed: 0 from 0)
Steps To ReproduceObserved while running:

valgrind --log-file=valgrind_gnunet-rps-profiler.log .libs/gnunet-rps-profiler -c test_rps.conf -n 128 -d 30m -r 10000 -l gnunet_rps_profiler.log
TagsNo tags attached.
Attached Files

-Relationships Relation Graph ] Dependency Graph ]
+Relationships

-Notes

~0013307

Christian Grothoff (manager)

We should modify our hashmaps such that the iterators still work even if there are concurrent deletions. Too many hard-to-see bugs like this have happened over the years. I'm on it.

~0013308

Christian Grothoff (manager)

Fixed in e96725b0f..3c7d8978f
+Notes

-Issue History
Date Modified Username Field Change
2018-11-01 16:30 ch3 New Issue
2018-11-01 16:30 ch3 Status new => assigned
2018-11-01 16:30 ch3 Assigned To => Bart Polot
2018-11-01 17:54 Christian Grothoff Assigned To Bart Polot => Christian Grothoff
2018-11-01 17:55 Christian Grothoff Priority low => urgent
2018-11-01 17:55 Christian Grothoff Category cadet service => util library
2018-11-01 17:55 Christian Grothoff Target Version => 0.11.0
2018-11-01 17:55 Christian Grothoff Note Added: 0013307
2018-11-01 18:02 Christian Grothoff Status assigned => resolved
2018-11-01 18:02 Christian Grothoff Resolution open => fixed
2018-11-01 18:02 Christian Grothoff Fixed in Version => 0.11.0
2018-11-01 18:02 Christian Grothoff Note Added: 0013308
+Issue History