[Bug 294014] kevent doesn't notify when UNIX socket is closed

From: <bugzilla-noreply_at_freebsd.org>
Date: Tue, 24 Mar 2026 07:16:05 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=294014

            Bug ID: 294014
           Summary: kevent doesn't notify when UNIX socket is closed
           Product: Base System
           Version: 15.0-RELEASE
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: kern
          Assignee: bugs@FreeBSD.org
          Reporter: nicolas-freebsd-8252@vertaco.eu
 Attachment #269066 text/plain
         mime type:

Created attachment 269066
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=269066&action=edit
The source code to reproduce the bug

We noticed a different behavior of kevent between the version 15.0 and 14.3
which looks like a bug in 15.0

You can find attached an example of code to reproduce the behavior.

The issue is a missing kevent notification when the remote side of an unix
socket is closed. This occurs under the following context:
- a write has been made on the local side of the socket to fill the write
buffer before the remote side is closed.
- another kevent call is made before closing the socket, unrelated to the
socket operations. In my example, we create an EVFILT_TIMER and wait for it.


I tried to git bisect but it's taking too much time and I failed to completely
automate it. However, so far so I saw the issue in base
d17bfb237065587c72db05a5bafc6bcab1206cb9 while base
712806fc4b5470eb7d9ce537e3cdf3b386455d86 works fine.

Is it a real bug, or did I forgot something in my code to be notified on closed
connection ?

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