View Issue Details

IDProjectCategoryView StatusLast Update
0002654GNUnettransport servicepublic2024-05-03 13:59
ReporterLRN Assigned ToMatthias Wachs  
PrioritynormalSeveritycrashReproducibilityalways
Status closedResolutionfixed 
Target Version0.9.5 
Summary0002654: TCP uses invalid session when behind NAT
DescriptionPreviously it happened only, like, once in a few days, now it happens in a few minutes after i kill and restart transport service.

Version is, like, r24970 or so (i.e. a few days old).
Additional Information
ноя 18 10:02:52-00000000003221587019 transport-11032 ERROR Assertion failed at plugin_transport_tcp.c:1105.
ноя 18 10:03:02-00000000003221597012 util-scheduler-11032 ERROR Attempt to cancel dead task 27652!
ноя 18 10:03:02-00000000003221597012 transport-11032 ERROR Assertion failed at scheduler.c:913.


Program received signal SIGTRAP, Trace/breakpoint trap.
[Switching to Thread 11032.0x2c68]
0x76e0321a in KERNELBASE!DeleteAce () from C:\Windows\syswow64\KernelBase.dll
(gdb) bt
#0  0x76e0321a in KERNELBASE!DeleteAce () from C:\Windows\syswow64\KernelBase.dll
#1  0x62b46b28 in GNUNET_abort () at common_logging.c:291
#2  0x62b80741 in GNUNET_SCHEDULER_cancel (task=27652) at scheduler.c:913
#3  0x6c383ece in disconnect_session (session=0x3198d28) at plugin_transport_tcp.c:980
#4  0x6c3850f9 in nat_connect_timeout (cls=0x3198d28, tc=0x28fc80) at plugin_transport_tcp.c:1234
#5  0x62b7fa55 in run_ready (rs=0x7197e8, ws=0x71a800) at scheduler.c:597
#6  0x62b801f3 in GNUNET_SCHEDULER_run (task=0x62b8c54b <service_task>, task_cls=0x28fe18) at scheduler.c:785
#7  0x62b8d378 in GNUNET_SERVICE_run (argc=3, argv=0x1cebe78, service_name=0x41935a <__register_frame_info+4297562> "transport", options=GNUNET_SERVICE_OPTION_NONE, task=0x402bd8 <run>, task_cls=0x0) at service.c:1813
#8  0x00402dd7 in main (argc=3, argv=0x1cebe78) at gnunet-service-transport.c:702


Previously this failed assertion led to a crash in curl_easy_pause() (without backtrace, since my curl is compiled without debug info). Now it cancels dead task instead.
TagsNo tags attached.

Relationships

duplicate of 0002652 closedChristian Grothoff timed out task crashes transport 

Activities

Matthias Wachs

2012-11-19 09:31

manager   ~0006603

TCP not HTTP ...

LRN

2012-11-19 10:18

developer   ~0006604

Well, previously it crashed in _HTTP_ transport plugin (i did mention curl?). Afterwards it started to crash in TCP. Crashes occurred more often probably because TCP is more common than HTTP.

After updating my node, i haven't seen these.

Anyway, if it's a duplicate of a resolved bug, does it mean that this bug should also be resolved?

Matthias Wachs

2012-11-19 10:28

manager   ~0006605

After updating my node, i haven't seen these. <- which?
this bug should also be resolved? <- which?

LRN

2012-11-19 11:04

developer   ~0006606

which -> crash in http transport or tcp transport. Running newly compiled GNUnet node (after my debugging of bloom filter problems last evening) for hours, no crashes.
which -> THIS bug, 0002654

Matthias Wachs

2012-11-19 11:17

manager   ~0006607

If TCP crashes /w > SVN 24941 than the bug is not fixed ...
which revision are you runngin

LRN

2012-11-19 11:41

developer   ~0006608

What version i ran when i had these crashes, i don't remember (GNUnet itself never tells you its version - by the way, that should be fixed), as i've updated my source tree a few times after compiling the binaries.

Currently i'm running r25036.

Matthias Wachs

2012-11-27 14:11

manager   ~0006612

Reproduced it on my laptop:
- Never happend when BEHIND_NAT=NO
- Happens when NAT is enabled

Matthias Wachs

2012-11-30 17:04

manager   ~0006621

Trying to reproduce failed.

Running tests in a real VM with NAT

Matthias Wachs

2012-12-03 14:24

manager   ~0006627

Great Virtualbox just crashes with GNUnet and NAT enabled


