Erik de Castro Lopo pushed to branch wip/fix-9809 at Glasgow Haskell Compiler / GHC Commits: cb573bc9 by Moritz Angermann at 2026-10-28T16:56:18+11:00 testsuite: give pause_resume_via_safe_ffi_concurrent 60s on Darwin CI The 10s System.Timeout watchdog was a false deadlock: five serialized 1s pauses plus rts_pause waiting on threadDelay/timer-manager traffic overruns that budget on loaded Mac runners. Keep a watchdog so a real hang still fails. - - - - - 2 changed files: - testsuite/tests/rts/pause-resume/all.T - testsuite/tests/rts/pause-resume/pause_resume_via_safe_ffi_concurrent.hs Changes: ===================================== testsuite/tests/rts/pause-resume/all.T ===================================== @@ -14,6 +14,8 @@ test('pause_resume_via_safe_ffi_concurrent', [ only_ways(['threaded1', 'threaded2']) , req_c , extra_files(['pause_resume.c','pause_resume.h']) + # Internal watchdog is 60s; give the harness room on loaded Darwin CI. + , run_timeout_multiplier(2) ], multi_compile_and_run, ['pause_resume_via_safe_ffi_concurrent', [('pause_resume.c','')], '']) test('pause_and_use_rts_api', ===================================== testsuite/tests/rts/pause-resume/pause_resume_via_safe_ffi_concurrent.hs ===================================== @@ -8,6 +8,7 @@ import Foreign.Marshal.Alloc import Foreign.Ptr import Foreign.Storable import System.Exit +import System.IO (hFlush, stdout) import System.Timeout foreign import ccall safe "pause_resume.h pauseAndResume" @@ -38,11 +39,17 @@ main = do countPtr putMVar mvar () - -- Wait (at least 2n seconds to be safe) for all threads to finish. - result <- timeout (2 * n * 1000000) (mapM_ takeMVar mvars) + -- Each pause holds the RTS for about a second, so n concurrent + -- calls serialize to ~n seconds. 2n (10s) was enough on Linux but + -- a false deadlock on Darwin CI: rts_pause waits for every + -- capability, and the counter threads keep hitting the timer + -- manager via threadDelay. Keep a watchdog so a real hang still + -- fails, but give 60s of slack. + result <- timeout (60 * 1000000) (mapM_ takeMVar mvars) case result of Nothing -> do putStrLn "Not all rts_pause/rts_resume threads have finished. Assuming deadlocked and failing test." + hFlush stdout exitFailure Just () -> do putStrLn "All threads finished" View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/cb573bc9cae5f7b2618ac8f0f310daa8... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/cb573bc9cae5f7b2618ac8f0f310daa8... You're receiving this email because of your account on gitlab.haskell.org. Manage all notifications: https://gitlab.haskell.org/-/profile/notifications | Help: https://gitlab.haskell.org/help