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

Re: data loss when doing ls-remote and piped to command

From
Linus Torvalds <torvalds@linux-foundation.org>
Date
Sep 17, 2021, 19:28 UTC
Message-ID
<CAHk-=wgv42Wm3uHPntZNEYFu-dDVYW7yRen1fUBi6keZaKb+_g@mail.gmail.com>
In-Reply-To
<2722184.bRktqFsmb4@devpool47>
On Thu, Sep 16, 2021 at 11:59 PM Rolf Eike Beer <eb@emlix.com> wrote:
Show 6 quoted lines
>
> When I run the whole thing with strace I can't see the effect, which isn't
> really surprising. But there is a difference between the cases where I run
> with redirection "2>&1":
>
> ioctl(2, TCGETS, 0x7ffd6f119b10)        = -1 ENOTTY (Inappropriate ioctl for device)

Ehh. That format of strace implies that you didn't use "strace -f" (which would have the PID in it).

Although maybe you edited it out.

I think the error output would come from the other process (ssh, or whatever process you use to run "git-upload-pack" on the other end).

I still strongly doubt it's about pipes - we've had changes to them, but if they are broken we'd see a lot more breakage than some very incidental use by git.

But I can easily see it being timing-dependent. And yes, sadly 'strace' can often end up hiding any timing issues because it obviously slows down the target quite a bit.

Doing "strace -o tracefile -f" in a loop would be interesting if you can reproduce it (and then stop when you reproduce it, so that the final 'tracefile' is the one for the case that reproduced it).

            Linus
Previous: Jeff KingNext: Mike Galbraith
Message 12 of 13 in “data loss when doing ls-remote and piped to command”
  1. Rolf Eike BeerSep 15, 2021
  2. Junio C HamanoSep 15, 2021
  3. Rolf Eike BeerSep 16, 2021
  4. Tobias UlmerSep 16, 2021
  5. Rolf Eike BeerSep 16, 2021
  6. Mike GalbraithSep 16, 2021
  7. Mike GalbraithSep 17, 2021
  8. Linus TorvaldsSep 16, 2021
  9. Junio C HamanoSep 16, 2021
  10. Rolf Eike BeerSep 17, 2021
  11. Jeff KingSep 17, 2021
  12. Linus TorvaldsSep 17, 2021
  13. Mike GalbraithSep 18, 2021

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.