Skip to content

tstest/integration: deflake TestCollectPanic - #18936

Merged
bradfitz merged 1 commit into
mainfrom
bradfitz/etxtbusy
Mar 10, 2026
Merged

bradfitz merged 1 commit into
mainfrom
bradfitz/etxtbusy

Conversation

@bradfitz

Copy link
Copy Markdown
Member

Two issues caused TestCollectPanic to flake:

  1. ETXTBSY: The test exec'd the tailscaled binary directly without
    going through StartDaemon/awaitTailscaledRunnable, so it lacked
    the retry loop that other tests use to work around a mysterious
    ETXTBSY on GitHub Actions.

  2. Shared filch files: The test didn't pass --statedir or TS_LOGS_DIR,
    so all parallel test instances wrote panic logs to the shared system
    state directory (~/.local/share/tailscale). Concurrent runs would
    clobber each other's filch log files, causing the second run to not
    find the panic data from the first.

Fix both by adding awaitTailscaledRunnable before the first exec, and
passing --statedir and TS_LOGS_DIR to isolate each test's log files,
matching what StartDaemon does.

It now passes x/tools/cmd/stress.

Fixes #15865

@bradfitz
bradfitz requested a review from a team March 10, 2026 03:58
@bradfitz
bradfitz force-pushed the bradfitz/etxtbusy branch from 7afb09e to 1be6cf9 Compare March 10, 2026 14:04

@fserb fserb left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe remove the flaky mark?

Comment thread tstest/integration/integration_test.go Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove this?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

whoops, duh

Two issues caused TestCollectPanic to flake:

1. ETXTBSY: The test exec'd the tailscaled binary directly without
   going through StartDaemon/awaitTailscaledRunnable, so it lacked
   the retry loop that other tests use to work around a mysterious
   ETXTBSY on GitHub Actions.

2. Shared filch files: The test didn't pass --statedir or TS_LOGS_DIR,
   so all parallel test instances wrote panic logs to the shared system
   state directory (~/.local/share/tailscale). Concurrent runs would
   clobber each other's filch log files, causing the second run to not
   find the panic data from the first.

Fix both by adding awaitTailscaledRunnable before the first exec, and
passing --statedir and TS_LOGS_DIR to isolate each test's log files,
matching what StartDaemon does.

It now passes x/tools/cmd/stress.

Fixes #15865

Change-Id: If18b9acf8dbe9a986446a42c5d98de7ad8aae098
Signed-off-by: Brad Fitzpatrick <[email protected]>
@bradfitz
bradfitz force-pushed the bradfitz/etxtbusy branch from 1be6cf9 to 2edabaa Compare March 10, 2026 21:07
@bradfitz
bradfitz merged commit 99bde5a into main Mar 10, 2026
59 checks passed
@bradfitz
bradfitz deleted the bradfitz/etxtbusy branch March 10, 2026 21:16
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.

tstest/integration: TestCollectPanic flake

2 participants