Re: git push over http is very dangerous

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

 



I've did that ls-tree thingy again additionally an ls-tree on a working blob:


m24s12:/var/git/mISDN.git-backup2# git-ls-tree cd1aac1a43cfdac07118240f75c0ba7662eb8140
error: corrupt loose object 'cd1aac1a43cfdac07118240f75c0ba7662eb8140'
fatal: not a tree object
m24s12:/var/git/mISDN.git-backup2# ls objects/
Display all 163 possibilities? (y or n)
m24s12:/var/git/mISDN.git-backup2# ls objects/aa/
537a125359b729699b3c011fbf9d71438de90d d38d3dedd00107dc207190b9fa0b22f53888de m24s12:/var/git/mISDN.git-backup2# git-ls-tree aa537a125359b729699b3c011fbf9d71438de90d 100644 blob f6998854080c88903e47d449affc891278184368 CHANGES
100644 blob 0ac604f5c8c3b3a55fd0ce50944bb6f7f85850b3    Makefile
100644 blob 7b90a319e218d962dc453c5a92b8ee11c6bb9b7d    Makefile.module
100644 blob 56617b776024936b932601697ccfb548d891dadc    Makefile.standalone
100644 blob c12695b2e27a3be524e8e2622f79abf638dd9fb1    Rules.make.ext
100644 blob 1808a7786f86bf2ad9d15d2b7a921474bef00951    add.config
040000 tree f422c9f8d89e2d5c8be05392522d79f064522d64    config
040000 tree c875ea5c0cb3a5597df481f2999f9c6dc1691829    drivers
040000 tree f1cb948bddd3a86d6a1981a903edb102bd8244cf    include
100644 blob f11f1a276f4000b7bc703c40c3ad7a959ccf9146    km_mISDN.spec
100755 blob 81c7103e38ef807e84880625ef484d50c4cc9cc3    std2kern
100755 blob 07ba5902616674ddee962e89570c85f9e75fbd4b    stddiff
m24s12:/var/git/mISDN.git-backup2# git --version
git version 1.5.1.1

but i had a 1.5.0.X version before, which emitted the same problem :(

On Friday i had access to the machine which created the corrupt object, then we did a new push from that machine, which again corrupted our central repository, i found that it seemed not http - push related, because i could see the push worked well.

Doing that was very unfortune, because we lost a lot of commits this time :( I told that guy to get a new git version (he had 1.5.0.1 or so) and make a fresh clone of our repository.

So i'm pretty sure this is *not* a http push problem.

Interestingly the git-ls-tree on the machine of that guy worked very well, as it does on my local machine, but it does not work on our central repository.

The central machine is a AMD Sempron, it runs Debian Sarge (3.1) We've installed git from source, because sarge has it not in its archives.

Maybe we did something wrong at building time ? or you're right and the debian sarge zlib does not fit good to the current git versions ?





Junio C Hamano wrote:
Christian <crich-ml@xxxxxxxxxxx> writes:

We found out that it was broken, because we could not do a pull or
clone from the central repository anymore, but we got an error message.

Then i did a "git log" which worked well. then i wanted to "show" the
last 2 commits, so i did: "git show":

error: corrupt loose object 'cd1aac1a43cfdac07118240f75c0ba7662eb8140'
<crich1999> error: cd1aac1a43cfdac07118240f75c0ba7662eb8140: object
corrupt or missing

Thanks.  I extracted that "corrupt" object, but all the archived
versions of git I have at hand can read that tree just fine.

  $ ~/git-snap-v1.0.0/bin/git ls-tree cd1aac
  100644 blob 660424785bb8deda22ae5055fae1b16c466bc602	Kconfig.v2.6
  100644 blob 29553e41ee8d0941b1c119a3fdd4fcb9fa8cc44b	Makefile.v2.6
  040000 tree 3ba0db3caae4263808c925a598d707aaf4f82d68	mISDN
  $ ~/git-snap-v1.2.0/bin/git ls-tree cd1aac
  100644 blob 660424785bb8deda22ae5055fae1b16c466bc602	Kconfig.v2.6
  100644 blob 29553e41ee8d0941b1c119a3fdd4fcb9fa8cc44b	Makefile.v2.6
  040000 tree 3ba0db3caae4263808c925a598d707aaf4f82d68	mISDN
  $ ~/git-snap-v1.3.0/bin/git ls-tree cd1aac
  100644 blob 660424785bb8deda22ae5055fae1b16c466bc602	Kconfig.v2.6
  100644 blob 29553e41ee8d0941b1c119a3fdd4fcb9fa8cc44b	Makefile.v2.6
  040000 tree 3ba0db3caae4263808c925a598d707aaf4f82d68	mISDN
  $ ~/git-snap-v1.5.0/bin/git ls-tree cd1aac
  100644 blob 660424785bb8deda22ae5055fae1b16c466bc602	Kconfig.v2.6
  100644 blob 29553e41ee8d0941b1c119a3fdd4fcb9fa8cc44b	Makefile.v2.6
  040000 tree 3ba0db3caae4263808c925a598d707aaf4f82d68	mISDN
  $ ~/git-snap-v1.5.1/bin/git ls-tree cd1aac
  100644 blob 660424785bb8deda22ae5055fae1b16c466bc602	Kconfig.v2.6
  100644 blob 29553e41ee8d0941b1c119a3fdd4fcb9fa8cc44b	Makefile.v2.6
  040000 tree 3ba0db3caae4263808c925a598d707aaf4f82d68	mISDN
  $ git ls-tree cd1aac ;# this is 'next'
  100644 blob 660424785bb8deda22ae5055fae1b16c466bc602	Kconfig.v2.6
  100644 blob 29553e41ee8d0941b1c119a3fdd4fcb9fa8cc44b	Makefile.v2.6
  040000 tree 3ba0db3caae4263808c925a598d707aaf4f82d68	mISDN

I am starting to suspect that the loose object is actually Ok
and you are suffering from something else (perhaps zlib).

We had a brief period that we had a bogusly strict error check
after calling zlib, which Linus fixed with 456cdf and ac54c2
(these fixes are both in v1.5.1).  The breakage was 7efbff,
which was post v1.5.0.3 breakage, but was never been part of any
official release without the two fixes from Linus.

HOWEVER (I mentioned the above paragraph to save people from
going wild goose chase), this does not seem to be related to the
breakage.  I specifically built that revision and ls-tree from
it reads the loose object just fine.

There is only one codepath that can emit this error message:

error: corrupt loose object 'cd1aac1a43cfdac07118240f75c0ba7662eb8140'

so I am reasonably sure that you are running 7efbff or later
version, but now I am out of ideas.

What version of git do you run?  And on what platform?

-
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



-
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]