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

Re: git-reflog 70 minutes at 100% cpu and counting

From
Nicolas Pitre <nico@fluxnic.net>
Date
Dec 16, 2009, 21:06 UTC
Message-ID
<alpine.LFD.2.00.0912161526080.23173@xanadu.home>
In-Reply-To
<1260970885.2788.87.camel@localhost>
On Wed, 16 Dec 2009, Eric Paris wrote:
Show 13 quoted lines
> On Tue, 2009-12-15 at 22:03 -0500, Nicolas Pitre wrote:
> > On Mon, 14 Dec 2009, Eric Paris wrote:
> > 
> > > The alternative repo is slowing pushing up to that same location.  That
> > > tar is 855838982, so just a tad bit smaller.
> > 
> > It doesn't appear to be complete yet, and not progressing either.
> 
> The alternative repo is now available (but the original is down)
> 
> I tried to run git gc --aggressive last night while I slept and got this
> as output, maybe it helps point to a solution/problem?  The git reflog
> portion ran for 5 hours and 36 minutes and appears to have finished.

Yes. I was able to reproduce your issue. And because of the *horrible* repository packing, the reflog expiration process is taking ages when determining object reachability at a rate of one reflog entry every 2 seconds or so. With 4214 entries for the fsnotify-syscall branch, and 1352 entries for the fsnotify branch, this already takes up asignificant portion of the actual run time. I'm sure if your repository was properly packed this would take less than a minute.

Now, repacking doesn't work because...
> $ git gc --aggressive
> error: Could not read d936ff8a7b0841b51ddf96afa24a30b016824cb2
> error: Could not read 29b6c2fb1390b4fd350a5ecc78f1156fc5d91e9f

Those objects are indeed missing from the repository. Without them your repository is "broken". Either you can find them somewhere else and copy them over, or salvage as much as you can by fetching the interesting branches into another freshly made repository. This is unfortunate because I would have liked to see by how much this repository would have shrunk after a successful repack.

Of course, usage of alternates is recommended _only_ with repositories that are stable, i.e. don't ever add repositories to .git/objects/info/alternates if those repositories are rewinded/rebased and/or branches in them are deleted/replaced. That could be a reason why some objects are now missing from the repository using alternates.

Nicolas
Previous: Eric ParisNext: Eric Paris
Message 21 of 30 in “git-reflog 70 minutes at 100% cpu and counting”
  1. Eric ParisDec 14, 2009
  2. Sverre RabbelierDec 14, 2009
  3. Jeff KingDec 14, 2009
  4. Eric ParisDec 14, 2009
  5. Jeff KingDec 14, 2009
  6. Eric ParisDec 14, 2009
  7. Sverre RabbelierDec 14, 2009
  8. Nicolas PitreDec 15, 2009
  9. Jeff KingDec 14, 2009
  10. Nicolas PitreDec 15, 2009
  11. Junio C HamanoDec 15, 2009
  12. Nicolas PitreDec 15, 2009
  13. Eric ParisDec 15, 2009
  14. Nicolas PitreDec 15, 2009
  15. Jeff KingDec 15, 2009
  16. Nicolas PitreDec 15, 2009
  17. Eric ParisDec 15, 2009
  18. Nicolas PitreDec 16, 2009
  19. Eric ParisDec 16, 2009
  20. Eric ParisDec 16, 2009
  21. Nicolas PitreDec 16, 2009
  22. Eric ParisDec 16, 2009
  23. Nicolas PitreDec 17, 2009
  24. Eric ParisDec 17, 2009
  25. Nicolas PitreDec 18, 2009
  26. Steven NoonanDec 18, 2009
  27. Eric ParisDec 18, 2009
  28. Nicolas PitreDec 18, 2009
  29. Steven NoonanDec 18, 2009
  30. Eric ParisDec 18, 2009

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.