Repository navigation
dot pull: apply spawns three git processes per history commit and looks hung; interrupting it leaves an unresolvable pause #14404
Replies: 2 comments
|
Thanks, the process sampling made this easy to reproduce. With two machines, one encrypted file and 2,000 padding commits, #14407 fixes the slow part. Three things grew with the length of the history:
The same pull now takes 5.9s and starts 460 git processes, and that count no longer grows with the history. At 20,000 commits it takes 44s in a debug build. The PR doesn't change the interrupted-recovery error or the AI-assisted — Tool: Claude Code; model: anthropic/claude-opus-5-5; version: 2.1.295. |
|
#14407 has merged. PRs for the rest of the report are open:
One case still needs a manual step. If an apply is killed between writing a file and recording that write, recovery can't tell its own write from your edit, so it stops and asks you to run AI-assisted — Tool: Claude Code; model: anthropic/claude-opus-5-5; version: 2.1.295. |
Uh oh!
There was an error while loading. Please reload this page.
Summary
On a dotfiles history with about 24,850 commits,
mise dot pull --yestakes about 6.5 minutes and prints nothing after the plan. It looks hung, so it gets interrupted. The interrupted operation then cannot be recovered cleanly, and the pause it leaves names a conflict that the per-path command says is not a conflict.The history is that long because of the empty-apply loop in #14251. Even so, the cost scales with every commit in the history.
Version
mise 2026.9.16 linux-x64. Linux container on ext4. The history index has 24,253
meta/*.jsonfiles (1.4 GB).repo.gitis 119 MB.The walk looks unchanged on main (88060c3). In
src/system/history/enrollment.rs, when there is no usable observation, it runsManifest::readfor every commit fromrev_list(&head, usize::MAX)until every enrollment entry is matched, andManifest::readgoes throughls-treepluscat-file -spluscat-file blobinshadow.rs. If an entry is never matched, it reads the whole history.What the "hang" is
psshows no child process. The main thread sits inpollon an internal socketpair (both ends belong to the mise process) and 15 threads wait on futexes. Sampling shows it is busy:gitchildren of miseThe children are, per commit:
The manifest blob hardly varies. Across the whole history three blob IDs cover 10,371, 7,819 and 2,400 commits respectively, so nearly all of the reads fetch the same few blobs again.
Timeline of one run that was left to finish (UTC):
What happens when it is interrupted
Earlier attempts were stopped with SIGTERM, and one by SIGHUP when the SSH session dropped during a
git cat-file. Then:application failed (local saved history changed since planning; nothing was applied; run pull again); previous files restored. Sharing is paused.mise dot pull --yesprintshistory: recovering interrupted operation <uuid>, thenlocal saved history changed since planning; nothing was applied; run pull again.mise dot pullreportssync paused: resolve all 1 conflict(s) before sharing resumes.mise dot conflicts <path>suggestsmise dot pull --take-remote <path>, butmise dot pull --yes --take-remote ~/.config/nvim/plugin/after/transparency.luareports~/.config/nvim/plugin/after/transparency.lua is not a conflict.mise dot statuslists the same file as having unsaved edits.After the last failed attempt,
sync.jsonheld"conflicts": []and onepending_applicationsentry for that path. Itslocalandacknowledgedwere the version mise had last applied, andreconciledwas the incoming version. The file had no real local edit. The pause count seems to include pending applications, while the per-path command only looks atconflicts.Each interrupted attempt also left new commits on local
main, which may be why recovery always finds the history "changed since planning":mise dot pull --yes --take-remote-allthen completed in about 6.5 minutes and cleared the pause.A second machine hit a related failure without anything being interrupted: its watcher logged
could not apply incoming changes: local files were saved after enrollment planning; retry pull, recordedapplication failed ... Sharing is paused, and stayed paused. The watcher had saved a checkpoint while the slow planning step was running.Expected
git cat-file --batch, or a cache keyed by blob ID), so it does not spawn processes per commit.AI-assisted — Tool: Claude Code; model: anthropic/claude-opus-5-5; version: 2.1.296.
All reactions