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

Re: [PATCH 1/1] upload-pack: fix race condition in error messages

From
SZEDER Gábor <szeder.dev@gmail.com>
Date
Aug 29, 2019, 21:58 UTC
Message-ID
<20190829215818.GG8571@szeder.dev>
In-Reply-To
<20190829143805.GB1746@sigill.intra.peff.net>
On Thu, Aug 29, 2019 at 10:38:05AM -0400, Jeff King wrote:
Show 5 quoted lines
> So any fixes there have to happen on the client side. I am still
> confused about why the client is writing in this case, per the argument
> in 014ade7484 (upload-pack: send ERR packet for non-tip objects,
> 2019-04-13). It would be nice to use GIT_TRACE_PACKET to see what it's
> trying to write, but I still haven't been able to reproduce the issue.
It's the "done" line:
  + cat trace-packet
  packet:  upload-pack> 5e26403b4485d7a44fd8b65dc3f71e21c0dd6fad HEAD\0multi_ack thin-pack side-band side-band-64k ofs-delta shallow deepen-since deepen-not deepen-relative no-progress include-tag multi_ack_detailed allow-tip-sha1-in-want allow-reachable-sha1-in-want symref=HEAD:refs/heads/master agent=git/2.23.0.40.g4d780d4382.dirty
  packet:  upload-pack> 5e26403b4485d7a44fd8b65dc3f71e21c0dd6fad refs/heads/master
  packet:  upload-pack> 0000
  packet:        fetch< 5e26403b4485d7a44fd8b65dc3f71e21c0dd6fad HEAD\0multi_ack thin-pack side-band side-band-64k ofs-delta shallow deepen-since deepen-not deepen-relative no-progress include-tag multi_ack_detailed allow-tip-sha1-in-want allow-reachable-sha1-in-want symref=HEAD:refs/heads/master agent=git/2.23.0.40.g4d780d4382.dirty
  packet:        fetch< 5e26403b4485d7a44fd8b65dc3f71e21c0dd6fad refs/heads/master
  packet:        fetch< 0000
  packet:        fetch> want 64ea4c133d59fa98e86a771eda009872d6ab2886 multi_ack_detailed side-band-64k thin-pack no-progress ofs-delta deepen-since deepen-not agent=git/2.23.0.40.g4d780d4382.dirty
  packet:        fetch> 0000
  packet:  upload-pack< want 64ea4c133d59fa98e86a771eda009872d6ab2886 multi_ack_detailed side-band-64k thin-pack no-progress ofs-delta deepen-since deepen-not agent=git/2.23.0.40.g4d780d4382.dirty
  packet:  upload-pack< 0000
  packet:  upload-pack> ERR upload-pack: not our ref 64ea4c133d59fa98e86a771eda009872d6ab2886
  packet:  upload-pack> 0000
  packet:        fetch> done

In the avarage successful run that "fetch> done" pkt-line is immediately after the "fetch> 0000".

The above is on my Linux box; here is a failure on macOS, essentially the same:

  https://travis-ci.org/szeder/git/jobs/578555606#L3453
Previous: Jeff KingNext: SZEDER Gábor
Message 11 of 15 in “upload-pack: fix race condition in t5516”
  1. 0/1 upload-pack: fix race condition in t5516Derrick Stolee via GitGitGadget, Aug 28, 2019
  2. 1/1 upload-pack: fix race condition in error messagesDerrick Stolee via GitGitGadget, Aug 28, 2019
  3. SZEDER GáborAug 28, 2019
  4. Jeff KingAug 28, 2019
  5. Jeff KingAug 28, 2019
  6. SZEDER GáborAug 28, 2019
  7. Derrick StoleeAug 29, 2019
  8. Jeff KingAug 29, 2019
  9. Derrick StoleeAug 29, 2019
  10. Jeff KingAug 29, 2019
  11. SZEDER GáborAug 29, 2019
  12. SZEDER GáborAug 29, 2019
  13. SZEDER GáborAug 30, 2019
  14. Jeff KingSep 4, 2019
  15. SZEDER GáborSep 10, 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.