public inbox for [email protected]  
help / color / mirror / Atom feed
From: Tom Lane <[email protected]>
To: Noah Misch <[email protected]>
Cc: Andres Freund <[email protected]>
Cc: [email protected]
Subject: Re: BackgroundPsql swallowing errors on windows
Date: Sun, 16 Feb 2025 18:18:44 -0500
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <wmovm6xcbwh7twdtymxuboaoarbvwj2haasd3sikzlb3dkgz76@n45rzycluzft>
	<[email protected]>
	<h6t2voqv6vm4xk4oh5q6og676h7ehv2opbvr2id7m2xot3adh5@t7su2dmuo3bs>
	<[email protected]>
	<qo3x3ycl5fokh4tumm3lo6rn6ijvl7mmes7k24fm3kuv4xaupt@px4vl5ocnvth>
	<[email protected]>

Noah Misch <[email protected]> writes:
> From the slow proxy's perspective, it can't rule out the program under test
> having done those two write() calls.  The proxy doesn't have enough
> information to reconstruct the original four write() calls.  What prevents
> that anomaly?

Yeah, I think it's hopeless to expect that we can disambiguate the
order of writes to two different pipes.  For the problem at hand,
though, it seems like we don't really need to do that.  Rather, the
question is "when we detect that the program-under-test has exited,
can we be sure we have collected all of its output?".  I think that
IPC::Run may be screwing up here, because I have seen non-Windows
CI failures that look like it didn't read all the stderr output.
For example, this pgbench test failure on macOS from [1]:

# Running: pgbench -n -t 1 -Dfoo=bla -Dnull=null -Dtrue=true -Done=1 -Dzero=0.0 -Dbadtrue=trueXXX -Dmaxint=9223372036854775807 -Dminint=-9223372036854775808 -M prepared -f /Users/admin/pgsql/build/testrun/pgbench/001_pgbench_with_server/data/t_001_pgbench_with_server_main_data/001_pgbench_error_shell_bad_command
[17:27:47.408](0.061s) ok 273 - pgbench script error: shell bad command status (got 2 vs expected 2)
[17:27:47.409](0.000s) ok 274 - pgbench script error: shell bad command stdout /(?^:processed: 0/1)/
[17:27:47.409](0.000s) not ok 275 - pgbench script error: shell bad command stderr /(?^:\(shell\) .* meta-command failed)/
[17:27:47.409](0.000s) #   Failed test 'pgbench script error: shell bad command stderr /(?^:\(shell\) .* meta-command failed)/'
#   at /Users/admin/pgsql/src/bin/pgbench/t/001_pgbench_with_server.pl line 1466.
#                   ''
#     doesn't match '(?^:\(shell\) .* meta-command failed)'

The program's exited with a failure code as expected, and we saw (some
of?) the expected stdout output, but stderr output is reported to be
empty.

			regards, tom lane

[1] https://cirrus-ci.com/task/6221238034497536






view thread (21+ messages)  latest in thread

reply

Reply instructions:

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

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected]
  Subject: Re: BackgroundPsql swallowing errors on windows
  In-Reply-To: <[email protected]>

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

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox