Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ps9ws-0004aJ-RQ for pgsql-hackers@arkaria.postgresql.org; Thu, 27 Apr 2023 22:18:47 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1ps9wr-0001G0-D3 for pgsql-hackers@arkaria.postgresql.org; Thu, 27 Apr 2023 22:18:45 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ps9wp-0001Fq-O0 for pgsql-hackers@lists.postgresql.org; Thu, 27 Apr 2023 22:18:45 +0000 Received: from out4-smtp.messagingengine.com ([66.111.4.28]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1ps9wh-005SaH-0o for pgsql-hackers@lists.postgresql.org; Thu, 27 Apr 2023 22:18:43 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 4418B5C00E9; Thu, 27 Apr 2023 18:18:30 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Thu, 27 Apr 2023 18:18:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anarazel.de; h= cc:cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm3; t=1682633910; x=1682720310; bh=G9 Spw0Iuakhd7Y4VlD6pB/FOUyX5i4QbxfFaJfQijik=; b=WD6HLfLwMJRwWwAdq9 W7s2E2k4tmBziegIdEaQ1z0L5MlEfT+FRyMolUiePDUytOz67NTFFa/ymDwX0V22 LhLJDrKsfcHD42pCgRe1pTCoB8VzcgoyW+dci64cWHL7+D+xbJZQN6Z5+pP6vcwH I3rpF/1YIOR7KKvWBJnfH6rk6knSYW9IHC6v3abu9CnfWzGE5YH//EH6Km8SWfxQ 3fe0Y1v62eJG6kBjhb37mdAYqLBQA4+thnrvhwNI3ufjjyw4zAWpJd5IBFfu1sUj vs9DLi6qhShHr4lTGawUJurjQkWrDJ1M1r2TwvsNFcwPfaV5oX3+8L8TsPvk7rP0 2qyA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; t=1682633910; x=1682720310; bh=G9Spw0Iuakhd7 Y4VlD6pB/FOUyX5i4QbxfFaJfQijik=; b=bPZetQKSyszPavd1hrHoH9L/mNrKZ HFFMv4/hjYMf2BV+FnnsIcMLktlAWIi10eJnHmXmOLjtaYkA0C6BjPJn2GdkAzub /2UIc3Kc64a+eel6pW9x/nZJH9HsXKwG3gRMvTLmNa2KC/LtQgsIcflRE9y2s4s/ 5ssgFrfzC/FTaxhYZkzHzzYQU8RradasTsE30Ocb2VnOgU46Er9F8AK7xPz0jpbf ebIUbQktM6hSMTAtrRmkQ2yB6HquUHjZRhtmtTux7n67Q/yCWKIr75oMLIk4Jw1z 1FqBj58wv3+NpgzlaNd6X0C/OalMr/pJLO5tHRc0Wo7QL/CeDpu6ZhxnQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrfedujedguddtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvfevuffkfhggtggujgesthdtredttddtvdenucfhrhhomheptehnughr vghsucfhrhgvuhhnugcuoegrnhgurhgvshesrghnrghrrgiivghlrdguvgeqnecuggftrf grthhtvghrnhepvdfffeevhfetveffgeeiteefhfdtvdffjeevhfeuteegleduheetvedu ieettddunecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomh eprghnughrvghssegrnhgrrhgriigvlhdruggv X-ME-Proxy: Feedback-ID: id4a34324:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 27 Apr 2023 18:18:29 -0400 (EDT) Date: Thu, 27 Apr 2023 15:18:28 -0700 From: Andres Freund To: Andrew Dunstan Cc: Tom Lane , pgsql-hackers@lists.postgresql.org Subject: Re: issue with meson builds on msys2 Message-ID: <20230427221828.2qo7z4xb4f7islln@awork3.anarazel.de> References: <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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6efeb45a-07f9-2291-c8f8-9fb4abbb6ebc@dunslane.net> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi, On 2023-04-26 09:59:05 -0400, Andrew Dunstan wrote: > Still running into this, and I am rather stumped. This is a blocker for > buildfarm support for meson: > > Here's a simple illustration of the problem. If I do the identical test with > a non-meson build there is no problem: This happens 100% reproducible? > pgrunner@EC2AMAZ-GCB871B UCRT64 ~/bf > $ export PGCTLTIMEOUT=300 > > 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 start") ; print "fail\n" if $?; ' > waiting for server to start.... done > server started Does it happen as well if you use ucrt perl? Not because I think we should require it, just to narrow the space. Any chance that doing export MSYS=winjitdebug changes something? There's quite a bit of similarity with the python issue you've also encountered - python would just exit with the a failure indicating exit code. > 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") ; print "fail\n" if $?; ' > waiting for server to shut down....fail Hm. I don't remember the details, but in the python case I was able to get some additional error code somehow, which then indicated that the child-process failed with the NT status code indicating the equivalent of a segfault. I guess system() in msys perl will invoke bash as a shell to execute the problem. Perhaps the failing program isn't actually pg_ctl, but the shell? If it is indeed bash, what does the shell report as the exit code of pg_ctl? E.g. doing something like system('bin/pg_ctl -D data-C -l logfile stop; echo $?'); Could you do ldd (with mingw's ldd, which understands PE binaries) of meson and autoconf built pg_ctl on your machine? I wonder if we end up with a different windows runtime or such. In the python case I had some circumstantial evidence that the problem was dependent on the windows runtime version. Downthread you mention that the issue doesn't happen with IPC::Run - the biggest difference I can see is that IPC::Run would IIRC not use a shell? Does the problem "re-appear" if you make IPC::Run use a shell? Greetings, Andres Freund