All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bagas Sanjaya <bagasdotme@gmail.com>
To: Jeff King <peff@peff.net>
Cc: Git Users <git@vger.kernel.org>
Subject: Re: git repack on shallow clone of large repo (linux kernel) hangs at "Enumerating objects"
Date: Tue, 18 May 2021 18:23:40 +0700	[thread overview]
Message-ID: <158a2f8c-95c0-075a-4cda-6328324c2261@gmail.com> (raw)
In-Reply-To: <YKIulliGp8hyf5Y6@coredump.intra.peff.net>

[-- Attachment #1: Type: text/plain, Size: 2215 bytes --]

Hi Jeff,

> You could try using strace or gdb to see what it's doing.
> 
> But as a guess, one thing that sometimes causes a stall near the end of
> "enumerating objects" is loosening unreachable objects that are
> currently packed. You told repack to use "-A", which asks to loosen
> those objects so they aren't lost when the old packs are deleted (as
> opposed to "-a").
> 

I attached two strace logs, one for "git repack -A -d" and one for "git
repack -a -d".

For the former, I got following excerpt before I had to SIGINT the process:

> stat("/opt/git/libexec/git-core/git", {st_mode=S_IFREG|0755, st_size=22096480, ...}) = 0
> pipe([5, 7])                            = 0
> openat(AT_FDCWD, "/dev/null", O_RDWR|O_CLOEXEC) = 8
> fcntl(8, F_GETFD)                       = 0x1 (flags FD_CLOEXEC)
> fcntl(8, F_SETFD, FD_CLOEXEC)           = 0
> rt_sigprocmask(SIG_SETMASK, ~[RTMIN RT_1], [], 8) = 0
> clone(child_stack=NULL, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7feb5ecbfa10) = 13691
> rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
> close(7)                                = 0
> read(5, "", 8)                          = 0
> close(5)                                = 0
> close(8)                                = 0
> close(4)                                = 0
> fcntl(3, F_GETFL)                       = 0 (flags O_RDONLY)
> fstat(3, {st_mode=S_IFIFO|0600, st_size=0, ...}) = 0
> read(3, 0x55a540de5250, 4096)           = ? ERESTARTSYS (To be restarted if SA_RESTART is set)

I thought that in the case of "git repack -A -d", it is stucked at the
last read() before I ctrl-c'ed to trigger SIGINT.

> You'd probably want to at least say "--unpack-unreachable=some.time" to
> avoid writing out ones which are not even recent (and which is what "git
> gc" will do under the hood).
>> But if you don't care about keeping them at all (e.g., because this is
> not an active repository where other simultaneous operations may be
> taking place, so you know it is safe to delete even recent ones), then
> just "git repack -a -d" is probably your best bet.
> 
> -Peff
> 
Using "-a" instead of "-A" on git repack works. Thanks.

-- 
An old man doll... just what I always wanted! - Clara

[-- Attachment #2: git-repack-ad.strace.xz --]
[-- Type: application/x-xz, Size: 6408 bytes --]

[-- Attachment #3: git-repack-Ad.strace.xz --]
[-- Type: application/x-xz, Size: 3228 bytes --]

  reply	other threads:[~2021-05-18 11:23 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-16 13:09 git repack on shallow clone of large repo (linux kernel) hangs at "Enumerating objects" Bagas Sanjaya
2021-05-17  8:51 ` Jeff King
2021-05-18 11:23   ` Bagas Sanjaya [this message]
2021-05-18 12:07     ` Jeff King
2021-05-22 11:16       ` Bagas Sanjaya
2021-05-22 12:11         ` Jeff King

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=158a2f8c-95c0-075a-4cda-6328324c2261@gmail.com \
    --to=bagasdotme@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=peff@peff.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.