git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Help with "fatal: unable to read ...." error during GC?
@ 2018-08-08 14:30 Paul Smith
  2018-08-08 16:06 ` Jeff King
  0 siblings, 1 reply; 13+ messages in thread
From: Paul Smith @ 2018-08-08 14:30 UTC (permalink / raw)
  To: git

I recently upgraded from Git 2.9.2 to 2.18.0 (note, I have no
particular reason to believe this is related just passing info).  I'm
running on Linux (64bit Ubuntu 18.04.1 but I've compiled Git myself
from source, I'm not using the distro version).

I have a local repository I've been using for about two years (the
.git/description file, which I don't use, has a TLM of July 31, 2016),
with lots of worktrees being created/pruned/etc. during that time.

Note I'm doing all these operations in the 'main' repository, not in
any of the worktrees.

Yesterday, when I tried to fetch from my upstream I got a notification
about GC needed.  Then GC failed with these errors (HEAD is set to
master which is the same as origin/master):

  warning: reflog of 'HEAD' references pruned commits
  warning: reflog of 'HEAD' references pruned commits
  warning: reflog of 'HEAD' references pruned commits
  warning: reflog of 'HEAD' references pruned commits
  warning: reflog of 'HEAD' references pruned commits
  warning: reflog of 'HEAD' references pruned commits
  warning: reflog of 'HEAD' references pruned commits
  warning: reflog of 'HEAD' references pruned commits
  warning: reflog of 'HEAD' references pruned commits
  warning: reflog of 'HEAD' references pruned commits
  fatal: unable to read c104b8fb3631b5c54695206b2f73310c023c9963
  error: failed to run repack

I ran a git fsck --full which showed me a lot of dangling commits and
blobs, but no errors, no broken link messages, etc.

I ran git reflog expire --all --stale-fix but no change.

I can't find that SHA anywhere: I looked in .git/objects, etc.  I also
can't find any problems with my repo; obviously I haven't checked
everything but I can show the git log back to the initial commit, all
my stashes look fine, all my worktrees seem to be OK (git status etc.
work fine in all of them).

But whenever I pull etc. Git wants to run gc and I get this set of
errors again.  FWIW other repos created from the same remote don't show
any issues so it appears to be just this local copy of the repo.

I've seen many SO and blog posts about issues like this but all were
concentrating on recovering things and I don't even know if I've lost
anything... and anyway the operations they suggest don't work for me
because nothing can access that SHA; I just get "bad object".

Any ideas on what to look at next?

I would hate to have to throw this setup away since it has 23 stashes
and 25 worktrees in various states that would be annoying to have to
recreate... 

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2018-08-12  9:29 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-08 14:30 Help with "fatal: unable to read ...." error during GC? Paul Smith
2018-08-08 16:06 ` Jeff King
2018-08-08 17:35   ` Paul Smith
2018-08-08 18:24     ` Jeff King
2018-08-08 21:10       ` Paul Smith
2018-08-09  2:45       ` Paul Smith
2018-08-09 17:06         ` Jeff King
2018-08-11 12:13       ` Paul Smith
2018-08-11 14:23         ` Jeff King
2018-08-11 14:25           ` Jeff King
2018-08-11 14:38             ` Duy Nguyen
2018-08-11 16:39               ` Jeff King
2018-08-12  9:29           ` Duy Nguyen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).