From: Jonathan Nieder <jrnieder@gmail.com>
To: Jeff King <peff@peff.net>
Cc: Thomas Rast <trast@student.ethz.ch>, git@vger.kernel.org
Subject: Re: t7006 sometimes hangs in cronjobs on OS X
Date: Fri, 11 Feb 2011 20:03:21 -0600 [thread overview]
Message-ID: <20110212020321.GA24629@elie> (raw)
In-Reply-To: <20110209205056.GA2083@sigill.intra.peff.net>
Jeff King wrote:
> Yeah, it is probably stuck in some syscall. You could try instrumenting
> your test-terminal.perl like:
>
> diff --git a/t/test-terminal.perl b/t/test-terminal.perl
> index ee01eb9..1755017 100755
> --- a/t/test-terminal.perl
> +++ b/t/test-terminal.perl
> @@ -55,11 +55,15 @@ sub copy_stdio {
> defined $pid or die "fork failed: $!";
> if (!$pid) {
> close($out);
> + print STDERR "child: pumping stderr\n";
[...]
Nice, I can reproduce this (kernel = Darwin 10.5.0, using Apple's perl
5.10.0). With
while ./test-terminal.perl echo hi >out.$i 2>&1
do
i=$(($i + 1))
echo $i
done
I get:
$ cat out.28
child: pumping stdout
child: pumping stderr
hi
child: done pumping stdout
Instrumenting Copy.pm, I can see that we are stuck in sysread.
31984: child: pumping stdout
31984: enter copy loop.
31984: time to read 4096...
31986: child: pumping stderr
31984: read returns with 4
31984: about to write "hi
"
31984: pump 4 - 0, result = 4
31984: time to read 4096...
31986: enter copy loop.
31986: time to read 4096...
31986: read returns with 0
31986: about to write ""
31986: done!
31986: successful return.
31986: copy returns with 1 errno=
31986: child: done pumping stderr
Redirecting stderr by using 'xsendfile("elsewhere", $err);' avoids
trouble. Asking stderr and stdout to go to different places, like so:
./test-terminal.perl echo hi >out.$i 2>err.$i
does not avoid trouble. Sometimes output includes some streams of
null bytes, which makes me suspect something awry in the kernel.
next prev parent reply other threads:[~2011-02-12 2:03 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-09 14:38 t7006 sometimes hangs in cronjobs on OS X Thomas Rast
2011-02-09 18:30 ` Ben Walton
2011-02-09 19:09 ` Jeff King
2011-02-09 19:16 ` Thomas Rast
2011-02-09 20:22 ` Thomas Rast
2011-02-09 20:50 ` Jeff King
2011-02-12 2:03 ` Jonathan Nieder [this message]
2011-02-12 2:05 ` Jonathan Nieder
2011-02-12 5:12 ` Jeff King
2011-02-12 8:37 ` Jonathan Nieder
2011-02-13 5:31 ` Jonathan Nieder
2011-02-17 12:38 ` [PATCH] tests: skip terminal output tests " Jonathan Nieder
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110212020321.GA24629@elie \
--to=jrnieder@gmail.com \
--cc=git@vger.kernel.org \
--cc=peff@peff.net \
--cc=trast@student.ethz.ch \
/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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.