View Issue Details

IDProjectCategoryView StatusLast Update
0003693GNUnettransport servicepublic2018-06-07 00:25
Reporteramatus Assigned ToChristian Grothoff  
PrioritynormalSeverityminorReproducibilityhave not tried
Status closedResolutionfixed 
Product VersionGit master 
Target Version0.11.0pre66Fixed in Version0.11.0pre66 
Summary0003693: NPE in transport (rev 35298)
DescriptionAll I have of this one is a partial backtrace that was still in my console buffer.
Additional InformationProgram terminated with signal SIGSEGV, Segmentation fault.
#0 idx_of (key=0x0, map=0x1841f20) at container_multipeermap.c:252
252 return kx % map->map_length;
(gdb) bt
#0 idx_of (key=0x0, map=0x1841f20) at container_multipeermap.c:252
#1 GNUNET_CONTAINER_multipeermap_get_multiple (map=0x1841f20, key=0x0,
    it=it@entry=0x4056a0 <find_ai_cb>, it_cls=it_cls@entry=0x7ffec78809d0)
    at container_multipeermap.c:763
#2 0x00000000004054dd in find_ai (address=<optimized out>, session=<optimized out>)
    at gnunet-service-transport_ats.c:187
#3 0x0000000000405b66 in GST_ats_block_reset (address=<optimized out>, session=<optimized out>)
    at gnunet-service-transport_ats.c:361
#4 0x0000000000411717 in GST_neighbours_handle_session_ack (message=message@entry=0x7ffec7880cc8,
    address=address@entry=0x2ca0080, session=session@entry=0x2cdf730)
    at gnunet-service-transport_neighbours.c:3502
#5 0x000000000040509e in GST_receive_callback (cls=cls@entry=0x1842180,
    address=address@entry=0x2ca0080, session=session@entry=0x2cdf730,
    message=message@entry=0x7ffec7880cc8) at gnunet-service-transport.c:452
#6 0x0000000000418821 in GST_manipulation_recv (cls=0x1842180, address=0x2ca0080, session=0x2cdf730,
    message=0x7ffec7880cc8) at gnunet-service-transport_manipulation.c:412
#7 0x00007f52daf4c827 in process_inbound_tokenized_messages (cls=0x18b43b0, client=0x7ffec7880b50,
    hdr=0x7ffec7880cc8) at plugin_transport_udp.c:2268
#8 0x00007f52e0963651 in GNUNET_SERVER_mst_receive (mst=0x18b2510,
    client_identity=client_identity@entry=0x7ffec7880b50, buf=<optimized out>,
    buf@entry=0x7ffec7880cc8 "", size=4, purge=purge@entry=1, one_shot=one_shot@entry=0)
    at server_mst.c:262
#9 0x00007f52daf4b0bc in process_udp_message (plugin=plugin@entry=0x18b43b0, msg=msg@entry=0x7ffec7880ca0Quit
TagsNo tags attached.

Activities

Christian Grothoff

2015-02-28 18:00

manager   ~0008940

Last edited: 2015-02-28 18:01

Ok, that suggests that the 'primary_address.address' of a neighbour was NULL, even though we're in state = PSY_SYN_RECV_ACK _or_ ack_state = ACK_SEND_ACK, which really means we did try (and succeed) to send a SYN and are waiting for an ACK.

That suggests that the primary_address *used* to be non-NULL, but maybe it got reset to NULL without the state being changed appropriately?

Christian Grothoff

2015-02-28 18:08

manager   ~0008941

Maybe related:

