git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@linux-foundation.org>
To: Alexander Litvinov <litvinov2004@gmail.com>
Cc: Git Mailing List <git@vger.kernel.org>
Subject: Re: My git repo is broken, how to fix it ?
Date: Thu, 22 Mar 2007 08:58:36 -0700 (PDT)	[thread overview]
Message-ID: <Pine.LNX.4.64.0703220847540.6730@woody.linux-foundation.org> (raw)
In-Reply-To: <200703210956.50018.litvinov2004@gmail.com>


[ Sorry, I got sidetracked, have been looking at kernel bugs and git 
  optimizations. I added back the git mailing list, since there is no 
  private file data here any more, and I'd like others to follow this
  saga too ]

On Wed, 21 Mar 2007, Alexander Litvinov wrote:
>
> > Oh, btw, before I do that - do you by any chance have the *uncorrupt*
> > version of the file that should be this object? In other words, do you
> > have object 03312463e194d68d0d677b51e09b47cb29ca926a in another
> > repository? It should be a version of your file.
>
> It is pity, but I don't have that version. It was broken at my last commit and 
> I will redo it again. I remeber the changes I have done.
> 
> The new file has different sha1 sum but I attach it to show you the real file 
> content.

Sadly, I actually would need to compare it to the exact object it *should* 
have generated, and that means that I'm not actually all that interested 
in the "real file content" per se, I really would need to see the exact 
blob, so that I can generate the object it should have been, and then 
compare that against the corrupt one... 

It's the binary data I'd like to compare, so that I can tell (for example) 
if there is just a chunk missing in the middle, or something like that. 
But since even slight differences in the source data will lead to 
different binary data, and since the compressed and corrupt data I have 
from you earlier doesn't make sense on its own, I do care about the exact 
object that got corrupted.

> By the way, I now I am using git (3ba7a10) taken from next with tree your 
> patches:
> 1. disables the hardlinking code for CYGWIN, and it also checks for errors 
> from "close()"
> 2. Don't ever return corrupt objects from "parse_object()"
> 3. Be more careful about zlib return values.

Ok, apart from #1, those should be in current -git now, along with better 
validation checks (by Nico) when packing. So hopefully at least when there 
is corruption in a loose object, we will now always notice when we do a 
"git repack", and will never generate a broken pack-file. Knock wood.

Of course, I actually wonder if the bug might be in your version of zlib 
(miscompiled or some other thing), in which case *any* amount of 
pre-validation won't really help, because it will become corrupted when we 
deflate it prior to writing. For example, if "deflateBound()" sometimes 
doesn't give a valid upper bound and we allocate too little space..

> Yesterday brakage was made by git with only first patch.

I see that you seem to be able to reproduce it again - I'll answer that 
email separately just so that the git list sees that message too. But it 
boils down to: if it's reproducible, I'd *really* like to see the 
corrupted object and the exact file that it should have been generated 
from..

		Linus

  parent reply	other threads:[~2007-03-22 15:58 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-28  4:36 My git repo is broken, how to fix it ? Alexander Litvinov
2007-02-28  4:57 ` Linus Torvalds
2007-02-28 11:54   ` Alexander Litvinov
2007-02-28 16:19     ` Linus Torvalds
2007-02-28 19:12       ` Alex Riesen
2007-03-19 13:32       ` Alexander Litvinov
2007-03-19 15:20         ` Linus Torvalds
     [not found]           ` <200703201013.39169.litvinov2004@gmail.com>
2007-03-20  5:34             ` Linus Torvalds
2007-03-20  6:55               ` Alexander Litvinov
2007-03-20  7:42               ` Junio C Hamano
2007-03-20 15:23                 ` Nicolas Pitre
     [not found] ` <Pine.LNX.4.64.0703200832150.6730@woody.linux-foundation.org>
     [not found]   ` <Pine.LNX.4.64.0703200836490.6730@woody.linux-foundation.org>
     [not found]     ` <200703210956.50018.litvinov2004@gmail.com>
2007-03-22 15:58       ` Linus Torvalds [this message]
2007-03-22 16:34         ` Nicolas Pitre
     [not found]       ` <200703211024.04740.litvinov2004@gmail.com>
2007-03-22 16:17         ` Linus Torvalds
2007-03-22 16:29           ` Linus Torvalds
2007-03-22 16:48             ` Linus Torvalds
2007-03-22 17:01               ` Nicolas Pitre
2007-03-22 17:10                 ` Linus Torvalds
2007-03-22 17:28                   ` Nicolas Pitre
2007-03-22 22:13                   ` Jeff King
2007-03-23  0:25                     ` Linus Torvalds
2007-03-23  0:42                       ` Bill Lear
2007-03-23  0:51                       ` Jeff King
2007-03-22 20:31               ` [PATCH] git-apply: Do not free the wrong buffer when we convert the data for writeout Junio C Hamano
2007-03-22 20:55                 ` Linus Torvalds
2007-03-23  3:55                   ` Alexander Litvinov
2007-03-23  3:40               ` My git repo is broken, how to fix it ? Alexander Litvinov
2007-03-22 17:12             ` Johannes Sixt
2021-06-06 17:27 B
2021-06-06 17:28 B
2021-12-25  8:30 Joseph Mitchell
2021-12-26  0:48 ` Lemuria
2023-05-29 18:57 ross thomas

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=Pine.LNX.4.64.0703220847540.6730@woody.linux-foundation.org \
    --to=torvalds@linux-foundation.org \
    --cc=git@vger.kernel.org \
    --cc=litvinov2004@gmail.com \
    /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 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).