From: Victor Julien Date: Thu, 11 Dec 2014 13:21:45 +0000 (+0100) Subject: unix-socket: fix restart/shutdown cycle X-Git-Tag: suricata-2.1beta3~102 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b9787304868a07080ef761de54b451630ffb16e5;p=thirdparty%2Fsuricata.git unix-socket: fix restart/shutdown cycle When cleaning up after a pcap was processed, the stats api was cleaned up before the stats threads were killed, leading to a BUG_ON triggering. --- diff --git a/src/runmode-unix-socket.c b/src/runmode-unix-socket.c index d8d55a10d8..83daaaf0c9 100644 --- a/src/runmode-unix-socket.c +++ b/src/runmode-unix-socket.c @@ -295,13 +295,14 @@ TmEcode UnixSocketPcapFilesCheck(void *data) TmThreadKillThreadsFamily(TVT_PPT); TmThreadClearThreadsFamily(TVT_PPT); FlowKillFlowRecyclerThread(); - RunModeShutDown(); /* kill remaining mgt threads */ TmThreadKillThreadsFamily(TVT_MGMT); TmThreadClearThreadsFamily(TVT_MGMT); SCPerfReleaseResources(); + RunModeShutDown(); + /* mgt and ppt threads killed, we can run non thread-safe * shutdown functions */ FlowShutdown();