Skip to content

Flaky test: test_successful_token_answer_is_rejected_if_sampled_pid_was_reused #866

Closed

Description

@yansfil

CI found this test failing in the policy checks job of pull request #865, which does not touch scripts/.

First attempt's failure:

self.assertEqual(table.vanished, [111])
AssertionError: Lists differ: [] != [111]

The test mocks only the macOS path (ctypes.CDLL with sysctl and proc_pidinfo) for a fake pid 111.
On Linux, marked_descendants in scripts/agent_live_check/process_table.py reads the real /proc/111/environ instead.
When no process 111 exists the read raises FileNotFoundError and the pid is recorded as vanished, so the test passes; when the runner has a real process 111 owned by another user the read raises another OSError, the pid is reported unknown, and the test fails.
It passed 20 of 20 times on macOS at main 422414f.

Fix the cause or delete the test by the expiry date; a flaky test is not left running.
A longer timeout, more retries or a lower expectation does not end this issue.
Each later flaky run adds a comment here.

Activity

  1. added
    bug
    quarantine
    on Oct 9, 2026
  2. added a commit that references this issue on Oct 9, 2026
    39efc67
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

    bugquarantine

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions