View Issue Details

IDProjectCategoryView StatusLast Update
0002197GNUnetstatistics servicepublic2012-06-02 17:15
ReporterChristian Grothoff Assigned ToChristian Grothoff Due Date
PriorityurgentSeveritymajorReproducibilityalways
Status closedResolutionfixed 
Product VersionGit master 
Target Version0.9.3Fixed in Version0.9.3 
Summary0002197: Assertion failed at statistics_api.c:426.
DescriptionThis happens, among many other instances, during the dht_2dtorus testcase. The issue is a bigger one, as the ultimate cause is the problem of how to send last-minute statistics to gnunet-service-statistics during shutdown --- at a time where the statistics service itself might already have terminated (or at least might be terminating).

This is less of an issue with statistics_api.c and more of an issue with the design of how shutdown events are managed in util/. Fixing it might require changing how server/connection/client deal with shutdown, which in turn might impact the rest of the system which currently relies on the existing semantics. Oops.
Additional InformationWhat I'm thinking *might* be the way to go is to say that CLIENT always ignores shutdown (the connection stays in place, existing requests continue to go in both directions) _until_ the application explicitly calls 'CLIENT_disconnect'. This likely breaks a few API implementations, but not most. It also reduces the ambiguity we have right now between 'timeout', 'service crash' and 'shutdown' in the notify-transmit-ready error continuation (by eliminating 'shutdown' from the list; we might choose to eliminate timeout as well by always making it 'FOREVER', not sure how many clients need non-forever timeouts right now).

Next, the SERVER/SERVICE would need a new way to address shutdown, at least for statistics itself. Maybe doing statistics in the style of ARM will be sufficient there: ignore shutdown in SERVICE, and only terminate after shutdown IF there are no clients left. That way, anyone who had a connection to statistics is guaranteed to be able to finish writing them.
TagsNo tags attached.

Relationships

related to 0002201 closedChristian Grothoff gnunet-arm -e does not detect gnunet-sercive-arm shutting down. 

Activities

Christian Grothoff

2012-04-21 21:05

manager   ~0005730

Ok, after my hacks today, connections are no longer (automatically) cut on shutdown. 'service' still kills all connections (some work required there...), but we're now pretty close to fixing the shutdown sequence so that statistics will stay alive until all clients have written back their values.

Christian Grothoff

2012-04-22 19:53

manager   ~0005731

Should be fixed in SVN 21075 with the introduction of 'soft' shutdown for services (and the ability to mark clients as 'monitor' clients).

Issue History

Date ModifiedUsernameFieldChange
2012-03-05 21:14Christian GrothoffNew Issue
2012-03-07 17:54Bart PolotRelationship addedrelated to 0002201
2012-03-08 23:36Christian GrothoffAssigned To => Christian Grothoff
2012-03-08 23:36Christian GrothoffStatusnew => assigned
2012-03-16 22:49Christian GrothoffPriorityhigh => urgent
2012-04-21 21:05Christian GrothoffNote Added: 0005730
2012-04-22 19:53Christian GrothoffNote Added: 0005731
2012-04-22 19:53Christian GrothoffStatusassigned => resolved
2012-04-22 19:53Christian GrothoffFixed in Version => 0.9.3
2012-04-22 19:53Christian GrothoffResolutionopen => fixed
2012-06-02 17:15Christian GrothoffStatusresolved => closed