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

Re: git repack on shallow clone of large repo (linux kernel) hangs at "Enumerating objects"

From
Jeff King <peff@peff.net>
Date
May 22, 2021, 12:11 UTC
Message-ID
<YKj085Nn/uQYomZG@coredump.intra.peff.net>
In-Reply-To
<168567f7-cec1-a4f1-5b2e-b51637ab7668@gmail.com>
On Sat, May 22, 2021 at 06:16:15PM +0700, Bagas Sanjaya wrote:
Show 8 quoted lines
> Here is excerpt from strace -f just before I triggered SIGINT due to hang:
> 
> > 22903 openat(AT_FDCWD, ".git/objects/3b/tmp_obj_24pz93", O_RDWR|O_CREAT|O_EXCL, 0444) = 3
> > 22903 write(3, "x\1+)JMU0421d040031Q\320K\316I\314K\327M\313/\312M,"..., 1113) = 1113
> > 22903 close(3)                          = 0
> > 22903 utime(".git/objects/3b/tmp_obj_24pz93", {actime=1621599665 /* 2021-05-21T19:21:05+0700 */, modtime=1621599665 /* 2021-05-21T19:21:05+0700 */}) = 0
> > 22903 link(".git/objects/3b/tmp_obj_24pz93", ".git/objects/3b/816f00a02062692e95a9a756247fca34abb911") = 0
> > 22903 unlink(".git/objects/3b/tmp_obj_24pz93") = 0

OK, so this is writing out loose objects. It's exactly the case I suspected.

> The last write() sequence seems running repeatedly, what it means? Infinite loop?

If it's a lot of just write(), it's probably just a large object. If it's a lot of writes interspersed with opens and links, as above, then it's just a lot of objects. It probably would finish eventually, but it's just slow.

-Peff
Previous: Bagas Sanjaya
Message 6 of 6 in “git repack on shallow clone of large repo (linux kernel) hangs at "Enumerating objects"”
  1. Bagas SanjayaMay 16, 2021
  2. Jeff KingMay 17, 2021
  3. Bagas SanjayaMay 18, 2021
  4. Jeff KingMay 18, 2021
  5. Bagas SanjayaMay 22, 2021
  6. Jeff KingMay 22, 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.