On Wed, Sep 25, 2019 at 3:56 PM Stefan Eissing <stefan.eiss...@greenbytes.de> wrote: > > > Am 25.09.2019 um 15:30 schrieb Yann Ylavic <ylavic....@gmail.com>: > > > > Oh, actually the stacktrace shows openssl which cleanups itself on > > exit(), i.e. atexit() callback or alike (which is preserved on fork() > > too..). > > To avoid this, we may want to use OPENSSL_INIT_NO_ATEXIT at > > OPENSSL_init() time and call OPENSSL_cleanup() explicitly when needed. > > I a not sure this will address the issue. If the watchdog thread stays > running, any teardown of OpenSSL will be too early.
Yeah, but I see no reason why openssl should tear down in children processes, we don't need/want this. But that's where we are, new automagic OPENSSL_init/shutdown() is a mess IMHO, and even a bigger mess when it comes to DSOs! > > Does mod_watchdog need a child pool cleanup that waits to its workers to shut > down maybe? That wouldn't fit ungraceful restarts, i.e. exit ASAP. Would we forcibly kill threads at some point? The solution could be to _exit() in clean_child_exit() to avoid atexit() callbacks (which exit() calls, but not _exit()).