[272132.558678] NAT[25574]: segfault at 100000036 ip 00007f94d0e61a8e sp 00007f94b5430ab0 error 6 in VBoxDD.so[7f94d0d87000+231000]


Using qemu

Matthias Wachs

2012-12-10 10:02

manager   ~0006658

Last edited: 2012-12-10 10:04

Ok ... I could not reproduce it.

When looking at the dump above my assumption is:

- Something crashed transport
- service restart
- ATS still knows about address with session
- returns this session to restarted transport service

=> Break in plugin_transport_tcp.c:1105 due to invalid session!

The transport crash could be caused by:

TCP: 0002652: timed out task crashes transport
https://www.gnunet.org/bugs/view.php?id=2652
-> fixed resolved and not reopened

HTTP: 2674 ERROR Assertion failed at plugin_transport_http_client.c:555.
https://www.gnunet.org/bugs/view.php?id=2674
-> fixed resolved and not reopened

I heavily try to reproduce but I need feedback if 2652 and 2674 fixed transport crash and due to that this bug!

Matthias Wachs

2012-12-10 12:02

manager   ~0006660

fixed session check code in plugin_transport_tcp.c in revision 25337.

If error still occurs it should look like:

18 10:02:52-00000000003221587019 transport-11032 ERROR Assertion failed at plugin_transport_tcp.c:1058.
18 10:02:52-00000000003221587019 transport-11032 ERROR Trying to send with invalid session XYZ

Matthias Wachs

2012-12-13 14:04

manager   ~0006696

LRN on 12/10/2012: Running per for 4 days without crash

Me: No crash for 2 days.

LRN

2012-12-13 14:33

developer   ~0006697

Haven't seen any "Trying to send with invalid session" messages in my log either. Running r25337 for 2 days now.

Matthias Wachs

2012-12-13 17:22

manager   ~0006699

Suggestion keep open until (a couple of days) before release and then close

Matthias Wachs

2012-12-14 09:33

manager   ~0006707

No crash all night long with 25449

Matthias Wachs

2012-12-17 10:44

manager   ~0006716

No crash while running peer for 3 days with ~30 connected peers

-> Close

Issue History

Date Modified Username Field Change
2012-11-18 07:08 LRN New Issue
2012-11-18 07:08 LRN Status new => assigned
2012-11-18 07:08 LRN Assigned To => Matthias Wachs
2012-11-19 09:30 Matthias Wachs Category HTTP transport => TCP transport
2012-11-19 09:31 Matthias Wachs Note Added: 0006603
2012-11-19 09:32 Matthias Wachs Relationship added duplicate of 0002652
2012-11-19 10:18 LRN Note Added: 0006604
2012-11-19 10:28 Matthias Wachs Note Added: 0006605
2012-11-19 10:28 Matthias Wachs Status assigned => feedback
2012-11-19 11:04 LRN Note Added: 0006606
2012-11-19 11:04 LRN Status feedback => assigned
2012-11-19 11:17 Matthias Wachs Note Added: 0006607
2012-11-19 11:41 LRN Note Added: 0006608
2012-11-27 14:10 Matthias Wachs Summary Crash in transport service => TCP uses invalid session when behind NAT
2012-11-27 14:11 Matthias Wachs Note Added: 0006612
2012-11-28 01:24 Christian Grothoff Target Version => 0.9.5
2012-11-30 17:04 Matthias Wachs Note Added: 0006621
2012-12-03 14:24 Matthias Wachs Note Added: 0006627
2012-12-10 10:02 Matthias Wachs Note Added: 0006658
2012-12-10 10:04 Matthias Wachs Note Edited: 0006658
2012-12-10 10:04 Matthias Wachs Status assigned => feedback
2012-12-10 12:02 Matthias Wachs Note Added: 0006660
2012-12-13 14:04 Matthias Wachs Note Added: 0006696
2012-12-13 14:33 LRN Note Added: 0006697
2012-12-13 14:33 LRN Status feedback => assigned
2012-12-13 17:22 Matthias Wachs Note Added: 0006699
2012-12-14 09:33 Matthias Wachs Note Added: 0006707
2012-12-17 10:44 Matthias Wachs Note Added: 0006716
2012-12-17 10:44 Matthias Wachs Status assigned => resolved
2012-12-17 10:44 Matthias Wachs Resolution open => fixed
2012-12-21 16:49 Christian Grothoff Status resolved => closed
2024-05-03 13:59 Christian Grothoff Category TCP transport => transport service