pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Rémi Zara <remi_zara@mac.com>
To: Thomas Munro <thomas.munro@gmail.com>
Cc: Michael Paquier <michael@paquier.xyz>
Cc: Thomas Munro <tmunro@postgresql.org>
Cc: pgsql-committers <pgsql-committers@lists.postgresql.org>
Subject: Re: pgsql: Add kqueue(2) support to the WaitEventSet API.
Date: Thu, 20 Feb 2020 19:03:59 +0100
Message-ID: <08364CCB-07F5-423E-8CE0-ABF0195C4CA2@mac.com> (raw)
In-Reply-To: <CA+hUKG+yGQDPdwcH5euDb_pE7OcnbrvGDLoOi2JMaCwj4G+ttg@mail.gmail.com>
References: <E1izCmM-0005pV-Co@gemulon.postgresql.org>
	<20200220072435.GM2288@paquier.xyz>
	<CA+hUKG+yGQDPdwcH5euDb_pE7OcnbrvGDLoOi2JMaCwj4G+ttg@mail.gmail.com>



> Le 20 févr. 2020 à 12:15, Thomas Munro <thomas.munro@gmail.com> a écrit :
> 
> On Thu, Feb 20, 2020 at 8:24 PM Michael Paquier <michael@paquier.xyz> wrote:
>> On Wed, Feb 05, 2020 at 04:59:10AM +0000, Thomas Munro wrote:
>>> Add kqueue(2) support to the WaitEventSet API.
>>> 
>>> Use kevent(2) to wait for events on the BSD family of operating
>>> systems and macOS.  This is similar to the epoll(2) support added
>>> for Linux by commit 98a64d0bd.
>> 
>> Worth noting this issue with the test suite of postgres_fdw for
>> buildfarm animal coypu, running on NetBSD:
>> https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=coypu&dt=2020-02-19%2023%3A01%3A01
>> +ERROR:  kqueue failed: Too many open files
> 
> Hmm.  So coypu just came back after 48 days, and the new kqueue() code
> fails for process 19829 after successfully running 265 log lines'
> worth of  postgres_fdw tests, because it's run out of file
> descriptors.  I can see that WaitLatchOrSocket() actually could leak
> an epoll/kqueue socket if WaitEventSetWait() raises an error, which is
> interesting, but apparently not the explanation here because we don't
> see a preceding error report.  Another theory would be that this
> machine has a low max_safe_fds, and NUM_RESERVED_FDS is only just
> enough to handle the various sockets that postgres_fdw.sql creates and
> at some point kqueue()'s demand for just one more pushed it over the
> edge.  From the error text and a look at the man page for errno, this
> error is EMFILE (per process limit, which could be as low as 64)
> rather then ENFILE (system limit).
> 
> Remi, any chance you could run gmake installcheck under
> contrib/postgres_fdw on that host, to see if this is repeatable?  Can
> you tell us about the relevant limits?  Maybe ulimit -n (for the user
> that runs the build farm), and also sysctl -a | grep descriptors,
> sysctl -a | grep maxfiles?


Hi,

Unfortunalty, coypu went offline again. I will run tests as soon as I can bring it back up.

Rémi




view thread (36+ messages)  latest in thread

Message-ID: <08364CCB-07F5-423E-8CE0-ABF0195C4CA2@mac.com>
Permalink:  ../08364CCB-07F5-423E-8CE0-ABF0195C4CA2@mac.com/
Also on:    postgresql.org/message-id/08364CCB-07F5-423E-8CE0-ABF0195C4CA2@mac.com

 · 

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: remi_zara@mac.com, thomas.munro@gmail.com, michael@paquier.xyz, tmunro@postgresql.org, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Add kqueue(2) support to the WaitEventSet API.
  In-Reply-To: <08364CCB-07F5-423E-8CE0-ABF0195C4CA2@mac.com>

* 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