Skip to content

fix(windows): clean stale install locks + fix db-cleanup race between M cells#6

Open
Tejeshyewale wants to merge 1 commit into
rocketride-org:mainfrom
Tejeshyewale:fix/windows-stale-locks-and-db-cleanup
Open

fix(windows): clean stale install locks + fix db-cleanup race between M cells#6
Tejeshyewale wants to merge 1 commit into
rocketride-org:mainfrom
Tejeshyewale:fix/windows-stale-locks-and-db-cleanup

Conversation

@Tejeshyewale

Copy link
Copy Markdown

What

Two Windows-specific fixes found while reproducing the concurrent-work benchmarks:

1. Stale lock files hang the engine's dependency bootstrap forever
If a previous start_engine.sh run is interrupted (Ctrl-C, crash, closed terminal) mid-install, it leaves behind engine/cache/install.lock and/or a uv-*.lock in the OS temp dir. The engine's embedded installer then waits on these forever ("Waiting for another installation to complete...") since the process that held them is gone. provision.sh now clears these before (re)provisioning.

2. _clean_dbs() can silently leave stale rows between M cells on Windows
concurrent-processing/run.py's _clean_dbs() used shutil.rmtree(DB_DIR, ignore_errors=True) with no verification. On Windows, a just-torn-down warm pool's sqlite file handles can still be releasing when the next M cell starts, so the rmtree can silently no-op. This meant running BENCH_MS=8,16 in one invocation showed rows=152/80 for M=16 (M=8's 72 leftover rows + M=16's own 80) instead of a clean 80/80. Fixed by retrying with a short backoff and raising if the directory truly can't be cleared.

How I found these

Reproducing the concurrent-work benchmarks on Windows 11 (RTX 2050, CUDA 13.1). Both issues were 100% reproducible; fault-isolation, concurrent-processing, and data-isolation all match the README's claims once these are fixed.

Testing

  • Ran fault-isolation (single + 10x reps), concurrent-processing (M=8,16 both together and separately), and data-isolation (M=32) after these fixes — all produce clean, expected results.

… M cells

- provision.sh: remove stale engine/cache/install.lock and uv-*.lock left by an
  interrupted previous run, which otherwise makes the engine's dependency bootstrap
  hang forever on 'Waiting for another installation to complete...'
- concurrent-processing/run.py: _clean_dbs() now retries with backoff and verifies
  deletion instead of silently ignoring errors. On Windows, a just-torn-down warm
  pool's sqlite handles can still be releasing when the next M cell starts, so the
  rmtree can silently no-op and leave the previous M's rows behind (observed: M=8's
  72 rows + M=16's 80 rows == 152, reported as status=check).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant