View Issue Details

IDProjectCategoryView StatusLast Update
0002323GNUnettransport servicepublic2012-06-02 19:15
ReporterChristian Grothoff Assigned ToMatthias Wachs  
PriorityhighSeveritycrashReproducibilityhave not tried
Status closedResolutionfixed 
Product VersionGit master 
Target Version0.9.3Fixed in Version0.9.3 
Summary0002323: segfault due to memory corruption
DescriptionAlso from gnunet.org:

gnunet9@tripwire:~$ gdb bin/gnunet-service-transport core.26502
GNU gdb (GDB) 7.4-debian
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /home/gnunet9/bin/gnunet-service-transport...done.

warning: core file may not match specified executable file.
[New LWP 26502]

warning: Can't read pathname for load map: Input/output error.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `gnunet-service-transport -c /home/gnunet9/.gnunet/gnunet.conf -l ~/.gnunet//tra'.
Program terminated with signal 11, Segmentation fault.
#0 _int_malloc (av=0x7f71b1317e60, bytes=64) at malloc.c:4304
4304 malloc.c: No such file or directory.
(gdb) ba
#0 _int_malloc (av=0x7f71b1317e60, bytes=64) at malloc.c:4304
#1 0x00007f71b100f8d0 in *__GI___libc_malloc (bytes=64) at malloc.c:3660
#2 0x00007f71b17b49e6 in GNUNET_xmalloc_unchecked_ (size=64, filename=<optimized out>, linenumber=<optimized out>) at common_allocation.c:139
#3 0x00007f71b17b4a31 in GNUNET_xmalloc_ (size=<optimized out>, filename=0x7f71b17e6380 "client.c", linenumber=1069) at common_allocation.c:66
#4 0x00007f71b17b3adc in GNUNET_CLIENT_notify_transmit_ready (client=0x11f19a0, size=90, timeout=..., auto_retry=<optimized out>, notify=<optimized out>, notify_cls=<optimized out>) at client.c:1069
#5 0x00007f71b2002541 in do_transmit (sh=0x11f1670) at ats_api_scheduling.c:302
#6 0x00007f71b2004b26 in GNUNET_ATS_address_destroyed (sh=0x11f1670, address=0x126ec10, session=0x12439d0) at ats_api_scheduling.c:1153
#7 0x000000000040a10a in reset_task (cls=0x185e130, tc=<optimized out>) at gnunet-service-transport_neighbours.c:523
#8 0x00007f71b17d9e60 in run_ready (ws=0x11f04d0, rs=0x11f0440) at scheduler.c:602
#9 GNUNET_SCHEDULER_run (task=<optimized out>, task_cls=<optimized out>) at scheduler.c:790
#10 0x00007f71b17e2ae9 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
#11 0x0000000000404229 in main (argc=<optimized out>, argv=<optimized out>) at gnunet-service-transport.c:637
(gdb)
Additional InformationClearly the allocation itself is not to blame, heap must have gotten corrupted earlier.
TagsNo tags attached.

Relationships

related to 0002318 closedMatthias Wachs test_transport_api_unreliability_udp fails 

Activities

Christian Grothoff

2012-05-07 20:48

manager   ~0005803

Another crash in malloc:

gnunet9@tripwire:~$ gdb bin/gnunet-service-transport core.27576
GNU gdb (GDB) 7.4-debian
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /home/gnunet9/bin/gnunet-service-transport...done.

warning: core file may not match specified executable file.
[New LWP 27576]

warning: Can't read pathname for load map: Input/output error.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `gnunet-service-transport -c /home/gnunet9/.gnunet/gnunet.conf -l ~/.gnunet//tra'.
Program terminated with signal 11, Segmentation fault.
#0 _int_malloc (av=0x7f31557cee60, bytes=64) at malloc.c:4304
4304 malloc.c: No such file or directory.
(gdb) ba
#0 _int_malloc (av=0x7f31557cee60, bytes=64) at malloc.c:4304
#1 0x00007f31554c68d0 in *__GI___libc_malloc (bytes=64) at malloc.c:3660
#2 0x00007f3155c6b9e6 in GNUNET_xmalloc_unchecked_ (size=64, filename=<optimized out>, linenumber=<optimized out>) at common_allocation.c:139
#3 0x00007f3155c6ba31 in GNUNET_xmalloc_ (size=<optimized out>, filename=0x7f3155c9d380 "client.c", linenumber=1069) at common_allocation.c:66
#4 0x00007f3155c6aadc in GNUNET_CLIENT_notify_transmit_ready (client=0x23a2200, size=57, timeout=..., auto_retry=<optimized out>, notify=<optimized out>, notify_cls=<optimized out>) at client.c:1069
#5 0x00007f3155ead685 in schedule_action (h=0x2357bd0) at statistics_api.c:1057
#6 0x00007f3155eae4c5 in transmit_action (cls=0x2357bd0, size=82, buf=0x2357560) at statistics_api.c:860
#7 0x00007f3155c69905 in client_notify (cls=0x2693070, size=<optimized out>, buf=<optimized out>) at client.c:1027
#8 0x00007f3155c703c0 in process_notify (connection=0x23a2130) at connection.c:1157
#9 transmit_ready (cls=0x23a2130, tc=<optimized out>) at connection.c:1288
#10 0x00007f3155c90e60 in run_ready (ws=0x23564d0, rs=0x2356440) at scheduler.c:602
#11 GNUNET_SCHEDULER_run (task=<optimized out>, task_cls=<optimized out>) at scheduler.c:790
#12 0x00007f3155c99ae9 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
#13 0x0000000000404229 in main (argc=<optimized out>, argv=<optimized out>) at gnunet-service-transport.c:637
(gdb)

