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

Re: [ANNOUNCE] Git v2.33.0-rc2 (Build/Test Report)

From
Jeff King <peff@peff.net>
Date
Aug 16, 2021, 21:59 UTC
Message-ID
<YRrfqfzDibDegxin@coredump.intra.peff.net>
In-Reply-To
<YRretXfEfiVujSeO@coredump.intra.peff.net>
On Mon, Aug 16, 2021 at 05:55:01PM -0400, Jeff King wrote:
Show 10 quoted lines
> So ideally we'd have some way of atomically checking our flag and then
> sleeping only if it's not set. But I don't think that exists. The
> closest we can come is using a series of smaller sleeps and checks. And
> indeed, digging in the archive shows that Max already proposed such a
> patch:
> 
>   https://lore.kernel.org/git/20190218205028.32486-1-max@max630.net/
> 
> It looks like it feel through the cracks, though. Maybe now is a good
> time to resurrect it.

And here it is for convenience. I think this is worth doing, as it avoids occasional 60-second hangs in the test suite (and I confirmed that with the "fail if it takes more than 5 seconds" hack I showed earlier).

-- >8 --
From: Max Kirillov <max@max630.net>
Subject: [PATCH] t5562: chunked sleep to avoid lost SIGCHILD

If was found during stress-test run that a test may hang by 60 seconds. It supposedly happens because SIGCHILD was received before sleep has started.

Fix by looping by smaller chunks, checking $exited after each of them. Then lost SIGCHILD would not cause longer delay than 1 second.

Reported-by: SZEDER Gábor <szeder.dev@gmail.com>
Signed-off-by: Max Kirillov <max@max630.net>
Signed-off-by: Jeff King <peff@peff.net>
---
 t/t5562/invoke-with-content-length.pl | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
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";
-- 
2.33.0.rc2.497.g375df73092
Previous: Jeff KingNext: Randall S. Becker
Message 8 of 17 in “RE: [ANNOUNCE] Git v2.33.0-rc2 (Build/Test Report)”
  1. Randall S. BeckerAug 13, 2021
  2. Junio C HamanoAug 13, 2021
  3. Jeff KingAug 13, 2021
  4. Randall S. BeckerAug 16, 2021
  5. Jeff KingAug 16, 2021
  6. Randall S. BeckerAug 16, 2021
  7. Jeff KingAug 16, 2021
  8. Jeff KingAug 16, 2021
  9. Randall S. BeckerAug 16, 2021
  10. Jeff KingAug 16, 2021
  11. Randall S. BeckerAug 16, 2021
  12. Jeff KingAug 16, 2021
  13. Randall S. BeckerAug 16, 2021
  14. Jeff KingAug 16, 2021
  15. Jeff KingAug 16, 2021
  16. Randall S. BeckerAug 17, 2021
  17. Randall S. BeckerAug 17, 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.