git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Jeff King <peff@peff.net>
To: Rich <forums@artfulrobot.uk>
Cc: git@vger.kernel.org
Subject: Re: Segfault during fsck and spreading brokenness
Date: Fri, 25 Sep 2020 13:47:18 -0400	[thread overview]
Message-ID: <20200925174718.GA70005@coredump.intra.peff.net> (raw)
In-Reply-To: <2aa62ff7-0780-8e20-e87d-387152524971@artfulrobot.uk>

On Fri, Sep 25, 2020 at 04:48:39PM +0100, Rich wrote:

> I was encouraged by a couple of people on stackoverflow to post to this
> list. Apols in advance if it's not the right place.
>
> I encountered a Segfault during fsck on a damaged bare repo (probably due to
> a powercut. Possibly during an operation, although not sure):

Thanks for the report. This is definitely the right place.

> git --version
> git version 2.11.0
> 
> git fsck --full -v
> Checking HEAD link
> Checking object directory
> Checking tree 11bbc847cf1b4422b3e37830a9eac2e7af6559de
> Checking tree 11be4abeb20314de6145dfc0e6180807a74c03dc
> --->8 snip 8<---------------------------------------------------------------
> Checking tree 14a4423e86f06c7ad75bf391d138e0cf7790508f
> Checking tree 147aeaec72b2f29bf1813494c942fbce497be679
> zsh: segmentation fault  git fsck --full -v

It's tough to say from this where the problem might be. If you still
have the broken repo and can reproduce, two things that might help:

  - trying with a more recent version of Git; we've fixed quite a few
    segfaults around corrupted data in the past few years

  - getting a backtrace; if you can build Git from source, the simplest
    thing is just running "gdb --args /path/to/your/git fsck --full -v",
    waiting for it to crash, and then running "bt" in the debugger

> I learnt about the damage while trying to `git push`  from my dev working
> tree. I think I did a `git pull` when the `git push` failed. The result of
> this was that my *local* repo was also damaged: there was an empty file
> created that would stop git operations and on deleting that I got a page
> full of errors.

That's concerning; push/pull generally try hard not to let corruption
spread. 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.

-Peff

  reply	other threads:[~2020-09-25 17:47 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 [this message]
2020-09-28  6:43   ` Rich

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=20200925174718.GA70005@coredump.intra.peff.net \
    --to=peff@peff.net \
    --cc=forums@artfulrobot.uk \
    --cc=git@vger.kernel.org \
    /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).