Feb 28 17:04:22-548056 transport-27481 WARNING Received unexpected ACK message from peer `64TF' in state S_SYN_SENT/UNDEFINED
Feb 28 17:10:29-084498 transport-27481 WARNING Received unexpected ACK message from peer `GN10' in state S_SYN_SENT/UNDEFINED
Feb 28 17:17:27-781194 transport-27481 WARNING Received unexpected ACK message from peer `GN10' in state S_SYN_SENT/UNDEFINED

Christian Grothoff

2015-03-02 21:41

manager   ~0008970

So far, I cannot reproduce it and it is unclear how this happens. Please report if you still see it -- or find out how to reproduce.

amatus

2015-06-24 21:59

developer   ~0009336

I saw this again at SVN rev 35969 and caught it with AddressSanatizer:

==24164==ERROR: AddressSanitizer: SEGV on unknown address 0x00000000 (pc 0xb718a681 sp 0xbff4a5d0 bp 0xbff4a668 T0)
    #0 0xb718a680 in idx_of /root/gnunet/src/util/container_multipeermap.c:251
    #1 0xb718e45e in GNUNET_CONTAINER_multipeermap_get_multiple /root/gnunet/src/util/container_multipeermap.c:763
    #2 0x804eb47 in find_ai /root/gnunet/src/transport/gnunet-service-transport_ats.c:193
    #3 0x804f3e5 in GST_ats_block_reset /root/gnunet/src/transport/gnunet-service-transport_ats.c:368
    #4 0x80718ab in GST_neighbours_handle_session_ack /root/gnunet/src/transport/gnunet-service-transport_neighbours.c:3558
    #5 0x804cafe in GST_receive_callback /root/gnunet/src/transport/gnunet-service-transport.c:452
    #6 0x8080853 in GST_manipulation_recv /root/gnunet/src/transport/gnunet-service-transport_manipulation.c:412
    #7 0xb504b351 in handle_tcp_data /root/gnunet/src/transport/plugin_transport_tcp.c:2516
    #8 0xb71e3ef8 in GNUNET_SERVER_inject /root/gnunet/src/util/server.c:997
    #9 0xb71e50a7 in client_message_tokenizer_callback /root/gnunet/src/util/server.c:1256
    #10 0xb71ea90b in GNUNET_SERVER_mst_receive /root/gnunet/src/util/server_mst.c:262
    #11 0xb71e4c56 in process_incoming /root/gnunet/src/util/server.c:1178
    #12 0xb717290e in receive_ready /root/gnunet/src/util/connection.c:1139
    #13 0xb71db497 in run_ready /root/gnunet/src/util/scheduler.c:587
    #14 0xb71dc1b6 in GNUNET_SCHEDULER_run /root/gnunet/src/util/scheduler.c:867
    #15 0xb71f923f in GNUNET_SERVICE_run /root/gnunet/src/util/service.c:1503
    #16 0x804e6f9 in main /root/gnunet/src/transport/gnunet-service-transport.c:929
    #17 0xb6f97722 in __libc_start_main (/lib/i386-linux-gnu/libc.so.6+0x19722)
    #18 0x804afd0 (/opt/gnunet/lib/gnunet/libexec/gnunet-service-transport+0x804afd0)

AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV /root/gnunet/src/util/container_multipeermap.c:251 idx_of
==24164==ABORTING

amatus

2015-06-28 01:22

developer   ~0009355

SVN rev 36015 changes this from an NPE to a GNUNET_break (0);

Christian Grothoff

2015-06-28 15:53

manager   ~0009361

Fixed in 36019.

We simply say that if PA is NULL, we must be in the wrong state to process the ack.

Issue History

Date Modified Username Field Change
2015-02-28 16:48 amatus New Issue
2015-02-28 16:48 amatus Status new => assigned
2015-02-28 16:48 amatus Assigned To => Matthias Wachs
2015-02-28 18:00 Christian Grothoff Note Added: 0008940
2015-02-28 18:01 Christian Grothoff Note Edited: 0008940
2015-02-28 18:08 Christian Grothoff Note Added: 0008941
2015-02-28 18:33 Christian Grothoff Assigned To Matthias Wachs => Christian Grothoff
2015-02-28 18:34 Christian Grothoff Target Version => 0.11.0pre66
2015-03-02 21:41 Christian Grothoff Note Added: 0008970
2015-03-02 21:41 Christian Grothoff Status assigned => feedback
2015-03-02 21:41 Christian Grothoff Target Version 0.11.0pre66 =>
2015-03-02 21:41 Christian Grothoff Assigned To Christian Grothoff =>
2015-03-21 00:37 Christian Grothoff Target Version => 0.11.0
2015-06-24 21:59 amatus Note Added: 0009336
2015-06-24 21:59 amatus Status feedback => new
2015-06-28 01:22 amatus Note Added: 0009355
2015-06-28 01:22 amatus Severity crash => minor
2015-06-28 15:53 Christian Grothoff Note Added: 0009361
2015-06-28 15:53 Christian Grothoff Status new => resolved
2015-06-28 15:53 Christian Grothoff Fixed in Version => 0.11.0pre66
2015-06-28 15:53 Christian Grothoff Resolution open => fixed
2015-06-28 15:53 Christian Grothoff Assigned To => Christian Grothoff
2015-06-28 15:54 Christian Grothoff Target Version 0.11.0 => 0.11.0pre66
2018-06-07 00:25 Christian Grothoff Status resolved => closed