From 29d32aa308b98708cc074072b0ea5c1fa873085c Mon Sep 17 00:00:00 2001 From: Garry Tan Date: Sat, 29 Aug 2026 15:10:41 +0000 Subject: [PATCH] fix(sandbox-doctor): bashrc block re-heals the /dev/shm remount on sandbox restart The 4G remount does not survive restarts; a reverted 64M shm made the multi-tab browse handoff test fail consistently under suite concurrency (observed live: two consecutive full-run failures, green in isolation, green again after remounting). Same guarded arithmetic as the doctor body. Co-Authored-By: Claude Fable 5 --- scripts/sandbox-doctor.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/sandbox-doctor.sh b/scripts/sandbox-doctor.sh index 62d6c0a84..5d37a4f9d 100755 --- a/scripts/sandbox-doctor.sh +++ b/scripts/sandbox-doctor.sh @@ -114,6 +114,10 @@ export GSTACK_FREE_RETRY_FLAKY=1 export DISPLAY=:99 [ -e /dev/fd ] || sudo -n ln -sfn /proc/self/fd /dev/fd 2>/dev/null || true [ -e /tmp/.X11-unix/X99 ] || (Xvfb :99 -screen 0 1280x800x24 >/dev/null 2>&1 &) +# The 4G /dev/shm remount does not survive sandbox restarts; a 64M shm makes +# concurrent Chromium (multi-tab browse tests) fail under suite load. +shm_kb="$(df -k /dev/shm 2>/dev/null | awk 'NR==2 {print $2}')" +[ "${shm_kb:-0}" -gt 0 ] && [ "$shm_kb" -lt 1048576 ] && sudo -n mount -o remount,size=4G /dev/shm 2>/dev/null || true EOF say 'seeded ~/.bashrc test env' fi