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

Re: Extremely slow progress during 'git reflog expire --all'

From
Jeff King <peff@peff.net>
Date
Apr 2, 2010, 21:28 UTC
Message-ID
<20100402212858.GA28531@coredump.intra.peff.net>
In-Reply-To
<201004022154.14793.elendil@planet.nl>
On Fri, Apr 02, 2010 at 09:54:14PM +0200, Frans Pop wrote:
Show 19 quoted lines
> I wanted to to a 'git gc' on my kernel repo, but that seemed to end in a 
> loop: loads of CPU usage, no output. Using 'ps' I found it's not 'git gc' 
> itself, but 'git reflog' that's causing the problem.
> 
> From the strace below it does seem like it still makes some progress, but 
> I've never had it take anywhere near this long before. Normally it starts 
> the count of objects almost immediately.
> 
> It's using hardly any memory at all but has one core going flat out.
> 
> I'm seeing this with both git 1.6.6.1 and 1.7.0.3 on the same repo.
> Environment:
> - Debian amd64/Lenny; Core Duo x86_64 2.6.34-rc3 -> 1.6.6.1
> - Debian i386/Sid; chroot on the same machine -> 1.7.0.3
> I've also tried with 2.6.33 to rule out a kernel issue.
> 
> Here's the tail end of an strace I ran. I broke it off after 9+ minutes, 
> but I had let it go for longer than that earlier. You can clearly see 
> where it starts to "stall" at 21:40:14.

FWIW, I have seen this, too, and managed to get an strace snippet that looked similar to what you saw (mostly memory allocation, and otherwise chewing on the CPU). I'm guessing there is some O(n^2) loop in there somewhere. Unfortunately, mine actually completed after a few minutes and I wasn't able to replicate.

Can you reproduce the problem on your repo? If so, can you possibly tar it up and make it available (probably just the .git directory would be enough)?

-Peff
Previous: Frans PopNext: Frans Pop
Message 2 of 15 in “Extremely slow progress during 'git reflog expire --all'”
  1. Frans PopApr 2, 2010
  2. Jeff KingApr 2, 2010
  3. Frans PopApr 2, 2010
  4. Jeff KingApr 2, 2010
  5. Frans PopApr 3, 2010
  6. Jeff KingApr 3, 2010
  7. Jeff KingApr 3, 2010
  8. Junio C HamanoApr 4, 2010
  9. Jeff KingApr 5, 2010
  10. Junio C HamanoApr 5, 2010
  11. Jeff KingApr 6, 2010
  12. Re*: Extremely slow progress during 'git reflog expire --all'Junio C Hamano, Apr 7, 2010
  13. Junio C HamanoApr 7, 2010
  14. Jeff KingApr 8, 2010
  15. Jeff KingApr 8, 2010

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.