git/list[1] front-page[2] threads[3] people[4] search[5] about
 

RE: GIT issue while cloning (fatal: pack is corrupted (SHA1 mismatch)) !!!

From
VIVanak, Ibrahim <ibrahim.vanak@hpe.com>
Date
May 29, 2019, 05:29 UTC
Message-ID
<TU4PR8401MB12166DBE2156683ADF28E9A4E11F0@TU4PR8401MB1216.NAMPRD84.PROD.OUTLOOK.COM>
In-Reply-To
<20190528213004.GF24650@sigill.intra.peff.net>
Hello Jeff,
Thanks again for the response. 
I am not building GIT and also don't know either how to build. I am just pulling up the binaries from http://hpux.connect.org.uk/. 
Both HPUX and linux machine are in same network/subnet so network shouldn't be a problem here. ssh to HPUX box is super quick and box is having very high configuration. There is no NFS involved here.
I am surprised on slowness.... If you get a chance to look more into this, please.

Thanks & Regards, Ibrahim Vanak

-----Original Message-----
From: Jeff King [mailto:peff@peff.net] 
Sent: Wednesday, May 29, 2019 3:00 AM
To: Vanak, Ibrahim <ibrahim.vanak@hpe.com>
Cc: git@vger.kernel.org
Subject: Re: GIT issue while cloning (fatal: pack is corrupted (SHA1 mismatch)) !!!
On Tue, May 28, 2019 at 06:45:18PM +0000, Vanak, Ibrahim wrote:
> BUT still I have significant slowness(50 times slower than clone on 
> linux machine) while cloning. HPUX box is having very good H/W 
> configuration and network is also stable.
From your output:
> [hpux]
> Receiving objects: 100% (63627/63627), 681.90 MiB | 111.00 KiB/s, done.
> [linux]
> Receiving objects: 100% (63627/63627), 681.90 MiB | 5.59 MiB/s, done.
The main things going on there are:
  1. we're getting the bytes over the network
  2. we're computing a sha1 on the stream we're getting
  3. we're zlib inflating any non-delta objects we find and computing
     their sha1
  4. we're checking the filesystem to see if we have other copies of any
     of those objects
For (2) and (3) it could be that the sha1 implementation is not quite as fast. But 50x is much larger than I'd expect. If you've built Git from source, you could try running "t/helper/test-sha1 <big-file" and timing the result. That would isolate sha1 performance.  If it's slow, try building with "make BLK_SHA1=Yes" or "make OPENSSL_SHA1=Yes" and see if that's faster.

For (4), we'll have to stat() in .git/objects to see if we have a loose version of the object. That can be slow if you have a really terrible NFS setup, for example. But I doubt that would still be slow in v2.21. There we should be using the new loose-cache which will only readdir() the object directories once.

If neither of those pan out, it seems like the network is slow? Or maybe ssh? Or pipes passing data from clone to index-pack?
-Peff
Previous: Jeff KingNext: Vanak, Ibrahim
Message 6 of 14 in “GIT issue while cloning (fatal: pack is corrupted (SHA1 mismatch)) !!!”
  1. Vanak, IbrahimMay 28, 2019
  2. Jeff KingMay 28, 2019
  3. Ævar Arnfjörð BjarmasonMay 28, 2019
  4. Vanak, IbrahimMay 28, 2019
  5. Jeff KingMay 28, 2019
  6. Vanak, IbrahimMay 29, 2019
  7. Vanak, IbrahimMay 29, 2019
  8. Jeff KingMay 30, 2019
  9. Vanak, IbrahimJun 11, 2019
  10. Vanak, IbrahimJun 18, 2019
  11. Jeff HostetlerJun 18, 2019
  12. Vanak, IbrahimJun 28, 2019
  13. Jeff KingJun 28, 2019
  14. Johannes SchindelinMay 28, 2019

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.