[Bug 293382] Dead lock and kernel crash around closefp_impl

From: <bugzilla-noreply_at_freebsd.org>
Date: Mon, 30 Mar 2026 13:16:41 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=293382

--- Comment #31 from Konstantin Belousov <kib@FreeBSD.org> ---
(In reply to Paul from comment #30)
By 'trusting the debug info' I mean that backtraces are known to have issues
with calculating the correct values for the function's arguments and locals.
The matter improved recently with more correct debuginfo in clang, but it is
still sometimes wrong.  So the fd value for close from the backtrace is
hopefully
right, which is the basis for my theory, but it is not guaranteed.

WRT the multiple of the page size distance between two fds, I am not sure if
this is of any significance.  For fd-based knotes, in your case, read filter
on socket, no hashing is done.  The kqueues allocates a large array of
single-linked
list heads, one for each fd index. If fd table is expanded and a knote is
allocated
for fd that is larger than the kqueue array of heads, the array is reallocated.
This is done under the kq lock,  so hopefully is not an issue.

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