Symptom: consumers crash attaching to a SHM segment with ValueError: cannot mmap an empty file (seen on real runs, July sprint).
Race: stdlib SharedMemory(create=True, size=N) does shm_open then ftruncate. An attacher that opens in that window sees size 0 and mmaps nothing. _open_shm_with_retry (ipc_factory.py:49) only catches FileNotFoundError, so it never covered this. Affected paths are the name-derived symmetric ones: _create_or_open (:145) attach arm, plus direct SharedMemory(create=True, ...) sites (~:174).
Fix: explicit readiness, readers now wait until the segment actually has a size, with a 10s cap and a clear error if it never shows up. No sleep ladder, no blind retries.
Blast radius: shared transport infra — all robots, sim modules, cameras, every SHM pubsub user.
Symptom: consumers crash attaching to a SHM segment with
ValueError: cannot mmap an empty file(seen on real runs, July sprint).Race: stdlib
SharedMemory(create=True, size=N)doesshm_openthenftruncate. An attacher that opens in that window sees size 0 and mmaps nothing._open_shm_with_retry(ipc_factory.py:49) only catchesFileNotFoundError, so it never covered this. Affected paths are the name-derived symmetric ones:_create_or_open(:145) attach arm, plus directSharedMemory(create=True, ...)sites (~:174).Fix: explicit readiness, readers now wait until the segment actually has a size, with a 10s cap and a clear error if it never shows up. No sleep ladder, no blind retries.
Blast radius: shared transport infra — all robots, sim modules, cameras, every SHM pubsub user.