View Issue Details

IDProjectCategoryView StatusLast Update
0002319GNUnetDHT servicepublic2012-06-02 19:15
ReporterMatthias Wachs Assigned ToChristian Grothoff  
PriorityurgentSeveritycrashReproducibilitysometimes
Status closedResolutionfixed 
Product VersionGit master 
Target Version0.9.3Fixed in Version0.9.3 
Summary0002319: Segfault in DHT service
DescriptionI was running a peer for the weekend ...
Revision 21268
Additional InformationLoaded symbols for /lib/x86_64-linux-gnu/libpthread.so.0
Core was generated by `gnunet-service-dht -c /home/mwachs/.gnunet/gnunet.conf'.
Program terminated with signal 11, Segmentation fault.
#0 0x00007f53b7e8b536 in testBit (bitArray=0x28164e0 "", bitIdx=191719091) at container_bloomfilter.c:167
167 if (bitArray[slot] & targetBit)
(gdb) bt
#0 0x00007f53b7e8b536 in testBit (bitArray=0x28164e0 "", bitIdx=191719091) at container_bloomfilter.c:167
#1 0x00007f53b7e8bf08 in testBitCallback (cls=0x7fffafd8148c, bf=0x7f53b79df248, bit=191719091) at container_bloomfilter.c:432
#2 0x00007f53b7e8bde4 in iterateBits (bf=0x7f53b79df248, callback=0x7f53b7e8bed9 <testBitCallback>, arg=0x7fffafd8148c, key=0x7fffafd81510) at container_bloomfilter.c:360
#3 0x00007f53b7e8c9fc in GNUNET_CONTAINER_bloomfilter_test (bf=0x7f53b79df248, e=0x7fffafd81510) at container_bloomfilter.c:706
#4 0x00007f53b6490e38 in block_plugin_dht_evaluate (cls=0x0, type=GNUNET_BLOCK_TYPE_DHT_HELLO, query=0x7fffafd81630, bf=0x1b61f58, bf_mutator=-926727940, xquery=0x1b61f80, xquery_size=0,
    reply_block=0x7fffafd81b08, reply_block_size=486) at plugin_block_dht.c:96
#5 0x00007f53b82d8012 in GNUNET_BLOCK_evaluate (ctx=0x1aa0fb0, type=GNUNET_BLOCK_TYPE_DHT_HELLO, query=0x7fffafd81630, bf=0x1b61f58, bf_mutator=-926727940, xquery=0x1b61f80,
    xquery_size=0, reply_block=0x7fffafd81b08, reply_block_size=486) at block.c:217
#6 0x000000000040d41d in process (cls=0x7fffafd81740, key=0x7fffafd81ac8, value=0x1b61ed0) at gnunet-service-dht_routing.c:201
#7 0x00007f53b7e9087a in GNUNET_CONTAINER_multihashmap_get_multiple (map=0x1aa4d40, key=0x7fffafd81ac8, it=0x40d2c8 <process>, it_cls=0x7fffafd81740) at container_multihashmap.c:485
#8 0x000000000040d808 in GDS_ROUTING_process (type=GNUNET_BLOCK_TYPE_DHT_HELLO, expiration_time=..., key=0x7fffafd81ac8, put_path_length=0, put_path=0x7fffafd81b08, get_path_length=1,
    get_path=0x7fffafd817b0, data=0x7fffafd81b08, data_size=486) at gnunet-service-dht_routing.c:295
#9 0x000000000040d043 in handle_dht_p2p_result (cls=0x0, peer=0x7fffafd81a58, message=0x7fffafd81ab0, atsi=0x7fffafd81a98, atsi_count=3) at gnunet-service-dht_neighbours.c:1941
#10 0x00007f53b8f01fc6 in main_notify_handler (cls=0x1af63a0, msg=0x7fffafd81a50) at core_api.c:956
#11 0x00007f53b7e7e2a9 in receive_task (cls=0x1af7120, tc=0x7fffafd81d90) at client.c:584
#12 0x00007f53b7eafc81 in run_ready (rs=0x1aaf390, ws=0x1aaf420) at scheduler.c:602
#13 0x00007f53b7eb048a in GNUNET_SCHEDULER_run (task=0x7f53b7ebcd84 <service_task>, task_cls=0x7fffafd82070) at scheduler.c:790
#14 0x00007f53b7ebe81c in GNUNET_SERVICE_run (argc=3, argv=0x7fffafd822d8, service_name=0x40de20 "dht", options=GNUNET_SERVICE_OPTION_NONE, task=0x402b67 <run>, task_cls=0x0)
    at service.c:1773
#15 0x0000000000402d20 in main (argc=3, argv=0x7fffafd822d8) at gnunet-service-dht.c:184
(gdb)
TagsNo tags attached.

Activities

Christian Grothoff

2012-05-07 10:34

manager   ~0005801

gnunet9@gnunet.org has similar fun:

(gdb) ba
#0 0x00007f2449899475 in *__GI_raise (sig=<optimized out>) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
#1 0x00007f244989c6f0 in *__GI_abort () at abort.c:92
#2 0x00007f244a087969 in GNUNET_abort () at common_logging.c:273
#3 0x00007f244a08eec5 in iterateBits (bf=0x1bb8320, callback=0x7f244a08ec50 <testBitCallback>, arg=0x7fff0325e52c, key=<optimized out>) at container_bloomfilter.c:354
#4 0x00007f244a08fdba in GNUNET_CONTAINER_bloomfilter_test (bf=<optimized out>, e=<optimized out>) at container_bloomfilter.c:706
#5 0x00007f2447e9cfd8 in block_plugin_dht_evaluate (cls=<optimized out>, type=<optimized out>, query=<optimized out>, bf=<optimized out>, bf_mutator=<optimized out>,
    xquery=<optimized out>, xquery_size=0, reply_block=0x7fff0325e968, reply_block_size=486) at plugin_block_dht.c:96
#6 0x000000000040a574 in process (cls=0x7fff0325e6d0, key=0x7fff0325e928, value=0x1ba9350) at gnunet-service-dht_routing.c:201
#7 0x00007f244a092a6d in GNUNET_CONTAINER_multihashmap_get_multiple (map=<optimized out>, key=0x7fff0325e928, it=0x40a4d0 <process>, it_cls=0x7fff0325e6d0) at container_multihashmap.c:485
#8 0x000000000040a8f8 in GDS_ROUTING_process (type=<optimized out>, expiration_time=..., key=0x7fff0325e928, put_path_length=<optimized out>, put_path=<optimized out>,
    get_path_length=<optimized out>, get_path=0x7fff0325e740, data=0x7fff0325e968, data_size=<optimized out>) at gnunet-service-dht_routing.c:295
#9 0x00000000004062f0 in handle_dht_p2p_result (cls=<optimized out>, peer=<optimized out>, message=0x7fff0325e910, atsi=<optimized out>, atsi_count=<optimized out>)
    at gnunet-service-dht_neighbours.c:1941
#10 0x00007f244b0e80b7 in main_notify_handler (cls=0x1b71c40, msg=0x7fff0325e8b0) at core_api.c:956
#11 0x00007f244a0850f7 in receive_task (cls=0x1b71f80, tc=<optimized out>) at client.c:584
#12 0x00007f244a0abe60 in run_ready (ws=0x1b3ebb0, rs=0x1b3eb20) at scheduler.c:602
#13 GNUNET_SCHEDULER_run (task=<optimized out>, task_cls=<optimized out>) at scheduler.c:790
#14 0x00007f244a0b46a9 in GNUNET_SERVICE_run (argc=5, argv=<optimized out>, service_name=<optimized out>, options=<optimized out>, task=<optimized out>, task_cls=0x0) at service.c:1773
#15 0x0000000000402d66 in main (argc=<optimized out>, argv=<optimized out>) at gnunet-service-dht.c:184

Christian Grothoff

2012-05-09 21:56

manager   ~0005835

bit index is wrong, and as it was calculated modulo bf->bitArraySize, this means the Bloom filter either got corrupted or was free'd earlier.

Christian Grothoff

2012-05-09 22:00

manager   ~0005836

GDS_ROUTING_add frees request entries (and BFs) but does NOT remove them from the hash map. That looks bad --- and would only arise after peers run for a while...

Christian Grothoff

2012-05-09 22:03

manager   ~0005837

Fixed in SVN 21396.

Issue History

Date Modified Username Field Change
2012-05-07 10:08 Matthias Wachs New Issue
2012-05-07 10:34 Christian Grothoff Note Added: 0005801
2012-05-07 13:15 Christian Grothoff Assigned To => Christian Grothoff
2012-05-07 13:15 Christian Grothoff Status new => assigned
2012-05-07 13:15 Christian Grothoff Target Version => 0.9.3
2012-05-07 13:15 Christian Grothoff Priority normal => urgent
2012-05-09 21:56 Christian Grothoff Note Added: 0005835
2012-05-09 22:00 Christian Grothoff Note Added: 0005836
2012-05-09 22:03 Christian Grothoff Note Added: 0005837
2012-05-09 22:03 Christian Grothoff Status assigned => resolved
2012-05-09 22:03 Christian Grothoff Fixed in Version => 0.9.3
2012-05-09 22:03 Christian Grothoff Resolution open => fixed
2012-06-02 19:15 Christian Grothoff Status resolved => closed