Christian Grothoff

2012-05-07 20:49

manager   ~0005804

And one more:

gnunet9@tripwire:~$ gdb bin/gnunet-service-transport core.28565
GNU gdb (GDB) 7.4-debian
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /home/gnunet9/bin/gnunet-service-transport...done.

warning: core file may not match specified executable file.
[New LWP 28565]

warning: Can't read pathname for load map: Input/output error.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `gnunet-service-transport -c /home/gnunet9/.gnunet/gnunet.conf -l ~/.gnunet//tra'.
Program terminated with signal 11, Segmentation fault.
#0 _int_malloc (av=0x7f03f6d14e60, bytes=60) at malloc.c:4304
4304 malloc.c: No such file or directory.
(gdb) ba
#0 _int_malloc (av=0x7f03f6d14e60, bytes=60) at malloc.c:4304
#1 0x00007f03f6a0c8d0 in *__GI___libc_malloc (bytes=60) at malloc.c:3660
#2 0x00007f03f71b19e6 in GNUNET_xmalloc_unchecked_ (size=60, filename=<optimized out>, linenumber=<optimized out>) at common_allocation.c:139
#3 0x00007f03f71b1a31 in GNUNET_xmalloc_ (size=<optimized out>, filename=0x7f03f25d1216 "plugin_transport_tcp.c", linenumber=1030) at common_allocation.c:66
#4 0x00007f03f25cde8f in tcp_plugin_send (cls=0x22e97c0, session=0x230d100, msgbuf=0x7fff60022de0 "", msgbuf_size=4, priority=<optimized out>, to=..., cont=0, cont_cls=0x0) at plugin_transport_tcp.c:1030
#5 0x00000000004097b9 in send_with_session (n=0x230d780, msgbuf=0x7fff60022de0 "", msgbuf_size=4, timeout=..., cont=0, cont_cls=0x0, priority=<optimized out>) at gnunet-service-transport_neighbours.c:663
#6 0x000000000040b47b in GST_neighbours_keepalive (neighbour=<optimized out>) at gnunet-service-transport_neighbours.c:2122
#7 0x000000000040402d in plugin_env_receive_callback (cls=<optimized out>, peer=0x230d240, message=0x7fff60023050, ats=0x7fff60022ec0, ats_count=1, session=0x230d100, sender_address=0x0, sender_address_len=0)
    at gnunet-service-transport.c:269
#8 0x00007f03f25cf147 in handle_tcp_data (cls=0x22e97c0, client=0x230b6f0, message=0x7fff60023050) at plugin_transport_tcp.c:1955
#9 0x00007f03f71d8502 in GNUNET_SERVER_inject (server=0x22e9740, sender=0x230b6f0, message=0x7fff60023050) at server.c:882
#10 0x00007f03f71d9320 in client_message_tokenizer_callback (cls=<optimized out>, client=0x230b6f0, message=<optimized out>) at server.c:1087
#11 0x00007f03f71d990f in GNUNET_SERVER_mst_receive (mst=0x22f0ac0, client_identity=0x230b6f0, buf=<optimized out>, size=4, purge=0, one_shot=-1) at server_mst.c:264
#12 0x00007f03f71d9281 in process_incoming (cls=0x230b6f0, buf=0x7fff60023050, available=4, addr=0x22b70d0, addrlen=<optimized out>, errCode=0) at server.c:1030
#13 0x00007f03f71b5ea2 in receive_ready (cls=0x230c7f0, tc=<optimized out>) at connection.c:1055
#14 0x00007f03f71d6e60 in run_ready (ws=0x229e4d0, rs=0x229e440) at scheduler.c:602
#15 GNUNET_SCHEDULER_run (task=<optimized out>, task_cls=<optimized out>) at scheduler.c:790
#16 0x00007f03f71dfae9 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
#17 0x0000000000404229 in main (argc=<optimized out>, argv=<optimized out>) at gnunet-service-transport.c:637

Christian Grothoff

2012-05-07 20:51

manager   ~0005805

Now running transport with valgrind on gnunet.org...

Christian Grothoff

2012-05-10 00:04

manager   ~0005841

We've fixed several memory issues in util since. If the issue doesn't arise again soon, I think we can probably close these...

Issue History

Date Modified Username Field Change
2012-05-07 20:48 Christian Grothoff New Issue
2012-05-07 20:48 Christian Grothoff Status new => assigned
2012-05-07 20:48 Christian Grothoff Assigned To => Matthias Wachs
2012-05-07 20:48 Christian Grothoff Note Added: 0005803
2012-05-07 20:49 Christian Grothoff Note Added: 0005804
2012-05-07 20:51 Christian Grothoff Note Added: 0005805
2012-05-07 21:11 Christian Grothoff Relationship added related to 0002318
2012-05-10 00:04 Christian Grothoff Note Added: 0005841
2012-05-10 00:07 Christian Grothoff Status assigned => feedback
2012-05-10 10:36 Christian Grothoff Status feedback => resolved
2012-05-10 10:36 Christian Grothoff Fixed in Version => 0.9.3
2012-05-10 10:36 Christian Grothoff Resolution open => fixed
2012-06-02 19:15 Christian Grothoff Status resolved => closed