git pull failure, truncated object

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Our QA dude had a disk fill up a while back.  Forgot about it.  Went
to pull during a nightly build.  Got this:

% git pull
remote: Generating pack...
remote: Done counting 104 objects.
remote: Result has 72 objects.
remote: Deltifying 72 objects.
remote:  100% (72/72) done
Unpacking 72 objects
remote: Total 72 (delta 46), reused 52 (delta 26)
error: failed to read delta-pack base object
4b93eb81265ea4f2b436618a4b1c3bea2bedf06d
fatal: unpack-objects died with error code 1

He did a git-gc, twice, and retried.  Still failed.

So, he called me in and we tried to see if the server was acting up
--- perhaps an NFS problem, as we've had those before, but got very
different error messages.  Watched the log file from git-daemon, and
saw nothing.  Finally we took a look at the local repos
.git/objects/4b, and 4b93eb81265ea4f2b436618a4b1c3bea2bedf06d was of
length 0.

So, I looked in the man page of git-gc and thought to try --prune,
as this was not an active repository.  This worked, and then
the pull did as well.

I'm wondering why git-gc did not at least warn us of this problem when
we tried it.  It appeared to us that git-gc gave our repo a clean bill
of health, and so we turned our attention to the remote and
investigated there, instead of continuing in the local repo.

Should we have tried git fsck instead in this case?

It might be nice to have a better error message in this case, one
that locates the problem in the local repo.

If the failure is a short/bad (?) read of a local object, then it
might be nice to say something like:

error: this repo's local object 4b93eb81265ea4f2b436618a4b1c3bea2bedf06d
       in .git/objects/4b is corrupt.  You will need to run
       XXX to diagnose and YYY to repair this.

Or some such.


Bill
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux