git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 0/2] macos: safeguard git maintenance against highly concurrent operations

From
Johannes Schindelin via GitGitGadget <gitgitgadget@gmail.com>
Date
Aug 24, 2021, 15:43 UTC
Message-ID
<pull.1024.git.1629819840.gitgitgadget@gmail.com>

When we started porting Scalar to C, one of the first things we did was to run Scalar's quite extensive set of functional tests. And there, we ran into immediate problems in the macOS job because git maintenance was registering a large number of repositories concurrently, and our code could be more robust in such scenarios.

The culprit lies not with Scalar, of course, but with the way git maintenance wants to write the plist for use by launchctl and register it, every time, and if two concurrent processes try to do that, they stumble over each other.

This pair of patches makes git maintenance much less fragile in those situations.

Please note that this patch series conflicts with lh/systemd-timers, although in a trivial way: the latter changes the signature of launchctl_schedule_plist() to lose its cmd parameter. The resolution is to adjust the conflicting code to lose the cmd parameter, and also drop it from launchctl_list_contains_plist() (and define it in the same way as launchctl_boot_plist() does). I assume that lh/systemd-timers will advance to next pretty soon; I plan on rebasing this patch series on top of it at that stage.

Derrick Stolee (1):
  maintenance: skip bootout/bootstrap when plist is registered
Johannes Schindelin (1):
  maintenance: create `launchctl` configuration using a lock file
 builtin/gc.c           | 91 ++++++++++++++++++++++++++++++++----------
 t/t7900-maintenance.sh | 17 ++++++++
 2 files changed, 87 insertions(+), 21 deletions(-)
base-commit: 48bf2fa8bad054d66bd79c6ba903c89c704201f7
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-1024%2Fdscho%2Fmaintenance%2Flaunchctl-concurrent-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-1024/dscho/maintenance/launchctl-concurrent-v1
Pull-Request: https://github.com/gitgitgadget/git/pull/1024
-- 
gitgitgadget
Next: Johannes Schindelin via GitGitGadget
Message 1 of 11 in “macos: safeguard git maintenance against highly concurrent operations”
  1. 0/2 macos: safeguard git maintenance against highly concurrent operationsJohannes Schindelin via GitGitGadget, Aug 24, 2021
  2. 1/2 maintenance: create `launchctl` configuration using a lock fileJohannes Schindelin via GitGitGadget, Aug 24, 2021
  3. 2/2 maintenance: skip bootout/bootstrap when plist is registeredDerrick Stolee via GitGitGadget, Aug 24, 2021
  4. gc: remove unused launchctl_get_uid() callÆvar Arnfjörð Bjarmason, Sep 9, 2021
  5. Johannes SchindelinSep 9, 2021
  6. Ævar Arnfjörð BjarmasonSep 9, 2021
  7. Johannes SchindelinSep 9, 2021
  8. Junio C HamanoSep 9, 2021
  9. gc: remove unused launchctl_get_uid() callÆvar Arnfjörð Bjarmason, Sep 12, 2021
  10. Junio C HamanoAug 25, 2021
  11. Johannes SchindelinAug 25, 2021

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.