Race condition/error in event heap
Maybe the order of closing everything is wrong, hope the heap is okay.
2013-12-09T02:09:08 Stopping server...
2013-12-09T02:09:08 Applied differences of 'aliv4c80.collector.' to zonefile.
2013-12-09T02:09:08 SOA query of 'citadel.alive.' to '127.0.0.1@53531': Zone is up-to-date. (serial 2007120714)
2013-12-09T02:09:08 SOA query of 'example.com.' to '127.0.0.1@53531': Zone is up-to-date. (serial 2007120714)
2013-12-09T02:09:08 SOA query of 'pers9cbb.' to '127.0.0.1@53531': Zone is up-to-date. (serial 2007120714)
2013-12-09T02:09:08 Server finished.
2013-12-09T02:09:08 Shut down.
==22331== Invalid read of size 8
==22331== at 0x438D64: compare_event_heap_nodes (evsched.c:37)
==22331== by 0x43B23D: heap_delete (heap.c:137)
==22331== by 0x4393E9: evsched_cancel (evsched.c:317)
==22331== by 0x48F58C: zonedata_destroy (zone-load.c:74)
==22331== by 0x436F88: knot_zone_deep_free (zone.c:249)
==22331== by 0x436FC2: knot_zone_dtor (zone.c:35)
==22331== by 0x4378C5: knot_zonedb_deep_free (zone.h:178)
==22331== by 0x41EECF: knot_ns_destroy (name-server.c:4290)
==22331== by 0x40A4E8: server_destroy (server.c:561)
==22331== by 0x405FE4: do_cleanup (main.c:473)
==22331== by 0x405A70: main (main.c:447)
==22331== Address 0x661b278 is 632 bytes inside a block of size 4,096 free'd
==22331== at 0x4C2A739: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==22331== by 0x486973: slab_destroy (slab.c:120)
==22331== by 0x486AF4: slab_free (slab.c:436)
==22331== by 0x439003: evsched_event_free (evsched.c:155)
==22331== by 0x48F537: zonedata_destroy (zone-load.c:59)
==22331== by 0x436F88: knot_zone_deep_free (zone.c:249)