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

servald crashing in performance_timing #103

Open jonashoechst opened 8 years ago

jonashoechst commented 8 years ago

We discoverd a bug in performance_timing.c which causes servald to crash in our 100 nodes hub scenario. The config enabled debug.timing=true.

Servald crashed on two nodes, which produced almost the same FATAL report.

qemu7-serval.txt qemu10-serval.txt

lakeman commented 8 years ago

Looks like it might be some kind of "use after free" problem.

Our "network_destination" structs are reference counted and should only be released when all uses are gone.

Added debug.ref_counts option in d7e1e40 that might help to work out if we are missing a reference increment.