panic: kernel diagnostic assertion "nlevel >= IPL_NONE" failed: file "/syzkaller/managers/main/kernel/sys/arch/amd64/amd64/intr.c", line 775 Stopped at db_enter+0x25: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *379558 71517 0 0 0x4000000 0 syz-executor db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff830b8d37) at panic+0x1cf sys/kern/subr_prf.c:198 __assert(ffffffff8306c8b0,ffffffff8306988e,307,ffffffff83024202) at __assert+0x29 splraise(deafbead) at splraise+0xad sys/arch/amd64/amd64/intr.c:775 mtx_enter(ffff80000138d808) at mtx_enter+0x9e sys/kern/kern_lock.c:308 klist_mutex_lock(ffff80000138d808) at klist_mutex_lock+0x32 sys/kern/kern_event.c:2352 klist_invalidate(ffff80000138d8a8) at klist_invalidate+0xe6 klist_lock sys/kern/kern_event.c:2317 [inline] klist_invalidate(ffff80000138d8a8) at klist_invalidate+0xe6 sys/kern/kern_event.c:2283 bpfsdetach(ffff8000012a5f80) at bpfsdetach+0xff sys/net/bpf.c:1800 bpfdetach(ffff80000127e800) at bpfdetach+0x76 if_detach(ffff80000127e800) at if_detach+0x14f sys/net/if.c:1193 tun_clone_destroy(ffff80000127e800) at tun_clone_destroy+0x2aa sys/net/if_tun.c:338 if_clone_destroy(ffff8000376157d0) at if_clone_destroy+0x1d7 sys/net/if.c:1382 sys_ioctl(ffff800037618530,ffff8000376159b0,ffff800037615900) at sys_ioctl+0x678 syscall(ffff8000376159b0) at syscall+0x97e sys/arch/amd64/amd64/trap.c:577 end trace frame: 0xffff800037615a30, count: 0 https://www.openbsd.org/ddb.html describes the minimum info required in bug reports. Insufficient info makes it difficult to find and fix bugs. ddb> ddb> set $lines = 0 ddb> set $maxwidth = 0 ddb> show panic *cpu0: kernel diagnostic assertion "nlevel >= IPL_NONE" failed: file "/syzkaller/managers/main/kernel/sys/arch/amd64/amd64/intr.c", line 775 ddb> trace db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff830b8d37) at panic+0x1cf sys/kern/subr_prf.c:198 __assert(ffffffff8306c8b0,ffffffff8306988e,307,ffffffff83024202) at __assert+0x29 splraise(deafbead) at splraise+0xad sys/arch/amd64/amd64/intr.c:775 mtx_enter(ffff80000138d808) at mtx_enter+0x9e sys/kern/kern_lock.c:308 klist_mutex_lock(ffff80000138d808) at klist_mutex_lock+0x32 sys/kern/kern_event.c:2352 klist_invalidate(ffff80000138d8a8) at klist_invalidate+0xe6 klist_lock sys/kern/kern_event.c:2317 [inline] klist_invalidate(ffff80000138d8a8) at klist_invalidate+0xe6 sys/kern/kern_event.c:2283 bpfsdetach(ffff8000012a5f80) at bpfsdetach+0xff sys/net/bpf.c:1800 bpfdetach(ffff80000127e800) at bpfdetach+0x76 if_detach(ffff80000127e800) at if_detach+0x14f sys/net/if.c:1193 tun_clone_destroy(ffff80000127e800) at tun_clone_destroy+0x2aa sys/net/if_tun.c:338 if_clone_destroy(ffff8000376157d0) at if_clone_destroy+0x1d7 sys/net/if.c:1382 sys_ioctl(ffff800037618530,ffff8000376159b0,ffff800037615900) at sys_ioctl+0x678 syscall(ffff8000376159b0) at syscall+0x97e sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x1682705d4d0, count: -15 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff800037615470 rbx 0xffffffff8349d790 cdevsw+0x730 rdx 0 rcx 0 rax 0xffff800037618530 r8 0 r9 0x8080808080808080 r10 0xb98762f6528ed0e r11 0x7c9dbbf383e751c4 r12 0 r13 0xffff80000138d8a8 r14 0 r15 0x1 rip 0xffffffff818ba065 db_enter+0x25 cs 0x8 rflags 0x246 rsp 0xffff800037615460 ss 0x10 db_enter+0x25: addq $0x8,%rsp ddb> show proc PROC (syz-executor) tid=379558 pid=71517 tcnt=4 stat=onproc flags process=0 proc=4000000 runpri=32, usrpri=50, slppri=32, nice=20 wchan=0x0, wmesg=, ps_single=0x0 scnt=0 ecnt=0 forw=0xffffffffffffffff, list=0xffff800037619bf8,0xffff800037619470 process=0xffff8000ffff6258 user=0xffff800037610000, vmspace=0xfffffd806c2106f0 estcpu=36, cpticks=1, pctcpu=0.0, user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 10324 207170 65717 0 2 0 syz-executor 10324 230656 65717 0 3 0x4000080 fsleep syz-executor 89685 194328 58033 0 2 0 syz-executor 89685 521536 58033 0 3 0x4000080 fsleep syz-executor 10440 179981 87894 0 2 0 syz-executor 10440 355066 87894 0 2 0x4000000 syz-executor 33957 240817 67154 0 2 0 syz-executor 33957 93028 67154 0 3 0x4000080 fsleep syz-executor 39619 265670 22600 -1 2 0x10 syz-executor 39619 149522 22600 -1 3 0x4000090 pipewr syz-executor 71517 12394 40508 0 3 0 vmmaplk syz-executor *71517 379558 40508 0 7 0x4000000 syz-executor 71517 243103 40508 0 3 0x4000080 bell syz-executor 71517 419263 40508 0 2 0x4000000 syz-executor 57841 34654 0 0 3 0x14200 acct acct 82156 502734 1 0 3 0x80 nanoslp init 87894 449347 29156 0 2 0x482 syz-executor 96542 247610 0 0 3 0x14200 bored sosplice 40508 190766 29156 0 3 0x82 nanoslp syz-executor 58033 303229 29156 0 2 0x482 syz-executor 22600 300508 29156 0 3 0x82 nanoslp syz-executor 65717 30749 29156 0 3 0x82 nanoslp syz-executor 85994 153349 29156 0 3 0x82 nanoslp syz-executor 54260 234683 29156 0 3 0x82 wait syz-executor 67154 414082 29156 0 2 0x482 syz-executor 29156 275790 66918 0 3 0x82 kqread syz-executor 66918 473170 33062 0 3 0x10008a sigsusp ksh 33062 371843 99568 0 3 0x98 kqread sshd-session 99568 461231 16194 0 3 0x92 kqread sshd-session 16194 350149 1 0 3 0x88 kqread sshd 16022 21236 10590 73 3 0x1100090 kqread syslogd 10590 451272 1 0 3 0x100082 sbwait syslogd 67166 315313 1 0 3 0x100080 kqread resolvd 2740 365877 6763 77 3 0x100092 kqread dhcpleased 65799 290870 6763 77 3 0x100092 kqread dhcpleased 6763 38547 1 0 3 0x80 kqread dhcpleased 66602 158629 0 0 3 0x14200 bored smr 96010 274239 0 0 2 0x14200 zerothread 44643 472420 0 0 3 0x14200 aiodoned aiodoned 94478 245284 0 0 3 0x14200 syncer update 45353 129654 0 0 3 0x14200 cleaner cleaner 74607 390629 0 0 2 0x14200 reaper 64472 449119 0 0 3 0x14200 pgdaemon pagedaemon 29459 440695 0 0 3 0x14200 bored viomb 6506 35489 0 0 3 0x40014200 acpi0 acpi0 38234 470976 0 0 3 0x14200 bored softnet3 35019 341094 0 0 3 0x14200 bored softnet2 23342 32795 0 0 3 0x14200 bored softnet1 99412 71574 0 0 3 0x14200 bored softnet0 95346 166088 0 0 3 0x14200 bored systqmp 56073 189432 0 0 3 0x14200 bored systq 3741 498213 0 0 2 0x40014200 softclock 52137 219382 0 0 3 0x40014200 idle0 1 377557 0 0 3 0x80082 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb> show all locks No such command ddb> show malloc Type InUse MemUse HighUse Limit Requests Type Lim devbuf 10208 11199K 11659K 166960K 13942 0 pcb 17 17K 18K 166960K 302 0 rtable 188 7K 7K 166960K 681 0 pf 29 12K 13K 166960K 80 0 ifaddr 35 6K 7K 166960K 79 0 ifgroup 46 2K 2K 166960K 121 0 sysctl 3 0K 0K 166960K 7 0 counters 29 17K 17K 166960K 48 0 ioctlops 0 0K 4K 166960K 205 0 iov 0 0K 28K 166960K 262 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1460 92K 92K 166960K 2736 0 UFS quota 1 32K 32K 166960K 1 0 UFS mount 5 36K 36K 166960K 5 0 shm 2 1K 9K 166960K 32 0 VM map 2 1K 1K 166960K 2 0 sem 24 16K 17K 166960K 126 0 dirhash 12 2K 2K 166960K 39 0 ACPI 1690 195K 286K 166960K 12468 0 file desc 17 61K 97K 166960K 1674 0 sigio 0 0K 0K 166960K 39 0 proc 51 50K 124K 166960K 700 0 subproc 104 6K 6K 166960K 119 0 NFS srvsock 1 0K 0K 166960K 1 0 NFS daemon 1 16K 16K 166960K 1 0 ip_moptions 2 0K 0K 166960K 379 0 in_multi 80 6K 7K 166960K 222 0 ether_multi 1 0K 0K 166960K 33 0 mrt 1 0K 0K 166960K 8 0 ISOFS mount 1 32K 32K 166960K 1 0 MSDOSFS mount 1 16K 16K 166960K 1 0 ttys 223 996K 996K 166960K 223 0 exec 0 0K 1K 166960K 615 0 fusefs mount 1 32K 32K 166960K 1 0 tdb 3 0K 0K 166960K 3 0 VM swap 8 62K 64K 166960K 10 0 UVM amap 230 72K 88K 166960K 16856 0 UVM aobj 75 7K 7K 166960K 78 0 pinsyscall 37 74K 98K 166960K 2732 0 memdesc 1 4K 4K 166960K 1 0 crypto data 1 1K 1K 166960K 1 0 ip6_options 0 0K 0K 166960K 84 0 NDP 10 0K 2K 166960K 53 0 temp 76 6816K 6895K 166960K 67008 0 kqueue 13 20K 28K 166960K 269 0 SYN cache 2 16K 16K 166960K 2 0 ddb> show all pools Name Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle rtpcb 120 218 0 215 2 0 2 2 0 8 1 rtentry 112 201 0 117 4 0 4 4 0 8 0 unpcb 144 1672 0 1656 11 8 3 6 0 8 2 syncache 336 3 0 3 1 1 0 1 0 8 0 tcpcb 808 703 0 699 19 12 7 7 0 8 6 arp 88 40 0 27 1 0 1 1 0 8 0 ipq 40 8 0 4 1 0 1 1 0 8 0 ipqe 40 14 0 10 1 0 1 1 0 8 0 inpcb 336 2665 0 2655 24 17 7 12 0 8 6 nd6 104 36 0 12 1 0 1 1 0 8 0 pkpcb 40 5 0 5 3 2 1 1 0 8 1 kcovpl 48 9 0 1 1 0 1 1 0 8 0 ppxss 1072 7 0 7 2 1 1 1 0 8 1 art_heap8 4096 4 0 0 4 0 4 4 0 8 0 art_heap4 256 659 0 289 29 2 27 29 0 8 0 art_table 32 663 0 289 4 0 4 4 0 8 0 art_node 16 194 0 121 1 0 1 1 0 8 0 sysvmsgpl 40 6 0 3 2 1 1 1 0 8 0 semapl 112 120 0 98 1 0 1 1 0 8 0 shmpl 112 75 0 3 3 0 3 3 0 8 0 dirhash 1024 35 0 18 3 0 3 3 0 8 0 dino2pl 256 4424 0 2939 95 1 94 95 0 8 0 ffsino 240 4424 0 2939 89 0 89 89 0 8 0 nchpl 144 6901 0 5222 63 0 63 63 0 8 0 uvmvnodes 80 5357 0 0 110 0 110 110 0 8 0 vnodes 216 5357 0 0 298 0 298 298 0 8 0 namei 1024 23992 0 23992 2 1 1 2 0 8 1 kstatmem 264 58 0 38 2 0 2 2 0 8 0 acpiwqpl 32 1 0 1 1 0 1 1 1 8 1 scsiplug 72 5 0 5 2 2 0 1 0 8 0 scxspl 216 19420 0 19420 10 8 2 8 1 8 2 plimitpl 152 338 0 323 1 0 1 1 0 8 0 sigapl 424 1978 0 1930 8 0 8 8 0 8 1 futexpl 64 24525 0 24522 1 0 1 1 0 8 0 knotepl 120 69944 0 69897 30 19 11 18 0 8 8 kqueuepl 184 398 0 389 1 0 1 1 0 8 0 pipepl 288 354 0 326 11 6 5 7 0 8 2 fdescpl 432 1939 0 1910 5 1 4 5 0 8 0 filepl 120 14359 0 14111 19 7 12 15 0 8 2 lockfpl 104 441 0 439 1 0 1 1 0 8 0 lockfspl 48 178 0 176 1 0 1 1 0 8 0 sessionpl 144 24 0 17 1 0 1 1 0 8 0 pgrppl 48 60 0 45 1 0 1 1 0 8 0 ucredpl 104 2314 0 2302 1 0 1 1 0 8 0 zombiepl 144 2145 0 2143 2 1 1 1 0 8 0 processpl 1096 1978 0 1930 5 0 5 5 0 8 0 procpl 648 4300 0 4244 10 2 8 8 0 8 2 sosppl 168 8 0 8 2 1 1 1 0 8 1 sockpl 504 4690 0 4661 66 53 13 26 0 8 9 mcl64k 65536 20 0 20 2 1 1 1 0 8 1 mcl16k 16384 12 0 12 2 2 0 1 0 8 0 mcl12k 12288 1 0 1 1 1 0 1 0 8 0 mcl9k 9216 3 0 3 1 1 0 1 0 8 0 mcl8k 8192 24 0 24 3 2 1 1 0 8 1 mcl4k 4096 4720 0 4670 17 9 8 15 0 8 1 mcl2k 2048 1864 0 1864 7 5 2 3 0 8 2 mtagpl 96 79 0 56 2 0 2 2 0 8 0 mbufpl 256 21709 0 21563 22 5 17 19 0 8 1 bufpl 280 5314 0 108 372 0 372 372 0 8 0 anonpl 24 312234 0 308752 66 33 33 58 0 187 7 amapchunkpl 152 57197 0 56671 54 22 32 33 0 158 10 amappl16 200 7512 0 7476 29 26 3 15 0 8 0 amappl15 192 5 0 5 1 1 0 1 0 8 0 amappl14 184 120 0 111 1 0 1 1 0 8 0 amappl13 176 17 0 17 1 1 0 1 0 8 0 amappl12 168 2570 0 2541 3 1 2 3 0 8 0 amappl11 160 46 0 36 1 0 1 1 0 8 0 amappl10 152 13 0 13 1 1 0 1 0 8 0 amappl9 144 136 0 136 1 1 0 1 0 8 0 amappl8 136 26 0 24 1 0 1 1 0 8 0 amappl7 128 107 0 96 1 0 1 1 0 8 0 amappl6 120 174 0 172 1 0 1 1 0 8 0 amappl5 112 136 0 127 1 0 1 1 0 8 0 amappl4 104 294 0 279 1 0 1 1 0 8 0 amappl3 96 10371 0 10274 3 0 3 3 0 8 0 amappl2 88 2219 0 2141 2 0 2 2 0 8 0 amappl1 80 12021 0 11529 14 2 12 14 0 8 0 amappl 88 16301 0 16121 5 0 5 5 0 92 0 dma32768 32768 1 0 1 1 1 0 1 0 8 0 dma16384 16384 3 0 3 2 2 0 1 0 8 0 dma4096 4096 1 0 1 1 1 0 1 0 8 0 dma1024 1024 1 0 0 1 0 1 1 0 8 0 dma256 256 6 0 6 1 1 0 1 0 8 0 dma128 128 255 0 255 2 2 0 1 0 8 0 dma64 64 9 0 9 3 2 1 1 0 8 1 dma32 32 9 0 9 2 1 1 1 0 8 1 dma16 16 18 0 17 1 0 1 1 0 8 0 aobjpl 72 77 0 3 2 0 2 2 0 8 0 uaddrrnd 24 1939 0 1909 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 1939 0 1909 1 0 1 1 0 8 0 vmmpekpl 168 15082 0 15034 3 0 3 3 0 8 0 vmmpepl 168 121823 0 120057 94 15 79 90 0 357 1 vmsppl 352 1938 0 1909 4 1 3 4 0 8 0 rwobjpl 24 38541 0 32281 38 0 38 38 0 8 0 pdppl 4096 3884 0 3818 118 52 66 82 0 8 0 pvpl 32 815194 0 806317 145 53 92 133 0 265 11 pmappl 216 1938 0 1909 3 0 3 3 0 8 0 extentpl 40 55 0 38 1 0 1 1 0 8 0 phpool 112 520 0 174 11 0 11 11 0 8 0 ddb> machine ddbcpu 0 No such command ddb> trace db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff830b8d37) at panic+0x1cf sys/kern/subr_prf.c:198 __assert(ffffffff8306c8b0,ffffffff8306988e,307,ffffffff83024202) at __assert+0x29 splraise(deafbead) at splraise+0xad sys/arch/amd64/amd64/intr.c:775 mtx_enter(ffff80000138d808) at mtx_enter+0x9e sys/kern/kern_lock.c:308 klist_mutex_lock(ffff80000138d808) at klist_mutex_lock+0x32 sys/kern/kern_event.c:2352 klist_invalidate(ffff80000138d8a8) at klist_invalidate+0xe6 klist_lock sys/kern/kern_event.c:2317 [inline] klist_invalidate(ffff80000138d8a8) at klist_invalidate+0xe6 sys/kern/kern_event.c:2283 bpfsdetach(ffff8000012a5f80) at bpfsdetach+0xff sys/net/bpf.c:1800 bpfdetach(ffff80000127e800) at bpfdetach+0x76 if_detach(ffff80000127e800) at if_detach+0x14f sys/net/if.c:1193 tun_clone_destroy(ffff80000127e800) at tun_clone_destroy+0x2aa sys/net/if_tun.c:338 if_clone_destroy(ffff8000376157d0) at if_clone_destroy+0x1d7 sys/net/if.c:1382 sys_ioctl(ffff800037618530,ffff8000376159b0,ffff800037615900) at sys_ioctl+0x678 syscall(ffff8000376159b0) at syscall+0x97e sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x1682705d4d0, count: -15 ddb> machine ddbcpu 1 No such command ddb> trace db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff830b8d37) at panic+0x1cf sys/kern/subr_prf.c:198 __assert(ffffffff8306c8b0,ffffffff8306988e,307,ffffffff83024202) at __assert+0x29 splraise(deafbead) at splraise+0xad sys/arch/amd64/amd64/intr.c:775 mtx_enter(ffff80000138d808) at mtx_enter+0x9e sys/kern/kern_lock.c:308 klist_mutex_lock(ffff80000138d808) at klist_mutex_lock+0x32 sys/kern/kern_event.c:2352 klist_invalidate(ffff80000138d8a8) at klist_invalidate+0xe6 klist_lock sys/kern/kern_event.c:2317 [inline] klist_invalidate(ffff80000138d8a8) at klist_invalidate+0xe6 sys/kern/kern_event.c:2283 bpfsdetach(ffff8000012a5f80) at bpfsdetach+0xff sys/net/bpf.c:1800 bpfdetach(ffff80000127e800) at bpfdetach+0x76 if_detach(ffff80000127e800) at if_detach+0x14f sys/net/if.c:1193 tun_clone_destroy(ffff80000127e800) at tun_clone_destroy+0x2aa sys/net/if_tun.c:338 if_clone_destroy(ffff8000376157d0) at if_clone_destroy+0x1d7 sys/net/if.c:1382 sys_ioctl(ffff800037618530,ffff8000376159b0,ffff800037615900) at sys_ioctl+0x678 syscall(ffff8000376159b0) at syscall+0x97e sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x1682705d4d0, count: -15