git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Patrick Steinhardt <ps@pks.im>
Cc: git@vger.kernel.org, Junio C Hamano <gitster@pobox.com>
Subject: Re: [PATCH v2 02/10] t7422: fix flaky test caused by buffered stdout
Date: Mon, 6 Jan 2025 21:49:51 -0500	[thread overview]
Message-ID: <20250107024951.GD2363@coredump.intra.peff.net> (raw)
In-Reply-To: <20250106-b4-pks-ci-fixes-v2-2-06ae540771b7@pks.im>

On Mon, Jan 06, 2025 at 12:16:51PM +0100, Patrick Steinhardt wrote:

> Fix the issue by making the writer fill the pipe buffer before we
> execute git-submodule(1). Ideally, it would be git-submodule(1) itself
> that does produce all that data, but it would require us to create a
> large amount of submodules, which is inefficient. Instead, we use Perl
> to print gibberish until the buffer is filled.
> 
> To verify that this works as expected one can apply the following patch
> to the preimage of this commit, which used to reliably trigger the race:
> 
>     diff --git a/t/t7422-submodule-output.sh b/t/t7422-submodule-output.sh
>     index f21e920367..9338c75626 100755
>     --- a/t/t7422-submodule-output.sh
>     +++ b/t/t7422-submodule-output.sh
>     @@ -168,7 +168,7 @@ done
> 
>      test_expect_success !MINGW 'git submodule status --recursive propagates SIGPIPE' '
>             { git submodule status --recursive 2>err; echo $?>status; } |
>     -		grep -q X/S &&
>     +		{ sleep 1 && grep -q X/S; } &&
>             test_must_be_empty err &&
>             test_match_signal 13 "$(cat status)"
>      '
> 
> With the pipe-stuffing workaround the test runs successfully.

Sadly this isn't enough. The pipe-stuffing solves the race with grep
_starting_ (and thus the extra "sleep"), but the fundamental race we've
seen in practice still remains. See my reply the v1 thread for details.

-Peff

  reply	other threads:[~2025-01-07  2:49 UTC|newest]

