When engine tries to attach to any database, it starts (if not running yet) blocking AST thread. In case when database does not exist, that thread need to be shutted down. To do it, main thread posts own_wakeup event, and waits for blocking thread to shutdown (or 10 seconds timeout). But in case, when blocking thread performed event clear and wait calls after that post (i.e. have not started yet when was already requested to shutdown), it will never be awakened and will keep running after that 10secs timeout. When closing server process, it leads to AV due to attempts to work with deallocated shared memory.
Submitted by: @AlexPeshkoff
When engine tries to attach to any database, it starts (if not running yet) blocking AST thread. In case when database does not exist, that thread need to be shutted down. To do it, main thread posts own_wakeup event, and waits for blocking thread to shutdown (or 10 seconds timeout). But in case, when blocking thread performed event clear and wait calls after that post (i.e. have not started yet when was already requested to shutdown), it will never be awakened and will keep running after that 10secs timeout. When closing server process, it leads to AV due to attempts to work with deallocated shared memory.
Commits: 0959770 d34e401
The text was updated successfully, but these errors were encountered: