Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 06 Sep 2021 11:20:31 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 258310] kevent() does not see signal with zero timeout
Message-ID:  <bug-258310-227-dJ6byTqe7r@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-258310-227@https.bugs.freebsd.org/bugzilla/>
References:  <bug-258310-227@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D258310

Konstantin Belousov <kib@FreeBSD.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |kib@FreeBSD.org

--- Comment #1 from Konstantin Belousov <kib@FreeBSD.org> ---
So the problem is actually not that kevent does not get signal notification=
.=20
It
is that kqueue attached to kqueue with the signal event suddenly reports no
events when you specify zero timeout, i.e. non-blocking peek.  Am I right?

This is because kqueue subsystem has to fight with the recursion and deadlo=
ck.
If kqueue has another kqueue attached to it, then notification of the attac=
hed
kqueue is delegated to a task.  See knote_enqueue()->kqueue_wakeup()->
kqueue_schedtask().  Until task run, kq->kq_count =3D=3D 0 and this together
with timespec being 0 (AKA unset) causes kqueue_scan() to immediately retur=
n 0.

I am not sure if this is worth complications to make the wakeup synchronous.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



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