Thread overview: 69+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-03 14:46 [PATCH 00/10] A couple of CI improvements Patrick Steinhardt
2025-01-03 14:46 ` [PATCH 01/10] t0060: fix EBUSY in MinGW when setting up runtime prefix Patrick Steinhardt
2025-01-03 14:46 ` [PATCH 02/10] t7422: fix flaky test caused by buffered stdout Patrick Steinhardt
2025-01-03 18:17   ` Jeff King
2025-01-06 11:12     ` Patrick Steinhardt
2025-01-07  2:39       ` Jeff King
2025-01-07  8:47         ` Patrick Steinhardt
2025-01-07  8:50           ` Patrick Steinhardt
2025-01-09  7:17           ` Jeff King
2025-01-09 16:16             ` Junio C Hamano
2025-01-07  2:48       ` Jeff King
2025-01-07 16:02         ` Junio C Hamano
2025-01-03 14:46 ` [PATCH 03/10] github: adapt containerized jobs to be rootless Patrick Steinhardt
2025-01-03 14:46 ` [PATCH 04/10] github: convert all Linux jobs to be containerized Patrick Steinhardt
2025-01-03 18:56   ` Jeff King
2025-01-03 19:06     ` Jeff King
2025-01-06 11:12       ` Patrick Steinhardt
2025-01-03 19:16   ` Junio C Hamano
2025-01-03 14:46 ` [PATCH 05/10] github: simplify computation of the job's distro Patrick Steinhardt
2025-01-03 19:09   ` Junio C Hamano
2025-01-03 14:46 ` [PATCH 06/10] gitlab-ci: remove the "linux-old" job Patrick Steinhardt
2025-01-03 19:12   ` Junio C Hamano
2025-01-03 14:46 ` [PATCH 07/10] gitlab-ci: add linux32 job testing against i386 Patrick Steinhardt
2025-01-03 14:46 ` [PATCH 08/10] ci: stop special-casing for Ubuntu 16.04 Patrick Steinhardt
2025-01-03 14:46 ` [PATCH 09/10] ci: use latest Ubuntu release Patrick Steinhardt
2025-01-03 14:46 ` [PATCH 10/10] ci: remove stale code for Azure Pipelines Patrick Steinhardt
2025-01-03 18:57 ` [PATCH 00/10] A couple of CI improvements Jeff King
2025-01-06 11:16 ` [PATCH v2 " Patrick Steinhardt
2025-01-06 11:16   ` [PATCH v2 01/10] t0060: fix EBUSY in MinGW when setting up runtime prefix Patrick Steinhardt
2025-01-06 11:16   ` [PATCH v2 02/10] t7422: fix flaky test caused by buffered stdout Patrick Steinhardt
2025-01-07  2:49     ` Jeff King [this message]
2025-01-06 11:16   ` [PATCH v2 03/10] github: adapt containerized jobs to be rootless Patrick Steinhardt
2025-01-06 11:16   ` [PATCH v2 04/10] github: convert all Linux jobs to be containerized Patrick Steinhardt
2025-01-06 11:16   ` [PATCH v2 05/10] github: simplify computation of the job's distro Patrick Steinhardt
2025-01-06 11:16   ` [PATCH v2 06/10] gitlab-ci: remove the "linux-old" job Patrick Steinhardt
2025-01-06 11:16   ` [PATCH v2 07/10] gitlab-ci: add linux32 job testing against i386 Patrick Steinhardt
2025-01-06 11:16   ` [PATCH v2 08/10] ci: stop special-casing for Ubuntu 16.04 Patrick Steinhardt
2025-01-06 11:16   ` [PATCH v2 09/10] ci: use latest Ubuntu release Patrick Steinhardt
2025-01-06 11:16   ` [PATCH v2 10/10] ci: remove stale code for Azure Pipelines Patrick Steinhardt
2025-01-07 12:30 ` [PATCH v3 00/10] A couple of CI improvements Patrick Steinhardt
2025-01-07 12:30   ` [PATCH v3 01/10] t0060: fix EBUSY in MinGW when setting up runtime prefix Patrick Steinhardt
2025-01-07 12:30   ` [PATCH v3 02/10] t7422: fix flaky test caused by buffered stdout Patrick Steinhardt
2025-01-09  7:33     ` Jeff King
2025-01-07 12:30   ` [PATCH v3 03/10] github: adapt containerized jobs to be rootless Patrick Steinhardt
2025-01-07 12:30   ` [PATCH v3 04/10] github: convert all Linux jobs to be containerized Patrick Steinhardt
2025-01-07 12:30   ` [PATCH v3 05/10] github: simplify computation of the job's distro Patrick Steinhardt
2025-01-07 12:30   ` [PATCH v3 06/10] gitlab-ci: remove the "linux-old" job Patrick Steinhardt
2025-01-07 12:30   ` [PATCH v3 07/10] gitlab-ci: add linux32 job testing against i386 Patrick Steinhardt
2025-01-07 12:30   ` [PATCH v3 08/10] ci: stop special-casing for Ubuntu 16.04 Patrick Steinhardt
2025-01-07 12:30   ` [PATCH v3 09/10] ci: use latest Ubuntu release Patrick Steinhardt
2025-01-07 12:30   ` [PATCH v3 10/10] ci: remove stale code for Azure Pipelines Patrick Steinhardt
2025-01-10 11:31 ` [PATCH v4 00/10] A couple of CI improvements Patrick Steinhardt
2025-01-10 11:31   ` [PATCH v4 01/10] t0060: fix EBUSY in MinGW when setting up runtime prefix Patrick Steinhardt
2025-01-10 11:31   ` [PATCH v4 02/10] t7422: fix flaky test caused by buffered stdout Patrick Steinhardt
2025-01-24  9:16     ` Christian Couder
2025-01-10 11:31   ` [PATCH v4 03/10] github: adapt containerized jobs to be rootless Patrick Steinhardt
2025-01-24  9:56     ` Christian Couder
2025-08-28  9:58     ` Johannes Schindelin
2025-11-17 17:30       ` Johannes Schindelin
2025-01-10 11:32   ` [PATCH v4 04/10] github: convert all Linux jobs to be containerized Patrick Steinhardt
2025-01-10 11:32   ` [PATCH v4 05/10] github: simplify computation of the job's distro Patrick Steinhardt
2025-01-10 11:32   ` [PATCH v4 06/10] gitlab-ci: remove the "linux-old" job Patrick Steinhardt
2025-01-10 11:32   ` [PATCH v4 07/10] gitlab-ci: add linux32 job testing against i386 Patrick Steinhardt
2025-01-10 11:32   ` [PATCH v4 08/10] ci: stop special-casing for Ubuntu 16.04 Patrick Steinhardt
2025-01-10 11:32   ` [PATCH v4 09/10] ci: use latest Ubuntu release Patrick Steinhardt
2025-01-10 11:32   ` [PATCH v4 10/10] ci: remove stale code for Azure Pipelines Patrick Steinhardt
2025-01-10 12:03   ` [PATCH v4 00/10] A couple of CI improvements Jeff King
2025-01-24  9:59   ` Christian Couder
2025-01-27  7:00     ` Patrick Steinhardt

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=20250107024951.GD2363@coredump.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=ps@pks.im \
    /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 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 NNTP newsgroup(s).