View Issue Details

IDProjectCategoryView StatusLast Update
0002652GNUnettransport servicepublic2012-12-21 15:49
Reportercy Assigned ToChristian Grothoff Due Date
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 08:17

manager   ~0006587

Fixed in SVN 24941.

Issue History

Date ModifiedUsernameFieldChange
2012-11-13 22:25cyNew Issue
2012-11-13 22:25cyStatusnew => assigned
2012-11-13 22:25cyAssigned To => Matthias Wachs
2012-11-14 08:17Christian GrothoffNote Added: 0006587
2012-11-14 08:17Christian GrothoffAssigned ToMatthias Wachs => Christian Grothoff
2012-11-14 08:17Christian GrothoffTarget Version => 0.9.5
2012-11-14 08:18Christian GrothoffStatusassigned => resolved
2012-11-14 08:18Christian GrothoffFixed in Version => 0.9.5
2012-11-14 08:18Christian GrothoffResolutionopen => fixed
2012-11-19 08:32Matthias WachsRelationship addedhas duplicate 0002654
2012-12-21 15:49Christian GrothoffStatusresolved => closed