Skip to content

AutomationCliWatchdog intermittently fails on Windows: native profile left behind after the forced exit #439

Closed

Description

@ambroise-leclerc

Problem

AutomationCliWatchdog fails intermittently on the Windows desktop job (desktop-native (windows-msvc-webview2)). The same case also failed once with a timeout of its own client. It passes when the job is rerun, with no change.

Run Commit Result
41106788194 (push to develop, 2026-10-30) develop fails at AutomationClient.py:328, the profile check after the forced exit (27.3 s)
41157732734 (PR #436) 3f502c0 subprocess.TimeoutExpired at AutomationClient.py:346, the 15 s limit of the second CLI invocation (37.9 s)
41186534253 (PR #436) 3da5704 AssertionError: The forced exit left its native profile behind: [WindowsPath('C:/Users/runneradmin/AppData/Local/Temp/wf-profile-.../webfront-agent... (26.9 s)

The same job and the same case pass in the other runs of these days, including a rerun of 41186534253 without any change.

What the case checks

test/tools/AutomationClient.py, scenario cli-watchdog: the renderer is made to spin, the deadline expires, webfront-agent exits with status 71, and the test then requires that the capability endpoint and the temporary WebView2 profile are gone (remaining_profiles, line 328). #416 made the agent wait up to 5 s for the browser processes it launched, end those still running, then retry files pending deletion for 2 s.

Hypothesis (not verified)

On a loaded hosted runner the WebView2 processes (msedgewebview2.exe) still hold files of the profile when the 2 s retry ends, or the second CLI invocation that expects the agent to have exited takes longer than its 15 s. The 5 s and 2 s bounds are fixed, while the load is not: the desktop job runs CTest with four workers and the Windows suite also starts browsers of its own.

To do

  1. Reproduce under load on Windows (run the case while the browser tests run, or lower the agent's grace and retry bounds to show the failure on demand), and read watchdog.log of a failing run, which the assertion already prints.
  2. Find which handle or process keeps the profile and make the agent's removal wait for it, or hand the removal to a process that outlives the forced exit and bound what the test waits for (as the Linux side already does with a shell in its own session).
  3. A failing regression test at the lowest useful level, as for any bug fix, then the browser case.

Related: #416.

Activity

  1. added a commit that references this issue on Oct 31, 2026
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