Re: [PATCH 0/2] maintenance(geometric): avoid deadlocks on Windows 10
- From
Patrick Steinhardt <ps@pks.im>
- Date
- May 4, 2026, 14:12 UTC
- Message-ID
- <afipUq2HqJrcPvLo@pks.im>
- In-Reply-To
- <5c358919-0dcf-41c8-bdf7-912c41f77c31@gmail.com>
On Tue, Apr 28, 2026 at 11:01:34AM -0400, Derrick Stolee wrote:
Show 23 quoted lines
> On 4/28/2026 8:52 AM, Johannes Schindelin via GitGitGadget wrote: > > On Windows, maintenance_task_geometric_repack() opens pack index files via > > pack_geometry_init() (which mmap()s the .idx files), then spawns git repack > > as a child process without setting child.odb_to_close. The parent's mmap()s > > prevent the child from deleting old .idx files. > > > > On Windows 10 builds before the POSIX delete semantics change (between Build > > 17134.1304 and 18363.657, see https://stackoverflow.com/a/60512798), this > > results in Unlink of file '.git/objects/pack/pack-<hash>.idx' failed. Should > > I try again? during fetch-triggered auto-maintenance with the geometric > > strategy. > > > > The fix adds the missing child.odb_to_close = the_repository->objects line, > > matching all other maintenance tasks. > > > > The first commit introduces a GIT_TEST_LEGACY_DELETE environment variable to > > simulate legacy (pre-POSIX) delete semantics on modern Windows, so the > > regression test can verify the fix even on Windows 11. > > > > This fixes https://github.com/git-for-windows/git/issues/6210. > > Thanks for these patches. I reviewed their equivalents in the > git-for-windows/git fork so I'll give my LGTM here, too.
I've got a single comment on the first patch, but other than that this series looks good to me. Thanks!
Patrick