Bug #3164
closedSuricata 4.1.4: NSS Shutdown triggers crashes in test mode
Description
I'm trying to upgrade from Suricata 4.1.3 to 4.1.4. Both are built on the same Linux server. When I run Suricata 4.1.4, it always crashes at exit when NSS_Shutdown() is called. Seems NSS is not initialized successfully for 4.1.4.
Suricata 4.1.3 doesn't have this problem.
Updated by Yujie Zhao over 5 years ago
I'm running Suricata 4.1.4, and that's related to the problem.
It seems Suricata 4.1.4 won't initialize NSS in the testing mode, but 4.1.4 will.
Updated by Yujie Zhao over 5 years ago
Here is the root cause:
In 4.1.3, Suricata exits directly in the test mode:
if (suricata.run_mode RUNMODE_CONF_TEST){
SCLogNotice("Configuration provided was successfully loaded. Exiting.");
#ifdef HAVE_MAGIC
MagicDeinit();
#endif
exit(EXIT_SUCCESS);
}
In 4.1.4, the code is changed to support the engine analysis mode. Suricata doesn't exit directly, and instead it tries to clean up and that calls NSS_Shutdown() and triggers the crash.
if (suricata.run_mode RUNMODE_ENGINE_ANALYSIS) {
goto out;
} else if (suricata.run_mode == RUNMODE_CONF_TEST){
SCLogNotice("Configuration provided was successfully loaded. Exiting.");
goto out;
}
Updated by Yujie Zhao over 5 years ago
Yujie Zhao wrote:
I'm running Suricata 4.1.4, and that's related to the problem.
It seems Suricata 4.1.4 won't initialize NSS in the testing mode, but 4.1.3 will.
Updated by Yujie Zhao over 5 years ago
- Subject changed from Suricata 4.1.4: NSS not initialized to Suricata 4.1.4: NSS Shutdown triggers crashes in test mode
Updated by Victor Julien over 5 years ago
- Status changed from New to Closed
- Target version changed from TBD to 4.1.5
Updated by Victor Julien over 5 years ago
- Copied to Bug #3189: NSS Shutdown triggers crashes in test mode (5.x) added