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

Re: [PATCH v3 0/3] packfile URIs: support concurrent downloads

From
Jeff King <peff@peff.net>
Date
Jul 25, 2026, 09:09 UTC
Message-ID
<20260725090910.GA1438796@coredump.intra.peff.net>
In-Reply-To
<xmqqldb19evx.fsf@gitster.g>
On Thu, Jul 23, 2026 at 09:43:14PM -0700, Junio C Hamano wrote:
Show 5 quoted lines
> When merged into 'seen', this topic seems to cause t5550 to hang
> fairly consistently.  It is not surprising, considering that the
> topic adds roughly 240 lines to the test script in question.  It is
> entirely possible that we are seeing an existing breakage from
> another topic in 'seen' that is exposed by the additional tests.

I didn't get any hang locally, but running t5550 with --stress causes around half of the runs to fail immediately. That continues to be true with v4. So there is presumably some race condition still present.

The failing test is the big one (34) and the failing command is the "test -s $tmpfile" call. It looks like the pack has already been indexed (at least by the time I look at the on-disk state of a failed example).

I don't immediately see the issue, though. I could believe that extra load fakes out any sleep-based timing tricks, but it looks like the test tries to use FIFOs to do everything deterministically.

Diffing the overlap-first.trace file between a working case and a failing one, I see (skipping past uninteresting port differences) this hunk at the end:

  @@ -17,4 +17,5 @@
   <= Recv header: Connection: close
   <= Recv header, 0000000002 bytes (0x00000002)
   <= Recv header:
  -== Info: shutting down connection #0
  +== Info: end of response with 1048917 bytes missing
  +== Info: closing connection #0

So curl sees a hangup on the first connection (even though the second one hasn't even started yet!). I'm not sure why, though. There's nothing useful in the server.log file. I tried stracing the server process but it didn't show much of interest. Both cases write "ready" to first-ready, and then the success case immediately sees an accept() for the second connection. The failing case waits in accept() and then eventually calls SIGALRM (which is way after the failure happens; the test has already bailed and so the second connection never comes in).

So from the perspective of the server process, everything is fine, but curl complains that it didn't get all of the bytes. Weird. The strace shows both writing the first 1MB as expected. It's like the connection gets hung up for some reason, but I can't tell why or by whom.

-Peff
Previous: Junio C HamanoNext: Jeff King
Message 27 of 57 in “packfile URIs: support concurrent downloads”
  1. 0/2 packfile URIs: support concurrent downloadsTed Nyman, Jul 13, 2026
  2. 1/2 http: use unique tempfiles for packfile URI downloadsTed Nyman, Jul 13, 2026
  3. Junio C HamanoJul 14, 2026
  4. Ted NymanJul 14, 2026
  5. Taylor BlauJul 14, 2026
  6. Jeff KingJul 14, 2026
  7. Junio C HamanoJul 14, 2026
  8. Ted NymanJul 14, 2026
  9. Taylor BlauJul 14, 2026
  10. Jeff KingJul 14, 2026
  11. Jeff KingJul 14, 2026
  12. 2/2 fetch-pack: accept "pack" output for packfile URIsTed Nyman, Jul 13, 2026
  13. Jeff KingJul 14, 2026
  14. Jeff KingJul 14, 2026
  15. Ted NymanJul 14, 2026
  16. Jeff KingJul 14, 2026
  17. Taylor BlauJul 14, 2026
  18. 0/2 packfile URIs: support concurrent downloadsTed Nyman, Jul 20, 2026
  19. 1/2 http: avoid concurrent appends to partial packsTed Nyman, Jul 20, 2026
  20. Junio C HamanoJul 21, 2026
  21. 2/2 fetch-pack: accept "pack" output for packfile URIsTed Nyman, Jul 20, 2026
  22. 0/3 packfile URIs: support concurrent downloadsTed Nyman, Jul 21, 2026
  23. 1/3 http-fetch: correct --index-pack-arg documentationTed Nyman, Jul 21, 2026
  24. 2/3 http: avoid concurrent appends to partial packsTed Nyman, Jul 21, 2026
  25. 3/3 fetch-pack: accept "pack" output for packfile URIsTed Nyman, Jul 21, 2026
  26. Junio C HamanoJul 24, 2026
  27. Jeff KingJul 25, 2026
  28. Jeff KingJul 25, 2026
  29. Jeff KingJul 25, 2026
  30. Jeff KingJul 25, 2026
  31. Junio C HamanoJul 25, 2026
  32. 0/3 packfile URIs: support concurrent downloadsTed Nyman, Jul 24, 2026
  33. 1/3 http-fetch: correct --index-pack-arg documentationTed Nyman, Jul 24, 2026
  34. Taylor BlauJul 24, 2026
  35. 2/3 http: avoid concurrent appends to partial packsTed Nyman, Jul 24, 2026
  36. 3/3 fetch-pack: accept "pack" output for packfile URIsTed Nyman, Jul 24, 2026
  37. Taylor BlauJul 24, 2026
  38. 0/3 packfile URIs: support concurrent downloadsTed Nyman, Jul 26, 2026
  39. 1/3 http-fetch: correct --index-pack-arg documentationTed Nyman, Jul 26, 2026
  40. 2/3 http: avoid concurrent appends to partial packsTed Nyman, Jul 26, 2026
  41. Jeff KingJul 26, 2026
  42. Ted NymanJul 26, 2026
  43. Jeff KingJul 26, 2026
  44. 3/3 fetch-pack: accept "pack" output for packfile URIsTed Nyman, Jul 26, 2026
  45. Jeff KingJul 26, 2026
  46. 0/6 packfile URIs: support concurrent downloadsTed Nyman, Jul 27, 2026
  47. 1/6 http-fetch: correct --index-pack-arg documentationTed Nyman, Jul 27, 2026
  48. 2/6 http: avoid closing index-pack input twiceTed Nyman, Jul 27, 2026
  49. Jeff KingAug 1, 2026
  50. 3/6 http: accept HTTP 416 for complete partial packsTed Nyman, Jul 27, 2026
  51. Jeff KingAug 1, 2026
  52. 4/6 http: avoid concurrent appends to partial packsTed Nyman, Jul 27, 2026
  53. 5/6 http: permit unlinking partial packs on WindowsTed Nyman, Jul 27, 2026
  54. 6/6 fetch-pack: accept "pack" output for packfile URIsTed Nyman, Jul 27, 2026
  55. Junio C HamanoJul 29, 2026
  56. Jeff KingAug 1, 2026
  57. Junio C HamanoAug 8, 2026

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.