All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] maintenance(geometric): avoid deadlocks on Windows 10
@ 2026-04-28 12:52 Johannes Schindelin via GitGitGadget
  2026-04-28 12:52 ` [PATCH 1/2] mingw: optionally use legacy (non-POSIX) delete semantics Johannes Schindelin via GitGitGadget
                   ` (3 more replies)
  0 siblings, 4 replies; 11+ messages in thread
From: Johannes Schindelin via GitGitGadget @ 2026-04-28 12:52 UTC (permalink / raw)
  To: git; +Cc: Johannes Schindelin

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.

Johannes Schindelin (2):
  mingw: optionally use legacy (non-POSIX) delete semantics
  maintenance(geometric): do release the `.idx` files before repacking

 builtin/gc.c           |  1 +
 compat/mingw.c         | 47 ++++++++++++++++++++++++++++++++++++++++--
 t/t7900-maintenance.sh | 22 +++++++++++++++++++-
 3 files changed, 67 insertions(+), 3 deletions(-)


base-commit: 94f057755b7941b321fd11fec1b2e3ca5313a4e0
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-2103%2Fdscho%2Favoid-deadlocks-in-geometric-repacking-on-windows-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-2103/dscho/avoid-deadlocks-in-geometric-repacking-on-windows-v1
Pull-Request: https://github.com/gitgitgadget/git/pull/2103
-- 
gitgitgadget

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2026-05-08 13:20 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-28 12:52 [PATCH 0/2] maintenance(geometric): avoid deadlocks on Windows 10 Johannes Schindelin via GitGitGadget
2026-04-28 12:52 ` [PATCH 1/2] mingw: optionally use legacy (non-POSIX) delete semantics Johannes Schindelin via GitGitGadget
2026-05-04 14:12   ` Patrick Steinhardt
2026-05-07 12:49     ` Johannes Schindelin
2026-04-28 12:52 ` [PATCH 2/2] maintenance(geometric): do release the `.idx` files before repacking Johannes Schindelin via GitGitGadget
2026-04-28 15:01 ` [PATCH 0/2] maintenance(geometric): avoid deadlocks on Windows 10 Derrick Stolee
2026-05-04 14:12   ` Patrick Steinhardt
2026-05-07 12:51 ` [PATCH v2 " Johannes Schindelin via GitGitGadget
2026-05-07 12:51   ` [PATCH v2 1/2] mingw: optionally use legacy (non-POSIX) delete semantics Johannes Schindelin via GitGitGadget
2026-05-07 12:51   ` [PATCH v2 2/2] maintenance(geometric): do release the `.idx` files before repacking Johannes Schindelin via GitGitGadget
2026-05-08 13:20   ` [PATCH v2 0/2] maintenance(geometric): avoid deadlocks on Windows 10 Patrick Steinhardt

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.