Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1w7w6a-0002ww-0T for pgsql-hackers@arkaria.postgresql.org; Wed, 01 Apr 2026 13:59:36 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1w7w5Y-000LNC-38 for pgsql-hackers@arkaria.postgresql.org; Wed, 01 Apr 2026 13:58:33 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1w7w5Y-000LMz-1n for pgsql-hackers@lists.postgresql.org; Wed, 01 Apr 2026 13:58:32 +0000 Received: from fhigh-a4-smtp.messagingengine.com ([103.168.172.155]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1w7w5W-000000001Ey-2lXQ for pgsql-hackers@lists.postgresql.org; Wed, 01 Apr 2026 13:58:31 +0000 Received: from phl-compute-06.internal (phl-compute-06.internal [10.202.2.46]) by mailfhigh.phl.internal (Postfix) with ESMTP id 00800140038E; Wed, 1 Apr 2026 09:58:30 -0400 (EDT) Received: from phl-frontend-03 ([10.202.2.162]) by phl-compute-06.internal (MEProxy); Wed, 01 Apr 2026 09:58: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:subject :subject:to:to; s=fm2; t=1775051909; x=1775138309; bh=J5gx+EqAVx UTOWJKHQR3JQHPktjTtyCu1PK/AAERYKQ=; b=s8520MHKCpbOf2wkXC6MimWUPL vSK1OeDhzA6Elbo/dtuKAVss7BV0yT6Vl3O2eeQDRmj1zm84qwryPvV6/ETZgsql yHUxpyzNdysaf3MaDmNgwMePoJxCfYTIezUJcYZAcEKUqj027cf1O+cxwNbvvCwW 8KI8fPg48mNRHKPXqkFpc9PEBvsdEV3SGgvdRUKoqAyslpuzdRCiBJLwSnBtiL4i hrkCpTtBHNGTdPohk8VwWsfvDbBJUmn/n2hOe2X+OrI8O6Bo4+va8ovAh/TU1G70 P00DCh4CftLNKiX7T4FXHk1aoVSUWLFOxvsgH1SlMWUs7rYrAzsc8dNPQMaA== 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:subject:subject:to :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t= 1775051909; x=1775138309; bh=J5gx+EqAVxUTOWJKHQR3JQHPktjTtyCu1PK /AAERYKQ=; b=aecsqBcrp5UZ2VbXqmifwqZqnq0cOTCRFD1bqEzQHjefS4Zky2G U1GLpC2OZSInLFeSMsl6wnYDwiVAK829IsbMyIdd7pPIOb3VRb8C0mSdRPCesB1n WX7ZZaDImy/Jzzf7x+84CCmiWw861tDUcgbzLzTS8jCYxsS/abVNvWS2ylvl52gE O1GMyIhjzNY17B/rGt9Pwcj5gTh6RZAWCO96nG9IexizTMXDeNcMueCzh7Ca2Q6n YCc6J5u5hRErC89dl/xrKLeYUGFFCZi7NkF99HJFc7DXXkrulJT/1YJCTsmzL8Hs oXeHJBB2AbgmMBNBrPtEvw1mRWFDyjOa0Uw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefhedrtddtgdeffedtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceurghi lhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurh epfffhvfevuffkfhggtggujgesthdtsfdttddtvdenucfhrhhomheptehnughrvghsucfh rhgvuhhnugcuoegrnhgurhgvshesrghnrghrrgiivghlrdguvgeqnecuggftrfgrthhtvg hrnhephfdtgefhgeeifffgfeefieeftedvgfegffevveevfedufeekgfejgfejffdtheej necuffhomhgrihhnpeduudegrdgrthdpsggrtghkghhrohhunhguphhsqhhlrdhpmhdptg hirhhruhhsqdgtihdrtghomhdpphhoshhtghhrrdgvshenucevlhhushhtvghrufhiiigv pedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrnhgurhgvshesrghnrghrrgiivghlrd guvgdpnhgspghrtghpthhtohepgedpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohep sgihrghvuhiikedusehgmhgrihhlrdgtohhmpdhrtghpthhtohepnhhorghhsehlvggrug gsohgrthdrtghomhdprhgtphhtthhopehpghhsqhhlqdhhrggtkhgvrhhssehlihhsthhs rdhpohhsthhgrhgvshhqlhdrohhrghdprhgtphhtthhopehtghhlsehsshhsrdhpghhhrd hprgdruhhs X-ME-Proxy: Feedback-ID: id4a34324:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 1 Apr 2026 09:58:29 -0400 (EDT) Date: Wed, 1 Apr 2026 09:58:28 -0400 From: Andres Freund To: Nazir Bilal Yavuz Cc: PostgreSQL Hackers , Tom Lane , Noah Misch Subject: Re: 'Bad file descriptor: dup2( 1, 2 )' error on MacOS CI tasks Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi, On 2026-04-01 16:28:21 +0300, Nazir Bilal Yavuz wrote: > psql/010_tab_completion, psql/030_pager and > authentication/001_password tests started to fail on MacOS CI tasks > [1]. Example failure log (error message is same on all of the failing > tests): > ... > # Postmaster PID for node "main" is 8554 > Bad file descriptor: dup2( 1, 2 ) at > /Users/admin/pgsql/src/test/perl/PostgreSQL/Test/BackgroundPsql.pm > line 114. > at /Users/admin/pgsql/src/test/perl/PostgreSQL/Test/BackgroundPsql.pm line 114. Ugh. > My current hypothesis is that all of these three tests use 'IO::Pty'. > On MacOS CI, we install this via MacPorts using the 'p5.34-io-tty' > package [2], which was updated about 2.5 days ago. I am not sure if is > relevant but it has a known issue on Darwin [3]: > > ``` > Darwin 7.9.0 > HPUX 10.20 & 11.00 > EOF on the slave tty is not reported back to the master. > ``` > > I attempted to verify this by downgrading 'p5.34-io-tty' to the > previous version (1.20) and confirm that CI passes but I couldn't > confirm it as I don't have a MacOS machine and for some reason Cirrus > Terminal doesn't show up when I try to run CI with terminal access. > > > Please note that this problem doesn't happen on CFBot or Postgres CI > yet. I think there are two possible reasons: > > 1- We install packages by using MacPorts and then we save them as > cache so we don't need to install them for each CI Run. Problems will > start when this cache is invalidated or expired. It's that. I cleared the cache for macos on my repo, and see the same issue after that. https://cirrus-ci.com/task/5023293209575424 This presumably means that every macports user (e.g. Tom), will see this as well after installing the latest updates. I'm afraid the guy maintaining both IPC::Run [1] and IO::Tty has gone all in on AI authored code. Both IPC::Run and IO::Tty have seen more merges in the last week than in the 5 years before. Stuff getting merged left and right, with failing tests to boot. If I wanted to do a supply chain attack on postgres, this would be the way. Hijack IPC::Run, edit the commits locally on a committers machine before push, to add a backdoor, celebrate. Greetings, Andres Freund [1] https://postgr.es/m/CAN55FZ06xanSbJdHe-CurjX_qNuBWZDEvS1kAk36L38YCtZXnw%40mail.gmail.com