git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Rich <forums@artfulrobot.uk>
To: Jeff King <peff@peff.net>
Cc: git@vger.kernel.org
Subject: Re: Segfault during fsck and spreading brokenness
Date: Mon, 28 Sep 2020 07:43:34 +0100	[thread overview]
Message-ID: <5cb3e4da-05ef-ac6a-2b8c-fab3137cdc68@artfulrobot.uk> (raw)
In-Reply-To: <20200925174718.GA70005@coredump.intra.peff.net>

Hi Jeff,

Thanks for a friendly and welcoming response (I was a bit scared posting 
here I suppose because the project's creator has a rep for not suffering 
fools!).

I copied the repo that causes a segfault on 2.11.0 to my laptop which 
runs 2.25.1 and I'm pleased to report that there's no segfault. I've 
posted the errors it does show below this message in case they're useful.

>   What transport do you use between the two servers? The usual
> git-over-ssh and git-over-http protocols should be pretty resilient, but
> I would not be surprised if the old dumb-http protocol, which just
> downloads remote files wholesale, would be confused by a zero-length
> loose object file or similar.

The two servers are connected by SSH. As in:

% git config remote.origin.url sshalias:path/to/repo

where sshalias is defined in my .ssh/config file.

To test again,I made a bare clone of the fixed repo on my 2.25.1 host. I 
still had some dangling trees/blobs so I ran the following to make sure 
we were all clean:

git reflog expire --expire-unreachable=now --all
git gc --prune=now
git fsck --full


Then I added the broken repo as a remote (ssh) repo and ran fetch, which 
crashed (presumably correctly):

% git fetch broke
error: object file ./objects/3e/9c7cd338d2ea3603d0c23b4b56902a04937833 
is empty
error: object file ./objects/3e/9c7cd338d2ea3603d0c23b4b56902a04937833 
is empty
fatal: loose object 3e9c7cd338d2ea3603d0c23b4b56902a04937833 (stored in 
./objects/3e/9c7cd338d2ea3603d0c23b4b56902a04937833) is corrupt
fatal: the remote end hung up unexpectedly

I re-ran fsck and it was still all clean. So 2.25.1 seems safe.I 
repeated the same procedure on the 2.11.0 version (Debian 10 host), and 
the same thing happened.

So I'm not sure what happened with the two repos getting broken at once; 
can't repeat it.

Let's hope that this was something that was fixed as you say!

Thanks,
Rich




## Errors shown when running fsck on 2.25.1 on the broken repo:

git --version
git version
% git fsck --full
error: object file ./objects/14/2d73242bba1e4aee89a887ec37d3b1ef00461c 
is empty
error: unable to mmap 
./objects/14/2d73242bba1e4aee89a887ec37d3b1ef00461c: No such file or 
directory
error: 142d73242bba1e4aee89a887ec37d3b1ef00461c: object corrupt or 
missing: ./objects/14/2d73242bba1e4aee89a887ec37d3b1ef00461c
error: object file ./objects/3e/9c7cd338d2ea3603d0c23b4b56902a04937833 
is empty
error: unable to mmap 
./objects/3e/9c7cd338d2ea3603d0c23b4b56902a04937833: No such file or 
directory
error: 3e9c7cd338d2ea3603d0c23b4b56902a04937833: object corrupt or 
missing: ./objects/3e/9c7cd338d2ea3603d0c23b4b56902a04937833
error: object file ./objects/45/aaa8e78abffa54ee2a620ef453d2b73443a3f9 
is empty
error: unable to mmap 
./objects/45/aaa8e78abffa54ee2a620ef453d2b73443a3f9: No such file or 
directory
error: 45aaa8e78abffa54ee2a620ef453d2b73443a3f9: object corrupt or 
missing: ./objects/45/aaa8e78abffa54ee2a620ef453d2b73443a3f9
error: object file ./objects/51/c79dda59372c0bd44457fbf810c66a6b184bb4 
is empty
error: unable to mmap 
./objects/51/c79dda59372c0bd44457fbf810c66a6b184bb4: No such file or 
directory
error: 51c79dda59372c0bd44457fbf810c66a6b184bb4: object corrupt or 
missing: ./objects/51/c79dda59372c0bd44457fbf810c66a6b184bb4
error: object file ./objects/92/92c90c7f01b5f9252a4631071d8ed39b121d52 
is empty
error: unable to mmap 
./objects/92/92c90c7f01b5f9252a4631071d8ed39b121d52: No such file or 
directory
error: 9292c90c7f01b5f9252a4631071d8ed39b121d52: object corrupt or 
missing: ./objects/92/92c90c7f01b5f9252a4631071d8ed39b121d52
error: object file ./objects/a0/1c6d43bb04b86b8263848c9d8daa20d4a68be4 
is empty
error: unable to mmap 
./objects/a0/1c6d43bb04b86b8263848c9d8daa20d4a68be4: No such file or 
directory
error: a01c6d43bb04b86b8263848c9d8daa20d4a68be4: object corrupt or 
missing: ./objects/a0/1c6d43bb04b86b8263848c9d8daa20d4a68be4
error: object file ./objects/c6/480c5f0be01c6860a17123bef79aa3fb98dd8b 
is empty
error: unable to mmap 
./objects/c6/480c5f0be01c6860a17123bef79aa3fb98dd8b: No such file or 
directory
error: c6480c5f0be01c6860a17123bef79aa3fb98dd8b: object corrupt or 
missing: ./objects/c6/480c5f0be01c6860a17123bef79aa3fb98dd8b
error: object file ./objects/e7/e8f34edee57ed77b240fa024df2f472dd9776d 
is empty
error: unable to mmap 
./objects/e7/e8f34edee57ed77b240fa024df2f472dd9776d: No such file or 
directory
error: e7e8f34edee57ed77b240fa024df2f472dd9776d: object corrupt or 
missing: ./objects/e7/e8f34edee57ed77b240fa024df2f472dd9776d
Checking object directories: 100% (256/256), done.
Checking objects: 100% (310949/310949), done.
error: object file ./objects/3e/9c7cd338d2ea3603d0c23b4b56902a04937833 
is empty
error: object file ./objects/3e/9c7cd338d2ea3603d0c23b4b56902a04937833 
is empty
fatal: loose object 3e9c7cd338d2ea3603d0c23b4b56902a04937833 (stored in 
./objects/3e/9c7cd338d2ea3603d0c23b4b56902a04937833) is corrupt


      reply	other threads:[~2020-09-28  6:43 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-25 15:48 Segfault during fsck and spreading brokenness Rich
2020-09-25 17:47 ` Jeff King
2020-09-28  6:43   ` Rich [this message]

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

  List information: http://vger.kernel.org/majordomo-info.html

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

  git send-email \
    --in-reply-to=5cb3e4da-05ef-ac6a-2b8c-fab3137cdc68@artfulrobot.uk \
    --to=forums@artfulrobot.uk \
    --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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).