servalproject / serval-dna

The Serval Project's core daemon that implements Distributed Numbering Architecture (DNA), MDP, VoMP, Rhizome, MeshMS, etc.
http://servalproject.org
Other
170 stars 81 forks source link

sync_free_peer_state hanging forever #121

Closed gh0st42 closed 7 years ago

gh0st42 commented 7 years ago

I have a setup with 6 virtual devices moving over a map, all using the latest serval-dna build. Due to their mobile nature they lose connectivity every few seconds. As long as connections are there all works well. Even with changing connections after startup in idle mode everything is fine. Problems begin when inserting files or sending meshms. Nodes completely stop responding (restful and commandline). I enabled quite some debugging options (including sync related ones) but no log entries were generated. I guess servald loses the peer link in the middle of syncing. As a last resort I attached an debugger to the stopped processes:

sync_free_peer_state (state=0x128fb10, 
    peer_context=peer_context@entry=0x12902b0) at sync_keys.c:385
385     if ((*peer_state)->peer_context == peer_context){

It not only refuses to sync but also blocks any further processing of command line or curl commands until the daemon is restarted.

lakeman commented 7 years ago

Yikes, that should never work with multiple peers. Not sure how I've avoided seeing that one.