pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andrew Dunstan <andrew@dunslane.net>
Cc: Andres Freund <andres@anarazel.de>
Cc: pgsql-hackers@lists.postgresql.org
Subject: Re: issue with meson builds on msys2
Date: Wed, 26 Apr 2023 11:30:22 -0400
Message-ID: <863239.1682523022@sss.pgh.pa.us> (raw)
In-Reply-To: <365f59bd-1aaf-0af0-46ee-89e6a0dae391@dunslane.net>
References: <E1poQg3-003Xv9-UZ@gemulon.postgresql.org>
	<08dd6053-deee-52e9-954b-eb69232905c9@dunslane.net>
	<2506819.1681761221@sss.pgh.pa.us>
	<7d7dcc20-ba19-5340-9be8-f255e8b42edc@dunslane.net>
	<20230420150652.jciazjap223iznjp@awork3.anarazel.de>
	<5bddd941-9819-6655-7a71-3f346050583e@dunslane.net>
	<6efeb45a-07f9-2291-c8f8-9fb4abbb6ebc@dunslane.net>
	<848511.1682519554@sss.pgh.pa.us>
	<851356.1682521091@sss.pgh.pa.us>
	<365f59bd-1aaf-0af0-46ee-89e6a0dae391@dunslane.net>

Andrew Dunstan <andrew@dunslane.net> writes:
> If I redirect the output to a file (which is what the buildfarm client 
> actually does), it seems like it completes successfully, but I still get 
> a non-zero exit:

> pgrunner@EC2AMAZ-GCB871B UCRT64 ~/bf
> $ /usr/bin/perl -e 'chdir "root/HEAD/instkeep.2023-04-25_11-09-41"; 
> system("bin/pg_ctl -D data-C -l logfile stop > stoplog 2>&1") ; print 
> "BANG\n" if $?; '
> BANG

> pgrunner@EC2AMAZ-GCB871B UCRT64 ~/bf
> $ cat root/HEAD/instkeep.2023-04-25_11-09-41/stoplog
> waiting for server to shut down.... done
> server stopped

Thats ... just wacko.  do_stop() emits "waiting for server to shut
down...", "done", and "server stopped" in the same way (via print_msg).
How is it that all three messages show up in one context but not the
other?  Could wait_for_postmaster_stop or get_pgpid be bollixing the
stdout channel somehow?  Try redirecting stdout and stderr separately
to see if that proves anything.

> It seems more than odd that we get to where the "server stopped" massage 
> is printed but we get a failure.

Indeed, that's even weirder.  do_stop() returns directly to the
exit(0) in main().

			regards, tom lane





view thread (24+ messages)  latest in thread

Message-ID: <863239.1682523022@sss.pgh.pa.us>
Permalink:  ../863239.1682523022@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/863239.1682523022@sss.pgh.pa.us

 · 

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: pgsql-committers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, andrew@dunslane.net, andres@anarazel.de, pgsql-hackers@lists.postgresql.org
  Subject: Re: issue with meson builds on msys2
  In-Reply-To: <863239.1682523022@sss.pgh.pa.us>

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

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