Skip to content

fix: CI failures on ubuntu/windows (R interrupt races, locked test cwds)#30

Merged
Beforerr merged 1 commit into
mainfrom
ci-debug-r
Jun 12, 2026
Merged

fix: CI failures on ubuntu/windows (R interrupt races, locked test cwds)#30
Beforerr merged 1 commit into
mainfrom
ci-debug-r

Conversation

@Beforerr

Copy link
Copy Markdown
Owner

Fixes the ubuntu/windows CI failures and makes repld stop idempotent.

Ubuntu (flaky TestRInterruptSurvives): non-interactive R exits with "Execution halted" when an interrupt lands outside .repld_run's tryCatch (see check_session_exit in R's src/main/main.c) — a scheduling-dependent window during decode/parse or the sentinel statement. Three layers:

  • options(catch.script.errors = TRUE) keeps the session alive on a stray top-level interrupt
  • the engine no longer hangs when an aborted eval never writes its control status line (bounded wait + persistent control reader)
  • stray pending SIGINTs from the engine's resend ticker are drained at eval start so they can't fire inside the next eval

Verified with a 25x stress run on ubuntu-latest (debug workflow, since removed).

Windows: t.TempDir used as session cwd fails cleanup while the interpreter lives on the shared daemon (process cwd locks the dir) → session cwds now outlive tests. 8.3 short-path mismatch in the Julia script test fixed by normalizing the shared cwd. TestRInterruptSurvives skipped (no SIGINT delivery to detached children).

CLI: repld stop exits 0 when the daemon isn't running, so repld stop && ... chains work.

@Beforerr Beforerr force-pushed the ci-debug-r branch 5 times, most recently from 3c76245 to c1cf8d3 Compare June 12, 2026 02:09
…ws-safe test cwds

- R runtime: options(catch.script.errors=TRUE) so an interrupt landing outside
  .repld_run's tryCatch doesn't 'Execution halted' the non-interactive session;
  drain stray pending SIGINTs (engine resends) at eval start so they can't
  detonate inside the next eval
- engine: persistent control-line reader + bounded status wait, so an eval
  aborted before handlers were set degrades to an error instead of hanging
- repld stop exits 0 when daemon not running
- tests: session cwds outlive tests (Windows locks live process cwd against
  TempDir cleanup); normalize shared cwds (macOS /var symlink, Windows 8.3)
- skip TestRInterruptSurvives on windows (no SIGINT delivery)
@Beforerr Beforerr merged commit b07f847 into main Jun 12, 2026
3 checks passed
@Beforerr Beforerr deleted the ci-debug-r branch June 12, 2026 02:17
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