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

Re: [PATCH] t5562: skip if NO_CURL is enabled

From
SZEDER Gábor <szeder.dev@gmail.com>
Date
Nov 28, 2018, 13:27 UTC
Message-ID
<20181128132708.GE30222@szeder.dev>
In-Reply-To
<20181120091107.GA30542@sigill.intra.peff.net>
On Tue, Nov 20, 2018 at 04:11:08AM -0500, Jeff King wrote:
Show 26 quoted lines
> On Mon, Nov 19, 2018 at 11:36:08AM -0800, Carlo Arenas wrote:
> 
> > tests 3-8 seem to fail because perl is hardcoded to /urs/bin/perl in
> > t5562/invoke-with-content-length.pl, while I seem to be getting some
> > sporadic errors in 9 with the following output :
> > 
> > ++ env CONTENT_TYPE=application/x-git-receive-pack-request
> > QUERY_STRING=/repo.git/git-receive-pack
> > 'PATH_TRANSLATED=/home/carenas/src/git/t/trash
> > directory.t5562-http-backend-content-length/.git/git-receive-pack'
> > GIT_HTTP_EXPORT_ALL=TRUE REQUEST_METHOD=POST
> > /home/carenas/src/git/t/t5562/invoke-with-content-length.pl push_body
> > git http-backend
> > ++ verify_http_result '200 OK'
> > ++ grep fatal: act.err
> > Binary file act.err matches
> > ++ return 1
> > error: last command exited with $?=1
> > not ok 9 - push plain
> > 
> > and the following output in act.err (with a 200 in act)
> > 
> > fatal: the remote end hung up unexpectedly
> 
> This bit me today, too, and I can reproduce it by running under my
> stress-testing script.
I saw this a few times on Travis CI as well.
> Curiously, the act.err file also has 54 NUL bytes before the "fatal:"
> message.
I think those NUL bytes come from the file system.

The contents of 'act.err' from the previous test ('fetch gzipped empty') is usually:

  fatal: request ended in the middle of the gzip stream
  fatal: the remote end hung up unexpectedly

Notice that the length of the first line is 54 bytes (including the trailing newline). So I suspect that the following is happening:

  - http-backend in the previous test writes the first line,
  - that test finishes and this one starts,
  - this test truncates 'act.err',
  - and then the still-running http-backend from the previous test
    finally writes the second line.

So at this point 'act.err' is empty, but the offset of the fd of the redirection still open from the previous test is at 54, so the file system fills those bytes with NULs.

Show 6 quoted lines
> I tried adding an "strace" to see who was producing that
> output, but I can't seem to get it to fail when running under strace
> (presumably because the timing is quite different, and this likely some
> kind of pipe race).
> 
> -Peff
Previous: Jeff KingNext: Jeff King
Message 34 of 35 in “t5562: skip if NO_CURL is enabled”
  1. t5562: skip if NO_CURL is enabledCarlo Marcelo Arenas Belón, Nov 19, 2018
  2. Ævar Arnfjörð BjarmasonNov 19, 2018
  3. Max KirillovNov 19, 2018
  4. Carlo ArenasNov 19, 2018
  5. Max KirillovNov 19, 2018
  6. Jeff KingNov 19, 2018
  7. t5562: fix perl pathMax Kirillov, Nov 22, 2018
  8. Carlo ArenasNov 23, 2018
  9. Jeff KingNov 24, 2018
  10. Jeff KingNov 20, 2018
  11. Carlo ArenasNov 21, 2018
  12. Max KirillovNov 21, 2018
  13. Carlo ArenasNov 21, 2018
  14. Carlo ArenasNov 22, 2018
  15. Max KirillovNov 22, 2018
  16. Carlo ArenasNov 22, 2018
  17. Jeff KingNov 22, 2018
  18. Max KirillovNov 22, 2018
  19. Carlo ArenasNov 23, 2018
  20. t5562: do not reuse output filesMax Kirillov, Nov 24, 2018
  21. Junio C HamanoNov 24, 2018
  22. Junio C HamanoNov 24, 2018
  23. Max KirillovNov 24, 2018
  24. t5562: do not reuse output filesMax Kirillov, Nov 24, 2018
  25. Jeff KingNov 24, 2018
  26. Max KirillovNov 24, 2018
  27. http-backend: enable cleaning up forked upload/receive-pack on exitMax Kirillov, Nov 24, 2018
  28. Junio C HamanoNov 26, 2018
  29. Junio C HamanoNov 26, 2018
  30. Max KirillovNov 28, 2018
  31. t5562: do not reuse output filesMax Kirillov, Nov 24, 2018
  32. Ævar Arnfjörð BjarmasonNov 28, 2018
  33. Jeff KingDec 1, 2018
  34. SZEDER GáborNov 28, 2018
  35. Jeff KingDec 1, 2018

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.