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
Windows Tokio Runtime Panic: "no reactor running" #1
The SQLite MCP extension fails tests on Windows with a Tokio runtime panic: "there is no reactor running, must be called from the context of a Tokio 1.x runtime". This occurs specifically when the rmcp library performs nested tokio::spawn() calls within the async service handlers.
Root Cause: Windows IOCP (I/O Completion Ports) enforces stricter runtime context requirements than Unix platforms (Linux/macOS).
Attempted Solutions:
- Single global runtime with runtime.enter()
- Current-thread runtime to avoid worker thread issues
- Background worker thread architecture
- Explicit runtime context propagation
- Various spawn/block_on pattern modifications
Current Status: Development on this issue is paused.
Workaround: Windows tests are temporarily skipped in CI/CD workflows until a permanent solution is implemented. The extension works correctly on all Unix-based platforms.
This issue is linked with the fix-windows-tokio-issue branch.
I looked into this and I think the panic is caused by nested tokio::spawn() calls being reached from sqlite-mcp’s sync FFI boundary.
Tokio requires tokio::spawn() to run from inside the context of a Tokio runtime. On Windows this becomes more visible because the IO reactor is stricter, so a nested spawn from a callback/transport path can panic with:
there is no reactor running, must be called from the context of a Tokio 1.x runtime
I’m preparing a small PR that captures a tokio::runtime::Handle while definitely inside the runtime and uses handle.spawn(...) instead of relying on implicit tokio::spawn(...) in the nested rmcp paths.
This should be a minimal fix before considering a larger runtime/actor refactor for the SQLite FFI boundary.
Activity
fix(windows/workflow): load test only to avoid #1
JustVugg commentedon May 19, 2026
I looked into this and I think the panic is caused by nested
tokio::spawn()calls being reached from sqlite-mcp’s sync FFI boundary.Tokio requires
tokio::spawn()to run from inside the context of a Tokio runtime. On Windows this becomes more visible because the IO reactor is stricter, so a nested spawn from a callback/transport path can panic with:there is no reactor running, must be called from the context of a Tokio 1.x runtimeI’m preparing a small PR that captures a
tokio::runtime::Handlewhile definitely inside the runtime and useshandle.spawn(...)instead of relying on implicittokio::spawn(...)in the nested rmcp paths.This should be a minimal fix before considering a larger runtime/actor refactor for the SQLite FFI boundary.