KERNEL_ASSERT_LOCKED with unlocked sendmsg and sendto + udp6
with the patch that unlocks sendmsg and sendto, I get the following
KERNEL_ASSERT_LOCKED (transcribed from a photo of the screen) when I
panic: kernel diagnostic assertion "_kernel_lock_held()" failed: file "/usr/src/sys/net/if.c", line 1382
Stopped at db_enter+0x12: popq %r11
[PS output omitted, avahi_daemon is the active process on the CPU where the assertion hit]
[I've also omitted panic() from the traceback and replaced pointer parameters with XYZ and the like]
ifa_ifwithaddr(ABC,0) at ifa_ifwithaddr+0xed
in6_pcbselsrc(DEF,GHI,16) at in6_pcbselsrc+0x180
udp6_output(JKL,22d1,0,0) at udp6_output+0x293
sosend(MNO,PQR,STU,107,e,VWX) at sosend+0x351
sendit(YZA,BCD,EFG,HIJ,JKL) at sendit+0x3fb
sys_sendmsg(MNO,1c0,PQR) at sys_sendmsg+0x15a
syscall(STU) at syscall+0x32a
Xsyscall_untramp(6,0,0,0,0,1c) at Xsyscall_untramp+0xe4
end of kernel
If I revert the changes to syscall.master that marked sys_sendmsg and
sys_sendto as SY_NOLOCK, obviously the assertion doesn't get hit.
avahi_daemon is the only program I've seen this with. Chrome and a bunch
of others seem fine, including things that use the libc DNS resolver
(I've configured an unbound listening on ::1 as my DNS in
/etc/resolv.conf, which causes UDP traffic over IPv6 as well).
I'll upload the screen photo tomorrow, but I think I've transcribed the
relevant information from the stack trace that DDB showed.
Re: KERNEL_ASSERT_LOCKED with unlocked sendmsg and sendto + udp6
On 21/06/18(Thu) 00:17, Gregor Best wrote:
> with the patch that unlocks sendmsg and sendto, I get the following
> KERNEL_ASSERT_LOCKED (transcribed from a photo of the screen) when I
> start avahi_daemon:
Thanks for the report, the fix was already present in my next diff. It
has been committed now.