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 1kPRo7-00082Z-J7 for pgsql-general@arkaria.postgresql.org; Mon, 05 Oct 2020 14:49:43 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kPRo5-0002Nj-Go for pgsql-general@arkaria.postgresql.org; Mon, 05 Oct 2020 14:49:41 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kPRo5-0002Mr-9Y for pgsql-general@lists.postgresql.org; Mon, 05 Oct 2020 14:49:41 +0000 Received: from aldebaran.he1ix.org ([2a01:4f8:173:803:0:a1de:ba:a]) by makus.postgresql.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.92) (envelope-from ) id 1kPRnx-0004ej-W3 for pgsql-general@lists.postgresql.org; Mon, 05 Oct 2020 14:49:40 +0000 Received: from port-213-160-25-97.static.as20676.net ([213.160.25.97] helo=[192.168.33.110]) by aldebaran.he1ix.org with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1kPRnr-0004uA-Fq for pgsql-general@lists.postgresql.org; Mon, 05 Oct 2020 16:49:27 +0200 From: Mario Emmenlauer To: pgsql-general@lists.postgresql.org References: <48bafc63-c30f-3962-2ded-f2e985d93e86@emmenlauer.de> X-Tagtoolbar-Keys: D20201005164927081 Message-ID: <3ac84ee7-b4a0-aba5-ddb5-b7c0811fc754@emmenlauer.de> Date: Mon, 5 Oct 2020 16:49:27 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <48bafc63-c30f-3962-2ded-f2e985d93e86@emmenlauer.de> Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 7bit X-SA-Exim-Connect-IP: 213.160.25.97 X-SA-Exim-Mail-From: mario@emmenlauer.de X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on aldebaran.he1ix.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00, NICE_REPLY_A autolearn=ham version=3.3.1 Subject: Re: dup(0) fails on Ubuntu 20.04 and macOS 10.15 with 13.0 X-SA-Exim-Version: 4.2.1 (built Sun, 08 Nov 2009 07:31:22 +0000) X-SA-Exim-Scanned: Yes (on aldebaran.he1ix.org) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 05.10.20 13:22, Mario Emmenlauer wrote: > I've used PostgreSQL since version 9.x successfully on Linux, macOS > and Windows. Today I've upgraded from 12.3 to 13.0 and suddenly I can > not start the server any more on Ubuntu 20.04 (inside Docker on Ubuntu > 18.04) and on macOS 10.15. > > I get reproducibly the error: > 2020-10-05 11:48:19.720 CEST [84731] WARNING: dup(0) failed after 0 successes: Bad file descriptor > 2020-10-05 11:48:19.720 CEST [84731] FATAL: insufficient file descriptors available to start server process > 2020-10-05 11:48:19.720 CEST [84731] DETAIL: System allows 0, we need at least 58. > 2020-10-05 11:48:19.720 CEST [84731] LOG: database system is shut down > > What makes this quite curious is that everything continues to work on > Ubuntu 18.04, and Windows with Visual Studio 2019. > > I compile postgreSQL myself from source, but there are no patches or > tweaks involved (that I could think relevant for this problem). > > I've searched for the particular error and understand that it is usually > caused by system limits on new files(?) But in my case, the failing > setups are relatively modern, powerful CI test machines, with virtually > no load at the time of test. > > On Linux Ubuntu 20.04, `ulimit -n` shows `1048576` which seems also > relatively high (but must be the default, not changed by me). > > Does this problem mean anything to anyone? I'm completely lost where > to go from here, or what to try next :-( Help would be greatly > appreciated! I've just regression-tested 12.4 for the above problem, and I can now isolate that 12.3 and 12.4 do _not_ give me above problem whereas 13.0 _does_ give me above problem. I tried also to isolate commits that may be related, but could not find anything useful :-( Help would be greatly appreciated! All the best, Mario Emmenlauer