git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "SZEDER Gábor" <szeder.dev@gmail.com>
To: Jeff King <peff@peff.net>
Cc: Carlo Arenas <carenas@gmail.com>, max@max630.net, git@vger.kernel.org
Subject: Re: [PATCH] t5562: skip if NO_CURL is enabled
Date: Wed, 28 Nov 2018 14:27:08 +0100	[thread overview]
Message-ID: <20181128132708.GE30222@szeder.dev> (raw)
In-Reply-To: <20181120091107.GA30542@sigill.intra.peff.net>

On Tue, Nov 20, 2018 at 04:11:08AM -0500, Jeff King wrote:
> 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.


> 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

  parent reply	other threads:[~2018-11-28 13:27 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-19 10:15 [PATCH] t5562: skip if NO_CURL is enabled Carlo Marcelo Arenas Belón
2018-11-19 10:42 ` Ævar Arnfjörð Bjarmason
2018-11-19 18:40 ` Max Kirillov
2018-11-19 19:36   ` Carlo Arenas
2018-11-19 21:26     ` Max Kirillov
2018-11-19 21:39       ` Jeff King
2018-11-22 23:38         ` [PATCH] t5562: fix perl path Max Kirillov
2018-11-23 14:31           ` Carlo Arenas
2018-11-24 12:10           ` Jeff King
2018-11-20  9:11     ` [PATCH] t5562: skip if NO_CURL is enabled Jeff King
2018-11-21 12:02       ` Carlo Arenas
2018-11-21 22:49         ` Max Kirillov
2018-11-21 23:36           ` Carlo Arenas
2018-11-22  1:04           ` Carlo Arenas
2018-11-22  6:37             ` Max Kirillov
2018-11-22 10:17               ` Carlo Arenas
2018-11-22 16:17                 ` Jeff King
2018-11-22 23:43                   ` Max Kirillov
2018-11-23 12:57                     ` Carlo Arenas
2018-11-24  7:04                       ` [PATCH] t5562: do not reuse output files Max Kirillov
2018-11-24  7:34                         ` Junio C Hamano
2018-11-24  7:47                           ` Junio C Hamano
2018-11-24  7:58                             ` Max Kirillov
2018-11-24  9:37                             ` [PATCH v3] " Max Kirillov
2018-11-24 12:14                             ` [PATCH] " Jeff King
2018-11-24 13:03                             ` Max Kirillov
2018-11-24 13:48                               ` [PATCH] http-backend: enable cleaning up forked upload/receive-pack on exit Max Kirillov
2018-11-26  2:10                                 ` Junio C Hamano
2018-11-26  2:06                               ` [PATCH] t5562: do not reuse output files Junio C Hamano
2018-11-28  4:17                                 ` Max Kirillov
2018-11-24  7:52                           ` [PATCH v2] " Max Kirillov
2018-11-28 14:56                   ` [PATCH] t5562: skip if NO_CURL is enabled Ævar Arnfjörð Bjarmason
2018-12-01 19:53                     ` Jeff King
2018-11-28 13:27       ` SZEDER Gábor [this message]
2018-12-01 19:50         ` Jeff King

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181128132708.GE30222@szeder.dev \
    --to=szeder.dev@gmail.com \
    --cc=carenas@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=max@max630.net \
    --cc=peff@peff.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).