Repository navigation
Description
What happens
Since 11 November, six Test jobs never finished: Swift Testing stopped making progress a few minutes in, and the job was cancelled at its 20-minute limit without a failing test. On main this skips the beta: run 43212032624 on 11-12, which also held up a stable release, and 43407416688 on 11-13. Four pull request runs hung the same way: 43378851623, 43179792123, 43034798309 and 43031003135.
Steps to reproduce
Run either test with Swift's shared thread pool narrowed to one thread:
swift build --build-tests
LIBDISPATCH_COOPERATIVE_POOL_STRICT=1 swift test --skip-build --filter theDeadlineReturnsEvenWhileExecutableLookupIsStuck
LIBDISPATCH_COOPERATIVE_POOL_STRICT=1 swift test --skip-build --filter applicationMoveCapturesSessionEditsAfterCopyingBoth hang every time (stopped after 60 s). With the normal pool they pass in 0.04 s and 0.15 s, and other tests from the same suites pass with one thread. On CI, the 3-core runner gives the pool 3 threads, and the run hangs whenever these tests' three cases run at the same time.
Expected
The test run finishes on any number of cores: no test blocks a thread of Swift's shared pool while it waits for work that needs one.
Environment
GitHub's macos-26 runner (3 cores) with Xcode 26.6, main at 9d60793. On a 10-core Mac it doesn't hang unless the pool is narrowed.
Evidence
The stack samples added by #604 (the test-results artifact of runs 43407416688 and 43378851623) show the main thread idle in its run loop and all three com.apple.root.default-qos.cooperative threads in DispatchSemaphore.wait:
- two in
applicationMoveCapturesSessionEditsAfterCopying(setup:), one per case: the stubbed copy waits onreleaseCopy(Tests/StableBarTests/ApplicationMoverTests.swift:577).ApplicationMover.transfer(Sources/StableBar/ApplicationMover.swift:289) calls it from theTask.detachedinApplicationMoveController.proceed. - one in
theDeadlineReturnsEvenWhileExecutableLookupIsStuck():BlockedWorkspaceLookup.find()waits on its gate (Tests/StableBarTests/SetupWorkspaceConnectionTests.swift:536), called fromSetupWorkspaceChecker.inspect(Sources/StableBar/SetupWorkspaceConnection.swift:104).
The four earlier hangs have no samples, but their logs list the same tests among those that never finished.
Diagnosis
Both tests stand in for slow blocking work that the app runs on Swift's shared pool: copying the app bundle and checking the copy's signature, and looking up yabai's or OmniWM's executable, which the code notes can stall on a disconnected network volume. The pool has one thread per core and never adds one for a blocked thread. The tests release their semaphores only after a Task.sleep wakes or setup's 3-second deadline task runs, and both of those need a pool thread. Once the three blocked cases hold all three threads, nothing runs again.
The app has the same exposure: a lookup stuck on a network volume keeps a pool thread for as long as it stays stuck, even after setup's check has given up at its deadline.
Fix: run this blocking work on a dispatch queue and await it through a continuation, so a blocked call holds a GCD thread, which GCD replaces, rather than a pool thread.
Related
- ci: capture thread stacks when tests stall #604 added the stack samples that caught this; it didn't diagnose the hang.
- Cancelling a command as it exits can deadlock the bar and tests #364 (fixed by fix: prevent command cancellation deadlocks and flaky test failures #365 in 0.9.0) was a different hang: a lock cycle when cancelling a command.
- The two tests came with feat: check in setup that Workspaces can reach yabai or OmniWM #552 (setup checks the workspace manager) and feat: move StableBar to Applications from setup and pick up where setup was #555 (move to Applications), both merged on 11-11.
Triaged by Claude Code (Claude Opus 5.5).
Activity
chore(release): 0.15.0 [skip ci]
stablebar-releases commentedon Nov 14, 2026
🎉 This issue has been resolved in version 0.15.0 🎉
The release is available on GitHub release
Your semantic-release bot 📦🚀