Closed bs-rscs closed 1 year ago
Thanks for reporting this. As a short term workaround, in your build disable module thread_utils
which will remove the thread pool logic.
It's possible to disable the thread pool at runtime by setting an env variable (eg in main) and we document the problem now in 3172b53fb3e0a. Possibly we can add some lifecycle management functions to further assist but I think this issue is about as well addressed as it can be.
We recently came across an issue with Botan's "thread pool". Namely, when we use RSA operations (that utilize the thread pool) and fork the process afterwards, then the forked process will stop working correctly. In our case, it won't terminate, as it hangs in Botan::Thread_Pool::shutdown().
It looks like the forked process still has the list of threads in the thread pool, but those don't exist anymore, as the original process terminated. When trying to shut the non-existing threads down, he waits forever:
The process must then be killed in order to terminate it.
We were using Botan 2.14.0 for this.