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 1kPRaR-0007az-L2 for pgsql-general@arkaria.postgresql.org; Mon, 05 Oct 2020 14:35:35 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kPRaQ-0000pl-Ik for pgsql-general@arkaria.postgresql.org; Mon, 05 Oct 2020 14:35:34 +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 1kPRaQ-0000pZ-BO for pgsql-general@lists.postgresql.org; Mon, 05 Oct 2020 14:35:34 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kPRaN-00056f-MK for pgsql-general@lists.postgresql.org; Mon, 05 Oct 2020 14:35:33 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 095EZMpL1720576; Mon, 5 Oct 2020 10:35:23 -0400 From: Tom Lane To: Mario Emmenlauer cc: pgsql-general@lists.postgresql.org Subject: Re: dup(0) fails on Ubuntu 20.04 and macOS 10.15 with 13.0 In-reply-to: <48bafc63-c30f-3962-2ded-f2e985d93e86@emmenlauer.de> References: <48bafc63-c30f-3962-2ded-f2e985d93e86@emmenlauer.de> Comments: In-reply-to Mario Emmenlauer message dated "Mon, 05 Oct 2020 13:22:18 +0200" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1720574.1601908522.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Mon, 05 Oct 2020 10:35:22 -0400 Message-ID: <1720575.1601908522@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Mario Emmenlauer writes: > I get reproducibly the error: > 2020-10-05 11:48:19.720 CEST [84731] WARNING: dup(0) failed after 0 suc= cesses: Bad file descriptor Hmph. That code loop assumes that stdin exists to be duplicated, but maybe if it had been closed, you'd get this error. However, that logic hasn't changed in decades, and we've not heard complaints about it before. Are you starting the server in some unusual way? regards, tom lane