You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Windows smoke: TestForkAndChildHoldTheParentTheyAreCreatedFrom/fork failed once, parent not reported open after Fork #1138
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
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.
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.
Activity
Vasanthdev2004 commentedon Oct 16, 2026
Thanks for writing this up, and the answer to your question was no. #1144 fixed it.
The lease file lived in the
Storethat took it. In this test,otherisn'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 thecreate with a parentcase on main the next day as well as theforkcase here.The same thing could happen in a real exec run, so #1144 moved leases to the process: every
Storeholding a session shares one lease file, and it's released only by the lastRelease.TestLeaseOutlivesTheStoreThatTookItdrops 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.