View Issue Details

IDProjectCategoryView StatusLast Update
0002197GNUnetstatistics servicepublic2012-06-02 19:15
ReporterChristian Grothoff Assigned ToChristian Grothoff  
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 23: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 21: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 Modified Username Field Change
2012-03-05 22:14 Christian Grothoff New Issue
2012-03-07 18:54 Bart Polot Relationship added related to 0002201
2012-03-09 00:36 Christian Grothoff Assigned To => Christian Grothoff
2012-03-09 00:36 Christian Grothoff Status new => assigned
2012-03-16 23:49 Christian Grothoff Priority high => urgent
2012-04-21 23:05 Christian Grothoff Note Added: 0005730
2012-04-22 21:53 Christian Grothoff Note Added: 0005731
2012-04-22 21:53 Christian Grothoff Status assigned => resolved
2012-04-22 21:53 Christian Grothoff Fixed in Version => 0.9.3
2012-04-22 21:53 Christian Grothoff Resolution open => fixed
2012-06-02 19:15 Christian Grothoff Status resolved => closed