View Issue Details

IDProjectCategoryView StatusLast Update
0002652GNUnettransport servicepublic2012-12-21 16:49
Reportercy Assigned ToChristian Grothoff  
PrioritynormalSeveritycrashReproducibilityalways
Status closedResolutionfixed 
Product VersionGit master 
Target Version0.9.5Fixed in Version0.9.5 
Summary0002652: timed out task crashes transport
DescriptionBecause dead tasks are treated as fatal errors, a task that timed out is crashing gnunet-service-transport. Likely the task ID is being initialized invalidly, so the attempt to remove it considers it a dead task. Though it might be a good idea not to fatally exit when a dead task is found, instead just assuming it must either have already been executed or just be a bad task ID. The only evidence that a task is dead is the presence of a task ID integer and lack of a corresponding task, which does not need cleanup in any fashion.

As near as I can tell this is what happens:
1) session->nat_connection_timeout is set to a valid task
2) A timeout occurs
3) that task is run and removed from the queue
4) session->nat_connection_timeout is not set to GNUNET_SCHEDULER_NO_TASK
5) disconnect_session is called
6) it tries to cancel by session->nat_connection_timeout
7) there's no task by that ID on the queue!
8) blanket assert(0) causes gnunet-service-transport to crash.

simply skipping step 8 would cause no problems, as the task was run and removed properly after the appropriate delay. IMO cancelling an already run task should at the very worst result in a warning, not an abort.
Steps To ReproduceRun gnunet with my peculiar nat issues.
Cause a NAT connection timeout
Observe coredump.
Observe gnunet flopping around uselessly like a fish out of water.
Additional InformationI have the ports gnunet is set to use already forwarded manually over my router, so there should be no NAT problems.
TagsNo tags attached.

Relationships

has duplicate 0002654 closedMatthias Wachs TCP uses invalid session when behind NAT 

Activities

Christian Grothoff

2012-11-14 09:17

manager   ~0006587

Fixed in SVN 24941.

Issue History

Date Modified Username Field Change
2012-11-13 23:25 cy New Issue
2012-11-13 23:25 cy Status new => assigned
2012-11-13 23:25 cy Assigned To => Matthias Wachs
2012-11-14 09:17 Christian Grothoff Note Added: 0006587
2012-11-14 09:17 Christian Grothoff Assigned To Matthias Wachs => Christian Grothoff
2012-11-14 09:17 Christian Grothoff Target Version => 0.9.5
2012-11-14 09:18 Christian Grothoff Status assigned => resolved
2012-11-14 09:18 Christian Grothoff Fixed in Version => 0.9.5
2012-11-14 09:18 Christian Grothoff Resolution open => fixed
2012-11-19 09:32 Matthias Wachs Relationship added has duplicate 0002654
2012-12-21 16:49 Christian Grothoff Status resolved => closed