You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
SIGSEGV on SIGTERM: Crow's Server::stop() runs on two threads at once #249
main's integration run on 3d20f55 (the v26.11.23 release commit) failed once: test_graceful_shutdown.py::TestShutdownWithAnAsyncTaskInFlight exited -11 after SIGTERM. Blocks the v26.11.23 tag.
Evidence: the server log shows Closing acceptor. 0x…4098 twice for the same acceptor, then the IO services, then nothing (no Exiting., no DuckLake detach).
Cause:APIServer::run polls the serving future every 20 ms and calls app.stop() once stop_requested_ is set, without stop_mutex_. APIServer::stop() sets that flag first and later calls app.stop() under the mutex. When both land together, two threads run Crow's Server::stop() concurrently (not thread-safe: both see the acceptor open and close the same socket, and stop the io_contexts in parallel).
Fix: the poll calls app.stop() only while holding stop_mutex_ (try_lock: if stop() holds it, that call issues app.stop() itself; the next tick retries, so the startup-window guarantee stays).
Activity