View Issue Details

IDProjectCategoryView StatusLast Update
0002098GNUnetobsoletepublic2024-05-03 13:49
ReporterLRN Assigned ToMatthias Wachs  
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionfixed 
Product VersionGit master 
Target Version0.9.2 
Summary0002098: ATS crash in test_testing_peergroup (at least)
Descriptionr19310
Steps To ReproduceRun the testsuite
Additional Information
Reading symbols from d:\progs\gnunet\bin\gnunet-service-ats.exe...done.
[Switching to Thread 4844.0x3bc]
(gdb) c
Continuing.

Program received signal SIGTRAP, Trace/breakpoint trap.
[Switching to Thread 4844.0x186c]
0x74dc280d in KERNELBASE!DeleteAce () from C:\Windows\syswow64\KernelBase.dll
(gdb) bt
#0  0x74dc280d in KERNELBASE!DeleteAce () from C:\Windows\syswow64\KernelBase.dll
#1  0x6be465a4 in GNUNET_abort () at common_logging.c:271
#2  0x004029de in _fu50__skip_log () at gnunet-service-ats_addresses.c:478
#3  0x004049cb in _fu140__skip_log () at gnunet-service-ats_scheduling.c:310
#4  0x6be7a499 in GNUNET_SERVER_inject (server=0x1f49260, sender=0x1f3fc10, message=0x27fbf0) at server.c:709
#5  0x6be7aec7 in client_message_tokenizer_callback (cls=0x1f49260, client=0x1f3fc10, message=0x27fbf0) at server.c:931
#6  0x6be7c266 in GNUNET_SERVER_mst_receive (mst=0x1f46b30, client_identity=0x1f3fc10, buf=0x27fbf0 "", size=88, purge=0, one_shot=-1) at server_mst.c:261
#7  0x6be7ac1e in process_incoming (cls=0x1f3fc10, buf=0x27fbf0, available=88, addr=0x519a00, addrlen=28, errCode=0) at server.c:860
#8  0x6be4e3f3 in receive_ready (cls=0x1f3fb70, tc=0x28fc90) at connection.c:1193
#9  0x6be771cf in run_ready (rs=0x519fe8, ws=0x51b000) at scheduler.c:684
#10 0x6be77945 in GNUNET_SCHEDULER_run (task=0x6be81cce <service_task>, task_cls=0x28fe28) at scheduler.c:874
#11 0x6be829b2 in GNUNET_SERVICE_run (argc=3, argv=0x1f3beb0, serviceName=0x4070d9 "ats", opt=GNUNET_SERVICE_OPTION_NONE, task=0x4015c0 <run>, task_cls=0x0) at service.c:1712
#12 0x0040169e in main (argc=3, argv=0x1f3beb0) at gnunet-service-ats.c:178
(gdb) up
#1  0x6be465a4 in GNUNET_abort () at common_logging.c:271
271       DebugBreak ();
(gdb)
#2  0x004029de in _fu50__skip_log () at gnunet-service-ats_addresses.c:478
478       GNUNET_assert (in_use != old->used);
(gdb) p in_use
$1 = 0
(gdb) p old->used
$2 = 0
(gdb) l
473       aa = create_address(peer, plugin_name, plugin_addr, plugin_addr_len, session_id);
474       old = find_address (peer, aa);
475       free_address (aa);
476
477       GNUNET_assert (old != NULL);
478       GNUNET_assert (in_use != old->used);
479       old->used = in_use;
480
481     #if HAVE_LIBGLPK
482       if (ats_mode == MLP)
(gdb) p *old
$3 = {next = 0x0, prev = 0x0, peer = {hashPubKey = {bits = {3508865970, 3518500030, 2088481241, 1792205799, 2286606330, 3076554955, 2735315140, 3174061298, 2852722836, 3940961708, 4116518759, 1913829521, 186676142,
        2601151634, 1111825572, 3622570386}}}, addr_len = 0, session_id = 1, ats_count = 1, addr = 0x51f7d8, plugin = 0x1f476b0 "tcp", mlp_information = 0x0, ats = 0x1f476c0, atsp_latency = {rel_value = 0},
  atsp_utilization_in = {value__ = 0}, atsp_utilization_out = {value__ = 0}, atsp_distance = 1, atsp_cost_wan = 0, atsp_cost_lan = 0, atsp_cost_wlan = 0, atsp_network_type = 0, assigned_bw_in = {value__ = 0},
  assigned_bw_out = {value__ = 0}, active = 0, used = 0}
(gdb) p *aa
$4 = {next = 0x51f868, prev = 0x51f6a8, peer = {hashPubKey = {bits = {3508865970, 3518500030, 2088481241, 1792205799, 2286606330, 3076554955, 2735315140, 3174061298, 2852722836, 3940961708, 4116518759, 1913829521,
        186676142, 2601151634, 1111825572, 3622570386}}}, addr_len = 6, session_id = 1, ats_count = 0, addr = 0x1f4dc40, plugin = 0x1f47690 " ", mlp_information = 0x0, ats = 0x0, atsp_latency = {rel_value = 0},
  atsp_utilization_in = {value__ = 0}, atsp_utilization_out = {value__ = 0}, atsp_distance = 0, atsp_cost_wan = 0, atsp_cost_lan = 0, atsp_cost_wlan = 0, atsp_network_type = 0, assigned_bw_in = {value__ = 0},
TagsNo tags attached.

Activities

Matthias Wachs

2012-01-23 10:07

reporter   ~0005342

Analysis:

Address marked as unused 2x

Matthias Wachs

2012-01-23 11:08

reporter   ~0005343

Always the same call order causing the problem:
gnunet-service-transport_neighbours.c:901
gnunet-service-transport_neighbours.c:1703


Jan 23 11:06:32-564855 transport-9918 ERROR GNUNET_ATS_address_in_use 901
Jan 23 11:06:32-578677 transport-9932 ERROR GNUNET_ATS_address_in_use 1703
Jan 23 11:06:32-578880 ats-9933 ERROR ERROR: old: NOT USED --> new: NOT USED

Matthias Wachs

2012-01-23 13:18

reporter   ~0005345

New analysis:

Address is not marked correctly marked as used in ATS
n 23 13:10:10-579158 transport-29893 ERROR YES: 2439 : `9P6V' `127.0.0.1:12030' 0x208cf80
Jan 23 13:10:10-579189 ats-api-29893 ERROR YES: 1101 : `9P6V' 6 0x208cf80
Jan 23 13:10:10-579657 ats-29894 ERROR ERROR: `9P6V' 6 session 2, old: NOT USED --> new: USED
...
Jan 23 13:10:14-158551 transport-29893 ERROR NO: 1705 : `9P6V' `127.0.0.1:12030' 0x208cf80
Jan 23 13:10:14-158566 ats-api-29893 ERROR NO: 1101 : `9P6V' 6 0x208cf80
Jan 23 13:10:14-158650 ats-29894 ERROR ERROR: `9P6V' 0 session 2, old: NOT USED --> new: NOT USED

Matthias Wachs

2012-01-23 13:47

reporter   ~0005349

Address updates work not correctly:

Jan 23 13:42:12-509333 transport-2962 ERROR YES: 2439 : `4Q99' `127.0.0.1:12042' address 0xd7d730
Jan 23 13:42:12-509366 transport-2962 ERROR YES: 1101 : `4Q99' 6 address 0xd7d730
Jan 23 13:42:12-510197 ats-2963 ERROR ERROR: 0x24b9980 `4Q99' 6 session 3, old: NOT USED --> new: USED

Jan 23 13:42:14-001763 transport-2962 ERROR NO: 1705 : `4Q99' `127.0.0.1:12042' 0xd7d730
Jan 23 13:42:14-001783 transport-2962 ERROR NO: 1101 : `4Q99' 6 0xd7d730
Jan 23 13:42:14-001926 ats-2963 ERROR ERROR: 0x24b9d10 `4Q99' 0 session 3, old: NOT USED --> new: NOT USED

--> 0x24b9980 != 0x24b9d10

Matthias Wachs

2012-01-23 14:16

reporter   ~0005351

Bug found:

Address uses outbound connection:
Jan 23 14:11:53-147538 transport-4132 ERROR YES: 2347 : `4Q99' `127.0.0.1:12042' session (nil)
Jan 23 14:11:53-147646 ats-4133 ERROR ERROR: 0xe7e5d0 `4Q99' 6 session 0, old: NOT USED --> new: USED

Then peer updates inbound session from NULL to 0x14b9730
Transport notifies about wrong "address in use" session

Jan 23 14:11:54-658048 transport-4132 ERROR NO: 1705 : `4Q99' `127.0.0.1:12042' 0x14b9730
Jan 23 14:11:54-658239 ats-4133 ERROR ERROR: 0xe7e740 `4Q99' 6 session 3, old: NOT USED --> new: NOT USED

Matthias Wachs

2012-01-23 16:11

reporter   ~0005354

End the end:

multiple errors at the same time:
- transport did not update the inbound session
- ats address lookup was wrong
- ats address update overwrote existing sessions

Matthias Wachs

2012-01-23 16:45

reporter   ~0005355

transport side fixed in revision 19330.
ats side fixed in revision 19331.

Matthias Wachs

2012-01-23 16:46

reporter   ~0005356

was not a crash but an assertion

Issue History

Date Modified Username Field Change
2012-01-22 03:21 LRN New Issue
2012-01-22 03:21 LRN Status new => assigned
2012-01-22 03:21 LRN Assigned To => Matthias Wachs
2012-01-22 21:10 Christian Grothoff Product Version => Git master
2012-01-22 21:10 Christian Grothoff Target Version => 0.9.2
2012-01-23 10:07 Matthias Wachs Note Added: 0005342
2012-01-23 10:07 Matthias Wachs Status assigned => acknowledged
2012-01-23 11:08 Matthias Wachs Note Added: 0005343
2012-01-23 13:18 Matthias Wachs Note Added: 0005345
2012-01-23 13:47 Matthias Wachs Note Added: 0005349
2012-01-23 14:16 Matthias Wachs Note Added: 0005351
2012-01-23 16:11 Matthias Wachs Note Added: 0005354
2012-01-23 16:45 Matthias Wachs Note Added: 0005355
2012-01-23 16:46 Matthias Wachs Note Added: 0005356
2012-01-23 16:46 Matthias Wachs Severity crash => major
2012-01-23 16:46 Matthias Wachs Status acknowledged => resolved
2012-01-23 16:46 Matthias Wachs Resolution open => fixed
2012-02-28 11:05 Christian Grothoff Status resolved => closed
2024-05-03 13:49 Christian Grothoff Category ATS service => obsolete