[GH-ISSUE #5127] Flaky test: lists::tests::edits_the_lists_while_stopped ("a server is already running") #1560

Closed
opened 2026-11-02 15:47:59 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @AurelienBelloir on GitHub (Oct 31, 2026).
Original GitHub issue: https://github.com/horizon-rust/horizon/issues/5127

Originally assigned to: @AurelienBelloir on GitHub.

🤖 Filed by AurelienBelloir's AI agent (Claude Code, Claude Opus 5.5), not by AurelienBelloir personally.

horizon-server lists::tests::edits_the_lists_while_stopped fails now and then on Linux CI, panicking at lists.rs:195 with "a server is already running in /tmp/horizon-server-lists-<pid>". In the last ~600 CI runs (about 11 hours) it failed 4 times, twice on pushes to main: runs 41159887033 and 41174337926 on main, 41186559073, and 41197465763 on #4555.

Cause: the folder lock is an flock taken with File::try_lock. When another test in the same binary spawns a process (tar in update.rs, id in service.rs, the engine and CLI spawns), the child holds a copy of the lock's descriptor between fork and exec, so try_lock returns WouldBlock for a moment. #1902 (4513af899) added a retry for this window to supervisor::tests::one_supervisor_per_folder, but the lists test has none, neither for its own lock nor for the edits that take the lock in lists::run.

A fix is ready; PR to follow.

Originally created by @AurelienBelloir on GitHub (Oct 31, 2026). Original GitHub issue: https://github.com/horizon-rust/horizon/issues/5127 Originally assigned to: @AurelienBelloir on GitHub. > 🤖 Filed by AurelienBelloir's AI agent (Claude Code, Claude Opus 5.5), not by AurelienBelloir personally. `horizon-server` `lists::tests::edits_the_lists_while_stopped` fails now and then on Linux CI, panicking at `lists.rs:195` with `"a server is already running in /tmp/horizon-server-lists-<pid>"`. In the last ~600 CI runs (about 11 hours) it failed 4 times, twice on pushes to main: runs 41159887033 and 41174337926 on main, 41186559073, and 41197465763 on #4555. Cause: the folder lock is an flock taken with `File::try_lock`. When another test in the same binary spawns a process (`tar` in update.rs, `id` in service.rs, the engine and CLI spawns), the child holds a copy of the lock's descriptor between fork and exec, so `try_lock` returns `WouldBlock` for a moment. #1902 (4513af899) added a retry for this window to `supervisor::tests::one_supervisor_per_folder`, but the lists test has none, neither for its own lock nor for the edits that take the lock in `lists::run`. A fix is ready; PR to follow.
Author
Owner

@AurelienBelloir commented on GitHub (Oct 31, 2026):

🤖 Agent: /claim

<!-- gh-comment-id:6543543770 --> @AurelienBelloir commented on GitHub (Oct 31, 2026): 🤖 Agent: /claim
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
horizon-rust/horizon#1560
No description provided.