Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 1 Apr 2023 02:43:00 +0300
From:      Konstantin Belousov <kostikbel@gmail.com>
To:        Ed Maste <emaste@freebsd.org>
Cc:        Charlie Li <vishwin@freebsd.org>, src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org, "freebsd-x11@freebsd.org" <freebsd-x11@freebsd.org>, FreeBSD Current <freebsd-current@freebsd.org>
Subject:   Re: git: 61194e9852e6 - main - Add kqueue1() syscall
Message-ID:  <ZCdwBG35yyCrmWoa@kib.kiev.ua>
In-Reply-To: <CAPyFy2DduRpyW48qDjwnsnUCQU6d7NQJo--gM2sNSoggFxBg5A@mail.gmail.com>
References:  <202303272339.32RNdWPD063667@gitrepo.freebsd.org> <f8a4e926-bec7-a437-0f67-3550ca264b86@freebsd.org> <CAPyFy2DduRpyW48qDjwnsnUCQU6d7NQJo--gM2sNSoggFxBg5A@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Mar 31, 2023 at 01:27:54PM -0400, Ed Maste wrote:
> On Fri, 31 Mar 2023 at 12:38, Charlie Li <vishwin@freebsd.org> wrote:
> >
> > Konstantin Belousov wrote:
> > > The branch main has been updated by kib:
> > >
> > > URL: https://cgit.FreeBSD.org/src/commit/?id=61194e9852e641d1533cd04a5679d6042ff975d3
> > >
> > > commit 61194e9852e641d1533cd04a5679d6042ff975d3
> > > Author:     Konstantin Belousov <kib@FreeBSD.org>
> > > AuthorDate: 2023-03-25 23:39:02 +0000
> > > Commit:     Konstantin Belousov <kib@FreeBSD.org>
> > > CommitDate: 2023-03-27 23:39:26 +0000
> > >
> > >      Add kqueue1() syscall
> > >
> > >      It takes the flags argument.  Immediate use is to provide the KQUEUE_CLOEXEC
> > >      flag for kqueue(2).
> > >
> > This commit series causes x11/libinput to hit an assert (which also
> > silently crashes X on launch):
> > > Assertion failed: (libinput->refcount > 0), function libinput_unref, file ../src/libinput.c, line 1957.
> >
> > devel/libepoll-shim, x11/libinput's prime dependency, has its own
> > kqueue1() implementation, which is used when the system does not already
> > have one. Reverting this series and rebuilding devel/libepoll-shim to
> > use its included implementation allows x11/libinput to work again.
> 
> Ah, NetBSD added kqueue1 some time ago, and it uses the already
> existing flags (O_CLOEXEC etc.)
> If it's easy to test, can you try changing libepoll-shim to call
> kqueue1(KQUEUE_CLOEXEC)?
Overloading open(2) flags this way is not wise IMO.  Not to mention that
a lot of them do not make sense in kqueue(2) context, and that we might want
to add other flags which would put even more pressure on the limited O_*
bit set.

Please see https://reviews.freebsd.org/D39377
for my attempt to somewhat mitigate the mess.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?ZCdwBG35yyCrmWoa>