git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Max Kirillov <max@max630.net>
To: "SZEDER Gábor" <szeder.dev@gmail.com>
Cc: Johannes Schindelin <Johannes.Schindelin@gmx.de>,
	"Randall S. Becker" <rsbecker@nexbridge.com>,
	'Junio C Hamano' <gitster@pobox.com>,
	git@vger.kernel.org, 'Max Kirillov' <max@max630.net>
Subject: Re: [ANNOUNCE] Git v2.21.0-rc1 (NonStop Results)
Date: Fri, 15 Feb 2019 22:37:26 +0200	[thread overview]
Message-ID: <20190215203726.GG3064@jessie.local> (raw)
In-Reply-To: <20190215130213.GK1622@szeder.dev>

On Fri, Feb 15, 2019 at 02:02:13PM +0100, SZEDER Gábor wrote:
> I haven't yet seen that hang in the wild and couldn't reproduce it on
> purpose, but there is definitely something fishy with t5562 even on
> Linux and even without that perl generate_zero_bytes helper.
> 
> It won't show most of the processes run in the tests, because they are
> just too fast and short-lived.  However, occasionally it does show a
> stuck git process, which is shown as <defunct> in regular 'ps aux'
> output:
> 
>   szeder   5722  0.0  0.0      0     0 pts/16   Z+   13:36   0:00 [git] <defunct>
> 
> Note that this is not a "proper" hang, in the sense that this process
> is not stuck forever, but only for about 1 minute

This is probably because of SIGCHILD comes before "sleep". I believe this is
unrelated to the hang issue. The hang issue looks like something is wrong with
cleanu_children(), or maybe in the child which it tries to kill and wait, not in
tests.

As for this zombie issue, could be fixed with, for example, more busy wait like
the following. It may with some bigger probability miss SIGCHILD to the first
sleep because there is a bit more to do before it. But the penalty is only 1
second now, and as it still happens rarely there seems to be no visible
degradation.

--- 8< -----------
diff --git a/t/t5562/invoke-with-content-length.pl b/t/t5562/invoke-with-content-length.pl
index 0943474af2..257e280e3b 100644
--- a/t/t5562/invoke-with-content-length.pl
+++ b/t/t5562/invoke-with-content-length.pl
@@ -29,7 +29,12 @@
 }
 print $out $body_data or die "Cannot write data: $!";
 
-sleep 60; # is interrupted by SIGCHLD
+my $counter = 0;
+while (not $exited and $counter < 60) {
+        sleep 1;
+        $counter = $counter + 1;
+}
+
 if (!$exited) {
         close($out);
         die "Command did not exit after reading whole body";

  parent reply	other threads:[~2019-02-15 20:37 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-14 15:04 [ANNOUNCE] Git v2.21.0-rc1 (NonStop Results) Randall S. Becker
2019-02-14 19:56 ` Junio C Hamano
2019-02-14 21:36 ` Johannes Schindelin
2019-02-14 22:25   ` Randall S. Becker
2019-02-15 13:02   ` SZEDER Gábor
2019-02-15 13:49     ` Randall S. Becker
2019-02-15 20:37     ` Max Kirillov [this message]
2019-02-15 21:13       ` Randall S. Becker
2019-02-16  8:26         ` Max Kirillov
2019-02-18 20:50     ` [PATCH] t5562: chunked sleep to avoid lost SIGCHILD Max Kirillov
2019-02-18 20:54       ` Randall S. Becker
2019-02-18 20:59         ` Max Kirillov
2019-02-19 18:38       ` Junio C Hamano

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=20190215203726.GG3064@jessie.local \
    --to=max@max630.net \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=rsbecker@nexbridge.com \
    --cc=szeder.dev@gmail.com \
    /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).