Skip to content

Windows smoke: TestForkAndChildHoldTheParentTheyAreCreatedFrom/fork failed once, parent not reported open after Fork #1138

Closed

Description

@FabioLeitao

Version / branch / commit

main @ 846d30f5 (the PR that hit it, #1137, is 846d30f5 plus two commits that only touch internal/acp).

OS and environment

GitHub Actions windows-latest, job Smoke (windows-latest), step "Test (Fast Non-Race)".

Steps to reproduce

Not reproduced locally (I only have Linux). It failed once in CI:

Expected behavior

TestForkAndChildHoldTheParentTheyAreCreatedFrom passes for every case. After Store.Fork succeeds, a Prune dry run in the same process reports the parent as open.

Actual behavior

--- FAIL: TestForkAndChildHoldTheParentTheyAreCreatedFrom (0.34s)
    --- FAIL: TestForkAndChildHoldTheParentTheyAreCreatedFrom/fork (0.09s)
        prune_test.go:415: parent kept for "", want "open in another Zero process": the fork's process holds it

Only the fork case is reported as failed in that run.

Why this looks like a flake rather than a regression in that PR

What I did not establish

This is a single occurrence, so I cannot say whether it is a timing race or an ordering that depends on the runner. I do not have a fix to propose. The question is whether the lease taken by Store.Fork is guaranteed to be visible to the following Prune dry run on Windows.

Activity

  1. Vasanthdev2004 commented on Oct 16, 2026

    @Vasanthdev2004
    Collaborator

    Thanks for writing this up, and the answer to your question was no. #1144 fixed it.

    The lease file lived in the Store that took it. In this test, other isn't used after the fork, so once it was unreachable the garbage collector could close its lease file, and closing the file drops the lock. A collection during the dry run then let the parent go, which is why it showed up only now and then, and on whichever case happened to collect. Forcing a collection made it fail every time, in the create with a parent case on main the next day as well as the fork case here.

    The same thing could happen in a real exec run, so #1144 moved leases to the process: every Store holding a session shares one lease file, and it's released only by the last Release. TestLeaseOutlivesTheStoreThatTookIt drops the store and runs the collector, and it fails three times out of three on the old code. Closing as fixed by #1144; reopen if it shows up again on a commit that has it.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions