View Issue Details

IDProjectCategoryView StatusLast Update
0002260GNUnetDHT servicepublic2012-06-02 17:15
Reporterschanzen Assigned ToChristian Grothoff Due Date
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionfixed 
Product VersionGit master 
Target Version0.9.3Fixed in Version0.9.3 
Summary0002260: Disconnect in DHT put continuation is dangerous
DescriptionThe continuation of a put call in the DHT cannot be used to disconnect from the DHT service because the handle is still needed after the continuation.

Workarounds: use a SCHEDULER_add_now in continuation and disconnect from service after the api call.

However this should work transparently because the user of the api cannot know how long the handle is still needed
Steps To Reproduce1. Connect to DHT
2. Put sth and add continuation
3. Disconnect from DHT service in continuation
TagsNo tags attached.

Relationships

related to 0002277 closedChristian Grothoff DHT PUT continuation should only be called after confirmation from service 

Activities

Matthias Wachs

2012-04-12 08:46

reporter   ~0005710

Last edited: 2012-04-12 08:46

Added documentation in src

schanzen

2012-04-12 08:57

administrator   ~0005711

The note will help as to avoid the bug. But when exactly is the disconnect supposed to be called. I.e. How can you determine when all puts have finished?

Christian Grothoff

2012-04-12 09:35

manager   ~0005712

(11:33:58 AM) schanzen: how/when is the disconnect supposed to happen?
(11:35:02 AM) grothoff-office: You just add another task (GNUNET_SCHEDULER_add_now) inside the 'cont' and in that task do the disconnect.

Christian Grothoff

2012-04-26 16:55

manager   ~0005749

Issue is documented, I double checked that it is not possible to re-write the code to always call 'cont' from a location where it would be safe to call GNUNET_DHT_disconnect directly.

Issue History

Date ModifiedUsernameFieldChange
2012-04-10 12:22schanzenNew Issue
2012-04-12 08:46Matthias WachsNote Added: 0005710
2012-04-12 08:46Matthias WachsNote Edited: 0005710
2012-04-12 08:57schanzenNote Added: 0005711
2012-04-12 09:35Christian GrothoffNote Added: 0005712
2012-04-23 15:58Christian GrothoffAssigned To => Christian Grothoff
2012-04-23 15:58Christian GrothoffStatusnew => assigned
2012-04-23 15:59Christian GrothoffRelationship addedduplicate of 0002277
2012-04-23 15:59Christian GrothoffRelationship deleted0002277
2012-04-23 15:59Christian GrothoffRelationship addedrelated to 0002277
2012-04-23 16:02Christian GrothoffTarget Version => 0.9.3
2012-04-26 16:55Christian GrothoffNote Added: 0005749
2012-04-26 16:55Christian GrothoffStatusassigned => resolved
2012-04-26 16:55Christian GrothoffFixed in Version => 0.9.3
2012-04-26 16:55Christian GrothoffResolutionopen => fixed
2012-06-02 17:15Christian GrothoffStatusresolved => closed