View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0001889 | GNUnet | NAT traversal library | public | 2011-11-08 14:18 | 2011-11-30 18:38 |
| Reporter | LRN | Assigned To | |||
| Priority | high | Severity | crash | Reproducibility | unable to reproduce |
| Status | closed | Resolution | unable to reproduce | ||
| Product Version | Git master | ||||
| Target Version | 0.9.0 | Fixed in Version | 0.9.0 | ||
| Summary | 0001889: Crash in nat during tcp plugin unloading | ||||
| Description | From the backtrace it looks like: A) There was a range violation when working with local_addrlens array OR B) local_addrlens was freed twice Since the code that frees local_addrlens looks like this: GNUNET_free_non_null (h->local_addrs); GNUNET_free_non_null (h->local_addrlens); GNUNET_free_non_null (h->external_address); GNUNET_free_non_null (h->internal_address); I suggest to set h->local_addrlens (and other arrays) to NULL after freeing them. It might help. crashinfo3.txt contains the copy of the backtrace. | ||||
| Additional Information | Attaching to process 13432 [New Thread 13432.0x12d0] [New Thread 13432.0x270c] [New Thread 13432.0x1c34] [New Thread 13432.0x3488] [New Thread 13432.0x29b8] Reading symbols from d:\progs\gnunet\bin\gnunet-service-transport.exe...done. [Switching to Thread 13432.0x29b8] Continuing. Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 13432.0x12d0] 0x772515ee in ntdll!LdrQueryProcessModuleInformation () from E:\Windows\SysWOW64\ntdll.dll [Switching to thread 1 (Thread 13432.0x12d0)] #0 0x772515ee in ntdll!LdrQueryProcessModuleInformation () from E:\Windows\SysWOW64\ntdll.dll #0 0x772515ee in ntdll!LdrQueryProcessModuleInformation () from E:\Windows\SysWOW64\ntdll.dll #1 0x772515ee in ntdll!LdrQueryProcessModuleInformation () from E:\Windows\SysWOW64\ntdll.dll #2 0x7724015e in ntdll!LdrFindResource_U () from E:\Windows\SysWOW64\ntdll.dll #3 0x0028f59c in ?? () #4 0x7725e003 in ntdll!LdrWx86FormatVirtualImage () from E:\Windows\SysWOW64\ntdll.dll #5 0x01f42920 in ?? () #6 0x76a298cd in msvcrt!free () from E:\Windows\syswow64\msvcrt.dll #7 0x00590000 in ?? () #8 0x62485d43 in GNUNET_xfree_ (ptr=0x1f42920, filename=0x499080 "nat.c", linenumber=1295) at common_allocation.c:202 #9 0x004942a8 in _fu95__skip_log () at nat.c:1295 #10 0x6c387c73 in libgnunet_plugin_transport_tcp_done (cls=0x1f3cdb8) at plugin_transport_tcp.c:2066 #11 0x624ad774 in GNUNET_PLUGIN_unload (library_name=0x1f40b20 "libgnunet_plugin_transport_tcp", arg=0x1f3cdb8) at plugin.c:270 #12 0x0040f113 in GST_plugins_unload () at gnunet-service-transport_plugins.c:160 #13 0x00402012 in shutdown_task (cls=0x0, tc=0x28fc90) at gnunet-service-transport.c:455 #14 0x624b3b9b in run_ready (rs=0x1f3c138, ws=0x1f3c250) at scheduler.c:684 #15 0x624b42e3 in GNUNET_SCHEDULER_run (task=0x624be19c <service_task>, task_cls=0x28fe28) at scheduler.c:864 #16 0x624bee80 in GNUNET_SERVICE_run (argc=3, argv=0x1f3a090, serviceName=0x414293 "transport", opt=GNUNET_SERVICE_OPTION_NONE, task=0x4020a2 <run>, task_cls=0x0) at service.c:1584 #17 0x0040240f in main (argc=3, argv=0x1f3a090) at gnunet-service-transport.c:556 (gdb) up 9 #9 0x004942a8 in _fu95__skip_log () at nat.c:1295 1295 GNUNET_free_non_null (h->local_addrlens); (gdb) p h->local_addrlens $1 = (socklen_t *) 0x1f42920 (gdb) p *h $2 = {cfg = 0x1f39bc0, address_callback = 0x6c381295 <tcp_nat_port_map_callback>, reversal_callback = 0x6c386fb8 <try_connection_reversal>, callback_cls = 0x1f3dce8, ext_dns = 0x0, hostname_dns = 0x0, server_stdout = 0x0, server_stdout_handle = 0x0, lal_head = 0x0, lal_tail = 0x0, server_retry_delay = {rel_value = 1000}, server_read_task = 0, ifc_task = 0, hostname_task = 0, dns_task = 0, bind_task = 0, ifc_scan_frequency = {rel_value = 3000000}, hostname_dns_frequency = {rel_value = 1200000}, dyndns_frequency = {rel_value = 140000}, server_proc = 0x0, local_addrs = 0x1f42930, local_addrlens = 0x1f42920, mini_head = 0x0, mini_tail = 0x0, num_local_addrs = 2, external_address = 0x1f43c70 "127.0.0.1", internal_address = 0x1f43c58 "127.0.0.1", behind_nat = 0, nat_punched = 0, enable_nat_client = -1, enable_nat_server = -1, enable_upnp = 0, use_localaddresses = 1, return_localaddress = 0, use_hostname = 0, disable_ipv6 = 1, is_tcp = 1, adv_port = 2086} (gdb) p/x (DWORD[4])*(DWORD*)0x0028f59c $3 = {0xc0000005, 0x0, 0x0, 0x7725e3fb} (gdb) p *h->local_addrlens $4 = 0 | ||||
| Tags | No tags attached. | ||||
| Attached Files | crashinfo3.txt (3,446 bytes)
Attaching to process 13432
[New Thread 13432.0x12d0]
[New Thread 13432.0x270c]
[New Thread 13432.0x1c34]
[New Thread 13432.0x3488]
[New Thread 13432.0x29b8]
Reading symbols from d:\progs\gnunet\bin\gnunet-service-transport.exe...done.
[Switching to Thread 13432.0x29b8]
Continuing.
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 13432.0x12d0]
0x772515ee in ntdll!LdrQueryProcessModuleInformation () from E:\Windows\SysWOW64\ntdll.dll
[Switching to thread 1 (Thread 13432.0x12d0)]
#0 0x772515ee in ntdll!LdrQueryProcessModuleInformation () from E:\Windows\SysWOW64\ntdll.dll
#0 0x772515ee in ntdll!LdrQueryProcessModuleInformation () from E:\Windows\SysWOW64\ntdll.dll
#1 0x772515ee in ntdll!LdrQueryProcessModuleInformation () from E:\Windows\SysWOW64\ntdll.dll
#2 0x7724015e in ntdll!LdrFindResource_U () from E:\Windows\SysWOW64\ntdll.dll
#3 0x0028f59c in ?? ()
#4 0x7725e003 in ntdll!LdrWx86FormatVirtualImage () from E:\Windows\SysWOW64\ntdll.dll
#5 0x01f42920 in ?? ()
#6 0x76a298cd in msvcrt!free () from E:\Windows\syswow64\msvcrt.dll
#7 0x00590000 in ?? ()
#8 0x62485d43 in GNUNET_xfree_ (ptr=0x1f42920, filename=0x499080 "nat.c", linenumber=1295) at common_allocation.c:202
#9 0x004942a8 in _fu95__skip_log () at nat.c:1295
#10 0x6c387c73 in libgnunet_plugin_transport_tcp_done (cls=0x1f3cdb8) at plugin_transport_tcp.c:2066
#11 0x624ad774 in GNUNET_PLUGIN_unload (library_name=0x1f40b20 "libgnunet_plugin_transport_tcp", arg=0x1f3cdb8) at plugin.c:270
#12 0x0040f113 in GST_plugins_unload () at gnunet-service-transport_plugins.c:160
#13 0x00402012 in shutdown_task (cls=0x0, tc=0x28fc90) at gnunet-service-transport.c:455
#14 0x624b3b9b in run_ready (rs=0x1f3c138, ws=0x1f3c250) at scheduler.c:684
#15 0x624b42e3 in GNUNET_SCHEDULER_run (task=0x624be19c <service_task>, task_cls=0x28fe28) at scheduler.c:864
#16 0x624bee80 in GNUNET_SERVICE_run (argc=3, argv=0x1f3a090, serviceName=0x414293 "transport", opt=GNUNET_SERVICE_OPTION_NONE,
task=0x4020a2 <run>, task_cls=0x0) at service.c:1584
#17 0x0040240f in main (argc=3, argv=0x1f3a090) at gnunet-service-transport.c:556
(gdb) up 9
#9 0x004942a8 in _fu95__skip_log () at nat.c:1295
1295 GNUNET_free_non_null (h->local_addrlens);
(gdb) p h->local_addrlens
$1 = (socklen_t *) 0x1f42920
(gdb) p *h
$2 = {cfg = 0x1f39bc0, address_callback = 0x6c381295 <tcp_nat_port_map_callback>, reversal_callback = 0x6c386fb8 <try_connection_reversal>,
callback_cls = 0x1f3dce8, ext_dns = 0x0, hostname_dns = 0x0, server_stdout = 0x0, server_stdout_handle = 0x0, lal_head = 0x0, lal_tail = 0x0,
server_retry_delay = {rel_value = 1000}, server_read_task = 0, ifc_task = 0, hostname_task = 0, dns_task = 0, bind_task = 0,
ifc_scan_frequency = {rel_value = 3000000}, hostname_dns_frequency = {rel_value = 1200000}, dyndns_frequency = {rel_value = 140000},
server_proc = 0x0, local_addrs = 0x1f42930, local_addrlens = 0x1f42920, mini_head = 0x0, mini_tail = 0x0, num_local_addrs = 2,
external_address = 0x1f43c70 "127.0.0.1", internal_address = 0x1f43c58 "127.0.0.1", behind_nat = 0, nat_punched = 0, enable_nat_client = -1,
enable_nat_server = -1, enable_upnp = 0, use_localaddresses = 1, return_localaddress = 0, use_hostname = 0, disable_ipv6 = 1, is_tcp = 1,
adv_port = 2086}
(gdb) p/x (DWORD[4])*(DWORD*)0x0028f59c
$3 = {0xc0000005, 0x0, 0x0, 0x7725e3fb}
(gdb) p *h->local_addrlens
$4 = 0 | ||||
|
|
Haven't seen it for a few testruns. Probably fixed? |
|
|
Unless there was some random memory corruption in the overall process, I don't recall anyone making any specific fix :-(. |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2011-11-08 14:18 | LRN | New Issue | |
| 2011-11-08 14:18 | LRN | File Added: crashinfo3.txt | |
| 2011-11-12 04:36 | LRN | Note Added: 0004906 | |
| 2011-11-14 23:29 | Christian Grothoff | Status | new => feedback |
| 2011-11-15 09:15 | Christian Grothoff | Note Added: 0004919 | |
| 2011-11-15 13:56 | Christian Grothoff | Priority | normal => high |
| 2011-11-19 01:25 | Christian Grothoff | Reproducibility | have not tried => unable to reproduce |
| 2011-11-19 01:25 | Christian Grothoff | Status | feedback => resolved |
| 2011-11-19 01:25 | Christian Grothoff | Resolution | open => unable to reproduce |
| 2011-11-19 01:25 | Christian Grothoff | Fixed in Version | => 0.9.0 |
| 2011-11-19 01:25 | Christian Grothoff | Target Version | => 0.9.0 |
| 2011-11-30 18:38 | Christian Grothoff | Status | resolved => closed |