Skip to content

NamedLocksTrackingFileManagerTest is flaky on ubuntu-latest #2094

Closed

Description

@slachiewicz

Affected version

HEAD (observed on PR builds, 2026-08-30)

Bug description

NamedLocksTrackingFileManagerTest, via TrackingFileManagerTestSupport, fails intermittently on Linux and passes on rerun with no code change.

[ERROR] Tests run: 18, Failures: 1, Errors: 0, Skipped: 0
[ERROR] NamedLocksTrackingFileManagerTest>TrackingFileManagerTestSupport.testLock...

Observed on Verify / ubuntu-latest jdk-21-zulu 4.0.0-rc-6 and, in a separate run, on Verify / ubuntu-latest jdk-25-zulu 4.0.0-rc-6. The excerpt is truncated because the runs were re-run afterwards, which replaced the logs.

Why this looks like flakiness rather than a real failure

The clearest evidence: one of the two branches failed this test, then passed it after a push whose only change was a Javadoc @since tag. A comment-only edit cannot affect file locking, so the same code produced both outcomes.

Beyond that:

  • Neither pull request touches the named-locks or tracking-file-manager code.
  • Two different JDKs on the same OS, and green on every other matrix cell.
  • Both went green on rerun.

Possibly related

#2030 (closed) reported IpcNamedLockFactoryIT as flaky with a timeout, and wondered about thread safety. Different class, but the same area, so it may be worth checking whether a shared cause remains.

I have not reproduced this locally; it did not occur in any local run I made.

This issue was created with AI assistance.

Activity

  1. slachiewicz commented on Aug 31, 2026

    @slachiewicz
    MemberAuthor

    Fixed by PR #2098 (f690ba0): the NamedLocksTrackingFileManagerTest lock timeouts were raised from 5s to 30s and FileLockNamedLockFactory.shutdown() is now invoked in AfterEach, eliminating lock leaks between tests. Closing; the further test hardening stays tracked in PR #2102.

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

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions