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

Re: [PATCH] fix pread()'s short read in index-pack

From
Alex Riesen <raa.lkml@gmail.com>
Date
Oct 10, 2008, 06:52 UTC
Message-ID
<81b0412b0810092352n2a9cb5d2m6a0550354af0b397@mail.gmail.com>
In-Reply-To
<alpine.LFD.2.00.0810092140500.26244@xanadu.home>
2008/10/10 Nicolas Pitre <nico@cam.org>:
Show 7 quoted lines
>
> Since v1.6.0.2~13^2~ the completion of a thin pack uses sha1write() for
> its ability to compute a SHA1 on the written data.  This also provides
> data buffering which, along with commit 92392b4a45, will confuse pread()
> whenever an appended object is 1) freed due to memory pressure because
> of the depth-first delta processing, and 2) needed again because it has
> many delta children, and 3) its data is still buffered by sha1write().

So I seem to have had luck not doing gc in either of source or target repos (I usually repack, than fetch. Especially this one repo, it's very active).

BTW, I run into complications trying to test the fix on Shawn's master: conflicts, and my trivial resolution wasn't good enough.

Aside from that, I confirm the case fixed.
Previous: Nicolas PitreNext: Shawn O. Pearce
Message 5 of 7 in “fetch fails with a short read of received pack”
  1. Alex RiesenOct 9, 2008
  2. Samuel TardieuOct 9, 2008
  3. Nicolas PitreOct 9, 2008
  4. fix pread()'s short read in index-packNicolas Pitre, Oct 10, 2008
  5. Alex RiesenOct 10, 2008
  6. Shawn O. PearceOct 10, 2008
  7. Nicolas PitreOct 10, 2008

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.