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 *338247 86956 0 0 0x4000000 0 syz-executor db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff830b2f32) at panic+0x1cf sys/kern/subr_prf.c:198 __assert(ffffffff8306bac3,ffffffff83069e0c,307,ffffffff83024baf) at __assert+0x29 splraise(deaf4152) at splraise+0xad sys/arch/amd64/amd64/intr.c:775 mtx_enter(ffff8000012dfc08) at mtx_enter+0x9e sys/kern/kern_lock.c:308 klist_mutex_lock(ffff8000012dfc08) at klist_mutex_lock+0x32 sys/kern/kern_event.c:2352 klist_invalidate(ffff8000012dfca8) at klist_invalidate+0xe6 klist_lock sys/kern/kern_event.c:2317 [inline] klist_invalidate(ffff8000012dfca8) at klist_invalidate+0xe6 sys/kern/kern_event.c:2283 bpfsdetach(ffff80000129db80) at bpfsdetach+0xff sys/net/bpf.c:1800 bpfdetach(ffff800001296000) at bpfdetach+0x76 if_detach(ffff800001296000) at if_detach+0x14f sys/net/if.c:1193 tun_clone_destroy(ffff800001296000) at tun_clone_destroy+0x2aa sys/net/if_tun.c:338 if_clone_destroy(ffff80003761d2f0) at if_clone_destroy+0x1d7 sys/net/if.c:1382 sys_ioctl(ffff800037613700,ffff80003761d4d0,ffff80003761d420) at sys_ioctl+0x678 syscall(ffff80003761d4d0) at syscall+0x97e sys/arch/amd64/amd64/trap.c:577 end trace frame: 0xffff80003761d550, 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(ffffffff830b2f32) at panic+0x1cf sys/kern/subr_prf.c:198 __assert(ffffffff8306bac3,ffffffff83069e0c,307,ffffffff83024baf) at __assert+0x29 splraise(deaf4152) at splraise+0xad sys/arch/amd64/amd64/intr.c:775 mtx_enter(ffff8000012dfc08) at mtx_enter+0x9e sys/kern/kern_lock.c:308 klist_mutex_lock(ffff8000012dfc08) at klist_mutex_lock+0x32 sys/kern/kern_event.c:2352 klist_invalidate(ffff8000012dfca8) at klist_invalidate+0xe6 klist_lock sys/kern/kern_event.c:2317 [inline] klist_invalidate(ffff8000012dfca8) at klist_invalidate+0xe6 sys/kern/kern_event.c:2283 bpfsdetach(ffff80000129db80) at bpfsdetach+0xff sys/net/bpf.c:1800 bpfdetach(ffff800001296000) at bpfdetach+0x76 if_detach(ffff800001296000) at if_detach+0x14f sys/net/if.c:1193 tun_clone_destroy(ffff800001296000) at tun_clone_destroy+0x2aa sys/net/if_tun.c:338 if_clone_destroy(ffff80003761d2f0) at if_clone_destroy+0x1d7 sys/net/if.c:1382 sys_ioctl(ffff800037613700,ffff80003761d4d0,ffff80003761d420) at sys_ioctl+0x678 syscall(ffff80003761d4d0) at syscall+0x97e sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x13d279e3b60, count: -15 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff80003761cf90 rbx 0xffffffff8348dc80 cdevsw+0x730 rdx 0xffff800001279440 rcx 0 rax 0xffff800037613700 r8 0x101010101010101 r9 0x8080808080808080 r10 0xb42d591c29818306 r11 0x47605c0ae6622581 r12 0 r13 0xffff8000012dfca8 r14 0 r15 0x1 rip 0xffffffff813195b5 db_enter+0x25 cs 0x8 rflags 0x246 rsp 0xffff80003761cf80 ss 0x10 db_enter+0x25: addq $0x8,%rsp ddb> show proc PROC (syz-executor) tid=338247 pid=86956 tcnt=4 stat=onproc flags process=0 proc=4000000 runpri=32, usrpri=77, slppri=32, nice=20 wchan=0x0, wmesg=, ps_single=0x0 scnt=0 ecnt=0 forw=0xffffffffffffffff, list=0xffff80002a5b4a38,0xffff800037612f78 process=0xffff8000ffff5580 user=0xffff800037618000, vmspace=0xfffffd806c24f978 estcpu=27, cpticks=1, pctcpu=0.0, user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 80874 350063 25550 0 2 0 syz-executor 80874 363502 25550 0 3 0x4000001 inode syz-executor 80874 277605 25550 0 3 0x4000001 inode syz-executor 47359 163460 9777 0 3 0x1 inode syz-executor 47359 472882 9777 0 3 0x4000001 inode syz-executor 95968 136689 36322 0 3 0x1 inode syz-executor 95968 283931 36322 0 3 0x4000001 inode syz-executor 57978 215063 37457 0 3 0x1 inode syz-executor 57978 48197 37457 0 3 0x4000080 fsleep syz-executor 97712 99118 77170 0 3 0x1 inode syz-executor 97712 61151 77170 0 3 0x4000080 fsleep syz-executor 86956 506469 18079 0 2 0x1 syz-executor *86956 338247 18079 0 7 0x4000000 syz-executor 86956 374932 18079 0 3 0x4000080 fsleep syz-executor 86956 459753 18079 0 3 0x4000080 fsleep syz-executor 75733 395947 30011 0 2 0x1 syz-executor 75733 498458 30011 0 3 0x4000080 fsleep syz-executor 6281 470748 0 0 3 0x14200 bored sosplice 334 102862 1 0 3 0x80 nanoslp init 30011 313379 61060 0 3 0x3 inode syz-executor 77170 488416 61060 0 3 0x3 inode syz-executor 18079 176746 61060 0 3 0x82 nanoslp syz-executor 25550 11422 61060 0 3 0x3 inode syz-executor 37457 65850 61060 0 3 0x3 inode syz-executor 9777 415330 61060 0 3 0x3 inode syz-executor 36322 458569 61060 0 3 0x3 inode syz-executor 60333 491732 61060 0 3 0x3 inode syz-executor 61060 346129 14817 0 3 0x82 kqread syz-executor 14817 50359 97784 0 3 0x10008a sigsusp ksh 97784 224475 73096 0 3 0x98 kqread sshd-session 73096 508786 54100 0 3 0x92 kqread sshd-session 54100 22574 1 0 3 0x88 kqread sshd 62259 254163 87929 73 3 0x1100090 kqread syslogd 87929 345931 1 0 3 0x100082 sbwait syslogd 82173 508661 1 0 3 0x100080 kqread resolvd 24577 84341 41906 77 3 0x100092 kqread dhcpleased 63650 319773 41906 77 3 0x100092 kqread dhcpleased 41906 244933 1 0 3 0x80 kqread dhcpleased 92570 218961 0 0 3 0x14200 bored smr 57627 470753 0 0 2 0x14200 zerothread 48865 250440 0 0 3 0x14200 aiodoned aiodoned 13657 119384 0 0 3 0x14200 syncer update 77598 51462 0 0 3 0x14200 cleaner cleaner 3060 148250 0 0 3 0x14200 reaper reaper 68600 379748 0 0 3 0x14200 pgdaemon pagedaemon 71334 289700 0 0 3 0x14200 bored viomb 64678 229207 0 0 3 0x40014200 acpi0 acpi0 61564 130459 0 0 3 0x14200 bored softnet3 98639 1969 0 0 3 0x14200 bored softnet2 94540 478482 0 0 3 0x14200 bored softnet1 43879 59921 0 0 3 0x14200 bored softnet0 27803 379804 0 0 3 0x14200 bored systqmp 22987 88816 0 0 3 0x14200 bored systq 82925 104221 0 0 3 0x40014200 tmoslp softclock 56108 59111 0 0 3 0x40014200 idle0 1 489706 0 0 3 0x82 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 10179 11044K 11383K 166960K 11830 0 pcb 17 16K 18K 166960K 155 0 rtable 201 7K 8K 166960K 395 0 pf 38 14K 15K 166960K 46 0 ifaddr 38 6K 7K 166960K 53 0 ifgroup 54 2K 2K 166960K 62 0 sysctl 2 0K 0K 166960K 2 0 counters 31 17K 17K 166960K 35 0 ioctlops 0 0K 4K 166960K 61 0 iov 0 0K 12K 166960K 26 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1423 89K 90K 166960K 1741 0 UFS quota 1 32K 32K 166960K 1 0 UFS mount 5 36K 36K 166960K 5 0 shm 2 1K 9K 166960K 11 0 VM map 2 1K 1K 166960K 2 0 sem 12 0K 1K 166960K 23 0 dirhash 12 2K 2K 166960K 18 0 ACPI 1690 195K 286K 166960K 12468 0 file desc 18 65K 97K 166960K 508 0 sigio 0 0K 0K 166960K 6 0 proc 52 50K 124K 166960K 536 0 subproc 104 6K 6K 166960K 104 0 NFS srvsock 1 0K 0K 166960K 1 0 NFS daemon 1 16K 16K 166960K 1 0 ip_moptions 0 0K 0K 166960K 48 0 in_multi 80 6K 7K 166960K 117 0 ether_multi 1 0K 0K 166960K 3 0 mrt 0 0K 0K 166960K 1 0 ISOFS mount 1 32K 32K 166960K 1 0 MSDOSFS mount 1 16K 16K 166960K 1 0 ttys 85 387K 387K 166960K 85 0 exec 0 0K 1K 166960K 391 0 tdb 3 0K 0K 166960K 3 0 VM swap 8 62K 64K 166960K 10 0 UVM amap 223 72K 81K 166960K 6123 0 UVM aobj 12 2K 2K 166960K 14 0 pinsyscall 38 76K 104K 166960K 1526 0 memdesc 1 4K 4K 166960K 1 0 crypto data 1 1K 1K 166960K 1 0 ip6_options 0 0K 0K 166960K 22 0 NDP 12 0K 2K 166960K 34 0 temp 66 6810K 6876K 166960K 19653 0 kqueue 14 22K 30K 166960K 81 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 103 0 100 2 1 1 2 0 8 0 rtentry 112 119 0 29 4 0 4 4 0 8 0 unpcb 144 519 0 500 7 3 4 4 0 8 3 syncache 336 3 0 3 1 1 0 1 0 8 0 tcpcb 808 115 0 111 4 2 2 2 0 8 1 arp 88 20 0 3 1 0 1 1 0 8 0 ipq 40 3 0 1 1 0 1 1 0 8 0 ipqe 40 49 0 45 1 0 1 1 0 8 0 inpcb 336 575 0 567 13 11 2 12 0 8 1 nd6 104 27 0 10 1 0 1 1 0 8 0 pkpcb 40 3 0 2 2 1 1 1 0 8 0 kcovpl 48 8 0 0 1 0 1 1 0 8 0 ppxss 1072 4 0 4 2 1 1 1 0 8 1 pfstscr 40 2 0 1 1 0 1 1 0 8 0 pfrktable 1344 1 0 1 1 0 1 1 0 8 1 pftag 88 1 0 1 1 0 1 1 0 8 1 pfstitem 24 6 0 0 1 0 1 1 0 8 0 pfstkey 128 10 0 5 1 0 1 1 0 8 0 pfstate 344 5 0 2 1 0 1 1 0 8 0 pfrule 1344 1 0 1 1 0 1 1 0 8 1 art_heap8 4096 2 0 0 2 0 2 2 0 8 0 art_heap4 256 477 0 99 29 1 28 29 0 8 0 art_table 32 479 0 99 4 0 4 4 0 8 0 art_node 16 118 0 35 1 0 1 1 0 8 0 sysvmsgpl 40 12 0 6 1 0 1 1 0 8 0 semapl 112 19 0 9 1 0 1 1 0 8 0 shmpl 112 11 0 2 1 0 1 1 0 8 0 dirhash 1024 21 0 4 3 0 3 3 0 8 0 dino2pl 256 2276 0 786 95 0 95 95 0 8 0 ffsino 240 2276 0 786 89 0 89 89 0 8 0 nchpl 144 3137 0 1460 63 0 63 63 0 8 0 uvmvnodes 80 2588 0 0 53 0 53 53 0 8 0 vnodes 216 2588 0 0 144 0 144 144 0 8 0 namei 1024 10637 0 10637 5 3 2 2 0 8 2 kstatmem 264 32 0 8 2 0 2 2 0 8 0 scxspl 216 8746 0 8746 10 8 2 8 1 8 2 plimitpl 152 176 0 160 1 0 1 1 0 8 0 sigapl 424 789 0 742 7 1 6 7 0 8 0 futexpl 64 6218 0 6213 1 0 1 1 0 8 0 knotepl 120 20440 0 20391 16 7 9 9 0 8 7 kqueuepl 184 113 0 103 1 0 1 1 0 8 0 pipepl 288 222 0 195 9 6 3 7 0 8 1 fdescpl 432 771 0 741 5 1 4 5 0 8 0 filepl 120 4910 0 4667 17 5 12 14 0 8 3 lockfpl 104 148 0 145 1 0 1 1 0 8 0 lockfspl 48 58 0 55 1 0 1 1 0 8 0 sessionpl 144 22 0 15 1 0 1 1 0 8 0 pgrppl 48 64 0 49 1 0 1 1 0 8 0 ucredpl 104 765 0 754 1 0 1 1 0 8 0 zombiepl 144 849 0 848 1 0 1 1 0 8 0 processpl 1096 789 0 742 4 0 4 4 0 8 0 procpl 648 1437 0 1380 8 2 6 6 0 8 0 sockpl 504 1202 0 1171 36 24 12 21 0 8 7 mcl64k 65536 41 0 41 3 2 1 1 0 8 1 mcl9k 9216 2 0 2 2 1 1 1 0 8 1 mcl8k 8192 9 0 9 2 1 1 1 0 8 1 mcl4k 4096 3562 0 3518 9 2 7 9 0 8 1 mcl2k 2048 701 0 696 3 1 2 2 0 8 0 mtagpl 96 13 0 8 1 0 1 1 0 8 0 mbufpl 256 10486 0 10313 81 64 17 74 0 8 4 bufpl 280 2757 0 98 190 0 190 190 0 8 0 anonpl 24 82052 0 78867 53 23 30 46 0 187 0 amapchunkpl 152 18452 0 17963 36 8 28 28 0 158 9 amappl16 200 859 0 831 20 14 6 15 0 8 3 amappl14 184 98 0 89 1 0 1 1 0 8 0 amappl13 176 17 0 17 1 1 0 1 0 8 0 amappl12 168 1375 0 1345 3 0 3 3 0 8 0 amappl11 160 40 0 30 1 0 1 1 0 8 0 amappl10 152 11 0 11 1 1 0 1 0 8 0 amappl9 144 13 0 13 1 1 0 1 0 8 0 amappl8 136 15 0 14 1 0 1 1 0 8 0 amappl7 128 87 0 78 1 0 1 1 0 8 0 amappl6 120 154 0 153 1 0 1 1 0 8 0 amappl5 112 118 0 108 1 0 1 1 0 8 0 amappl4 104 271 0 257 1 0 1 1 0 8 0 amappl3 96 4268 0 4176 3 0 3 3 0 8 0 amappl2 88 1041 0 964 2 0 2 2 0 8 0 amappl1 80 8296 0 7803 14 3 11 14 0 8 0 amappl 88 5737 0 5566 5 0 5 5 0 92 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 253 0 253 1 1 0 1 0 8 0 dma64 64 7 0 7 1 1 0 1 0 8 0 dma32 32 7 0 7 1 1 0 1 0 8 0 dma16 16 18 0 17 1 0 1 1 0 8 0 aobjpl 72 13 0 2 1 0 1 1 0 8 0 uaddrrnd 24 771 0 741 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 771 0 741 1 0 1 1 0 8 0 vmmpekpl 168 7646 0 7613 3 0 3 3 0 8 0 vmmpepl 168 51447 0 49705 91 11 80 87 0 357 3 vmsppl 344 770 0 741 4 1 3 4 0 8 0 rwobjpl 24 17583 0 14177 23 2 21 21 0 8 0 pdppl 4096 1548 0 1482 104 38 66 82 0 8 0 pvpl 32 293958 0 285351 132 41 91 115 0 265 4 pmappl 216 770 0 741 3 0 3 3 0 8 0 extentpl 40 55 0 38 1 0 1 1 0 8 0 phpool 112 491 0 158 12 0 12 12 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(ffffffff830b2f32) at panic+0x1cf sys/kern/subr_prf.c:198 __assert(ffffffff8306bac3,ffffffff83069e0c,307,ffffffff83024baf) at __assert+0x29 splraise(deaf4152) at splraise+0xad sys/arch/amd64/amd64/intr.c:775 mtx_enter(ffff8000012dfc08) at mtx_enter+0x9e sys/kern/kern_lock.c:308 klist_mutex_lock(ffff8000012dfc08) at klist_mutex_lock+0x32 sys/kern/kern_event.c:2352 klist_invalidate(ffff8000012dfca8) at klist_invalidate+0xe6 klist_lock sys/kern/kern_event.c:2317 [inline] klist_invalidate(ffff8000012dfca8) at klist_invalidate+0xe6 sys/kern/kern_event.c:2283 bpfsdetach(ffff80000129db80) at bpfsdetach+0xff sys/net/bpf.c:1800 bpfdetach(ffff800001296000) at bpfdetach+0x76 if_detach(ffff800001296000) at if_detach+0x14f sys/net/if.c:1193 tun_clone_destroy(ffff800001296000) at tun_clone_destroy+0x2aa sys/net/if_tun.c:338 if_clone_destroy(ffff80003761d2f0) at if_clone_destroy+0x1d7 sys/net/if.c:1382 sys_ioctl(ffff800037613700,ffff80003761d4d0,ffff80003761d420) at sys_ioctl+0x678 syscall(ffff80003761d4d0) at syscall+0x97e sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x13d279e3b60, 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(ffffffff830b2f32) at panic+0x1cf sys/kern/subr_prf.c:198 __assert(ffffffff8306bac3,ffffffff83069e0c,307,ffffffff83024baf) at __assert+0x29 splraise(deaf4152) at splraise+0xad sys/arch/amd64/amd64/intr.c:775 mtx_enter(ffff8000012dfc08) at mtx_enter+0x9e sys/kern/kern_lock.c:308 klist_mutex_lock(ffff8000012dfc08) at klist_mutex_lock+0x32 sys/kern/kern_event.c:2352 klist_invalidate(ffff8000012dfca8) at klist_invalidate+0xe6 klist_lock sys/kern/kern_event.c:2317 [inline] klist_invalidate(ffff8000012dfca8) at klist_invalidate+0xe6 sys/kern/kern_event.c:2283 bpfsdetach(ffff80000129db80) at bpfsdetach+0xff sys/net/bpf.c:1800 bpfdetach(ffff800001296000) at bpfdetach+0x76 if_detach(ffff800001296000) at if_detach+0x14f sys/net/if.c:1193 tun_clone_destroy(ffff800001296000) at tun_clone_destroy+0x2aa sys/net/if_tun.c:338 if_clone_destroy(ffff80003761d2f0) at if_clone_destroy+0x1d7 sys/net/if.c:1382 sys_ioctl(ffff800037613700,ffff80003761d4d0,ffff80003761d420) at sys_ioctl+0x678 syscall(ffff80003761d4d0) at syscall+0x97e sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x13d279e3b60, count: -15