Skip to content

skrog start right after wsl --shutdown times out (nightly e2e EmulationSurvivesAShutdown) #530

Closed

Description

@zcsizmadia

The nightly e2e fails intermittently: 3 of the 7 scheduled runs since 0.9.0 (2026-10-06, 10-08, 10-12), every time the same way:

--- FAIL: TestAcceptance/EmulationSurvivesAShutdown (132.4s)
    e2e_test.go:2496: skrog start after wsl --shutdown: exit status 1
        skrog: engine did not come up within 2m0s

Runs: https://github.com/wslkit/skrog/actions/runs/37455317762, https://github.com/wslkit/skrog/actions/runs/37769593362, https://github.com/wslkit/skrog/actions/runs/38246195820. There were no failures of this kind before #519 merged.

Cause

A race between skrog start and the outside-stop verdict from #518:

  1. wsl --shutdown takes the engine's distro down. The supervisor has seen the engine running (sawUp).
  2. skrog start writes desired=running and deletes the idle marker. Both are already in that state, so the supervisor's 250 ms file poke sees no change.
  3. The next health tick (within 3 s) sees a down engine and a stopped distro, decides it was stopped from outside, and writes the idle marker.
  4. Nothing wakes it. skrog start polls for 2 minutes and fails.

When the tick happens to land during wsl --shutdown itself, before skrog start runs, start's marker deletion is a real change and the engine comes back. That timing is why this fails on some runs and not others.

This is a product bug, not a test flake: any user who runs skrog start within a few seconds of wsl --shutdown hits it.

The supervisor.log that would have shown this directly isn't in the run's artifact; it's in the test's temp state dir, which gets cleaned up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions