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 *280592 91617 0 0x1000 0x4080000 0 syz-executor db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff830b7de5) at panic+0x1cf sys/kern/subr_prf.c:198 __assert(ffffffff8306aab1,ffffffff830660da,307,ffffffff830209ee) at __assert+0x29 splraise(deafbead) at splraise+0xad sys/arch/amd64/amd64/intr.c:775 mtx_enter(ffff8000012c9808) at mtx_enter+0x9e sys/kern/kern_lock.c:308 klist_mutex_lock(ffff8000012c9808) at klist_mutex_lock+0x32 sys/kern/kern_event.c:2352 klist_invalidate(ffff8000012c98a8) at klist_invalidate+0xe6 klist_lock sys/kern/kern_event.c:2317 [inline] klist_invalidate(ffff8000012c98a8) at klist_invalidate+0xe6 sys/kern/kern_event.c:2283 bpfsdetach(ffff8000012a5b00) at bpfsdetach+0xff sys/net/bpf.c:1800 bpfdetach(ffff800001286800) at bpfdetach+0x76 if_detach(ffff800001286800) at if_detach+0x14f sys/net/if.c:1193 tun_clone_destroy(ffff800001286800) at tun_clone_destroy+0x2aa sys/net/if_tun.c:338 if_clone_destroy(ffff800037607ce0) at if_clone_destroy+0x1d7 sys/net/if.c:1382 sys_ioctl(ffff80003761af50,ffff800037607ec0,ffff800037607e10) at sys_ioctl+0x678 syscall(ffff800037607ec0) at syscall+0x97e sys/arch/amd64/amd64/trap.c:577 end trace frame: 0xffff800037607f40, 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(ffffffff830b7de5) at panic+0x1cf sys/kern/subr_prf.c:198 __assert(ffffffff8306aab1,ffffffff830660da,307,ffffffff830209ee) at __assert+0x29 splraise(deafbead) at splraise+0xad sys/arch/amd64/amd64/intr.c:775 mtx_enter(ffff8000012c9808) at mtx_enter+0x9e sys/kern/kern_lock.c:308 klist_mutex_lock(ffff8000012c9808) at klist_mutex_lock+0x32 sys/kern/kern_event.c:2352 klist_invalidate(ffff8000012c98a8) at klist_invalidate+0xe6 klist_lock sys/kern/kern_event.c:2317 [inline] klist_invalidate(ffff8000012c98a8) at klist_invalidate+0xe6 sys/kern/kern_event.c:2283 bpfsdetach(ffff8000012a5b00) at bpfsdetach+0xff sys/net/bpf.c:1800 bpfdetach(ffff800001286800) at bpfdetach+0x76 if_detach(ffff800001286800) at if_detach+0x14f sys/net/if.c:1193 tun_clone_destroy(ffff800001286800) at tun_clone_destroy+0x2aa sys/net/if_tun.c:338 if_clone_destroy(ffff800037607ce0) at if_clone_destroy+0x1d7 sys/net/if.c:1382 sys_ioctl(ffff80003761af50,ffff800037607ec0,ffff800037607e10) at sys_ioctl+0x678 syscall(ffff800037607ec0) at syscall+0x97e sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x54b540f41e0, count: -15 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff800037607980 rbx 0xffffffff8344e6a0 cdevsw+0x730 rdx 0xffff800001274100 rcx 0 rax 0xffff80003761af50 r8 0x101010101010101 r9 0x8080808080808080 r10 0x68bb0f59ce1b9e23 r11 0x755b00231df0f3f8 r12 0 r13 0xffff8000012c98a8 r14 0 r15 0x1 rip 0xffffffff813b2725 db_enter+0x25 cs 0x8 rflags 0x246 rsp 0xffff800037607970 ss 0x10 db_enter+0x25: addq $0x8,%rsp ddb> show proc PROC (syz-executor) tid=280592 pid=91617 tcnt=2 stat=onproc flags process=1000 proc=4080000 runpri=32, usrpri=79, slppri=32, nice=20 wchan=0x0, wmesg=, ps_single=0xffff80002a4ca7b0 scnt=1 ecnt=0 forw=0xffffffffffffffff, list=0xffff80002a4ca7b0,0xffff800037657700 process=0xffff800037648468 user=0xffff800037602000, vmspace=0xfffffd80689e3438 estcpu=29, cpticks=1, pctcpu=0.0, user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 25276 227740 23009 0 2 0 syz-executor 25276 187787 23009 0 3 0x4000080 fsleep syz-executor 25276 319409 23009 0 3 0x4000080 fsleep syz-executor 34011 419720 37581 0 2 0 syz-executor 34011 511211 37581 0 3 0x4000080 fsleep syz-executor 1729 327567 16353 0 2 0 syz-executor 1729 288034 16353 0 3 0x4000080 fsleep syz-executor 34697 229482 81612 0 2 0 syz-executor 34697 128855 81612 0 3 0x4000080 fsleep syz-executor 17625 421054 24187 0 2 0 syz-executor 17625 450741 24187 0 3 0x4000080 fsleep syz-executor 50088 394322 27012 0 2 0 syz-executor 50088 524254 27012 0 3 0x4000080 fsleep syz-executor 50088 330098 27012 0 3 0x4000080 fsleep syz-executor 91617 471214 24860 0 3 0x3000 suspend syz-executor *91617 280592 24860 0 7 0x4081000 syz-executor 41780 422512 0 0 3 0x14200 acct acct 37581 69888 56218 0 3 0x82 nanoslp syz-executor 72120 175535 0 0 3 0x14280 nfsidl nfsio 78877 282643 0 0 3 0x14280 nfsidl nfsio 23601 202046 0 0 3 0x14280 nfsidl nfsio 87348 384918 0 0 3 0x14280 nfsidl nfsio 84503 67825 0 0 3 0x14280 nfsidl nfsio 67384 464330 0 0 3 0x14280 nfsidl nfsio 5063 502231 0 0 3 0x14280 nfsidl nfsio 38531 478834 0 0 3 0x14280 nfsidl nfsio 94091 302832 0 0 3 0x14280 nfsidl nfsio 6669 294750 0 0 3 0x14280 nfsidl nfsio 91829 213454 0 0 3 0x14280 nfsidl nfsio 81191 293947 0 0 3 0x14280 nfsidl nfsio 55876 398258 0 0 3 0x14280 nfsidl nfsio 75100 240983 0 0 3 0x14280 nfsidl nfsio 82299 457802 0 0 3 0x14280 nfsidl nfsio 13748 504348 0 0 3 0x14280 nfsidl nfsio 22113 44713 0 0 3 0x14280 nfsidl nfsio 90495 146000 0 0 3 0x14280 nfsidl nfsio 55310 432932 0 0 3 0x14280 nfsidl nfsio 63074 519269 0 0 3 0x14280 nfsidl nfsio 7866 301558 0 0 3 0x14200 bored sosplice 74593 385854 1 0 3 0x100083 ttyin getty 27012 88462 56218 0 3 0x82 nanoslp syz-executor 81612 301713 56218 0 3 0x82 nanoslp syz-executor 23009 154723 56218 0 3 0x82 nanoslp syz-executor 24860 215280 56218 0 3 0x82 nanoslp syz-executor 48982 437864 56218 0 3 0x82 nanoslp syz-executor 16353 48800 56218 0 3 0x82 nanoslp syz-executor 24187 345124 56218 0 3 0x82 nanoslp syz-executor 56218 149195 30195 0 3 0x82 kqread syz-executor 30195 47545 46400 0 3 0x10008a sigsusp ksh 46400 366057 27886 0 3 0x98 kqread sshd-session 27886 189980 5872 0 3 0x92 kqread sshd-session 5872 31159 1 0 3 0x88 kqread sshd 47870 276585 20727 73 3 0x1100090 kqread syslogd 20727 252989 1 0 3 0x100082 sbwait syslogd 51585 302054 1 0 3 0x100080 kqread resolvd 27986 476674 81218 77 3 0x100092 kqread dhcpleased 37126 406406 81218 77 3 0x100092 kqread dhcpleased 81218 322491 1 0 3 0x80 kqread dhcpleased 38662 131814 0 0 3 0x14200 bored smr 44872 241074 0 0 2 0x14200 zerothread 75945 98513 0 0 3 0x14200 aiodoned aiodoned 43505 138006 0 0 3 0x14200 syncer update 75944 427023 0 0 3 0x14200 cleaner cleaner 84056 142256 0 0 2 0x14200 reaper 32676 276831 0 0 3 0x14200 pgdaemon pagedaemon 19781 523657 0 0 3 0x14200 bored viomb 18137 9492 0 0 3 0x40014200 acpi0 acpi0 13171 310919 0 0 3 0x14200 bored softnet3 57327 60449 0 0 3 0x14200 bored softnet2 9217 476314 0 0 3 0x14200 bored softnet1 43044 259697 0 0 3 0x14200 bored softnet0 71151 475757 0 0 3 0x14200 bored systqmp 79582 321876 0 0 3 0x14200 bored systq 67717 2189 0 0 3 0x40014200 tmoslp softclock 94104 479787 0 0 3 0x40014200 idle0 1 185785 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 10176 11050K 11447K 166960K 11914 0 pcb 18 13K 14K 166960K 152 0 rtable 171 5K 7K 166960K 445 0 pf 24 12K 268K 166960K 53 0 ifaddr 30 5K 7K 166960K 59 0 ifgroup 38 1K 2K 166960K 75 0 sysctl 2 0K 0K 166960K 2 0 counters 27 17K 17K 166960K 37 0 ioctlops 0 0K 4K 166960K 70 0 iov 0 0K 16K 166960K 46 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1458 92K 92K 166960K 1845 0 UFS quota 1 32K 32K 166960K 1 0 UFS mount 5 36K 36K 166960K 5 0 shm 3 5K 5K 166960K 19 0 VM map 2 1K 1K 166960K 2 0 sem 12 0K 1K 166960K 17 0 dirhash 12 2K 2K 166960K 24 0 ACPI 1690 195K 286K 166960K 12468 0 file desc 17 61K 97K 166960K 685 0 sigio 0 0K 0K 166960K 72 0 proc 61 59K 116K 166960K 552 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 0 0K 0K 166960K 136 0 in_multi 62 4K 7K 166960K 130 0 ether_multi 1 0K 0K 166960K 2 0 mrt 0 0K 0K 166960K 2 0 ISOFS mount 1 32K 32K 166960K 1 0 MSDOSFS mount 1 16K 16K 166960K 1 0 ttys 79 360K 360K 166960K 79 0 exec 0 0K 1K 166960K 419 0 fusefs mount 1 32K 32K 166960K 1 0 pfkey data 0 0K 0K 166960K 1 0 tdb 3 0K 0K 166960K 3 0 VM swap 8 62K 64K 166960K 10 0 UVM amap 231 72K 86K 166960K 8013 0 UVM aobj 98 9K 9K 166960K 101 0 pinsyscall 38 76K 96K 166960K 1741 0 memdesc 1 4K 4K 166960K 1 0 crypto data 1 1K 1K 166960K 1 0 ip6_options 0 0K 1K 166960K 34 0 NDP 8 0K 2K 166960K 38 0 temp 76 6816K 6882K 166960K 23304 0 kqueue 14 20K 28K 166960K 116 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 78 0 73 1 0 1 1 0 8 0 rtentry 112 141 0 64 4 0 4 4 0 8 0 unpcb 144 557 0 540 7 3 4 4 0 8 3 syncache 336 5 0 5 1 1 0 1 0 8 0 tcpcb 808 139 0 135 3 1 2 2 0 8 1 arp 88 23 0 10 1 0 1 1 0 8 0 ipq 40 1 0 0 1 0 1 1 0 8 0 ipqe 40 69 0 67 1 0 1 1 0 8 0 inpcb 336 677 0 666 11 4 7 7 0 8 5 nd6 104 32 0 19 1 0 1 1 0 8 0 pkpcb 40 6 0 6 2 1 1 1 0 8 1 kcovpl 48 9 0 1 1 0 1 1 0 8 0 ppxss 1072 3 0 3 2 1 1 1 0 8 1 art_heap8 4096 2 0 0 2 0 2 2 0 8 0 art_heap4 256 539 0 233 29 4 25 29 0 8 1 art_table 32 541 0 233 4 0 4 4 0 8 0 art_node 16 138 0 70 1 0 1 1 0 8 0 sysvmsgpl 40 5 0 2 1 0 1 1 0 8 0 semapl 112 13 0 3 1 0 1 1 0 8 0 shmpl 112 98 0 3 3 0 3 3 0 8 0 dirhash 1024 25 0 8 3 0 3 3 0 8 0 dino2pl 256 2568 0 1073 95 0 95 95 0 8 0 ffsino 240 2568 0 1073 89 0 89 89 0 8 0 nchpl 144 3596 0 1933 63 0 63 63 0 8 0 uvmvnodes 80 2994 0 0 62 0 62 62 0 8 0 vnodes 216 2994 0 0 167 0 167 167 0 8 0 namei 1024 11354 0 11354 3 2 1 2 0 8 1 kstatmem 264 36 0 20 2 0 2 2 0 8 0 scsiplug 72 3 0 3 2 1 1 1 0 8 1 scxspl 216 10521 0 10521 9 7 2 8 1 8 2 plimitpl 152 106 0 89 1 0 1 1 0 8 0 sigapl 424 989 0 921 8 0 8 8 0 8 0 futexpl 64 8750 0 8742 1 0 1 1 0 8 0 knotepl 120 24297 0 24249 18 8 10 10 0 8 8 kqueuepl 184 165 0 152 1 0 1 1 0 8 0 pipepl 288 152 0 125 3 0 3 3 0 8 0 fdescpl 432 949 0 920 5 1 4 5 0 8 0 filepl 120 5101 0 4851 16 5 11 14 0 8 2 lockfpl 104 245 0 243 1 0 1 1 0 8 0 lockfspl 48 108 0 106 1 0 1 1 0 8 0 sessionpl 144 23 0 15 1 0 1 1 0 8 0 pgrppl 48 39 0 23 1 0 1 1 0 8 0 ucredpl 104 674 0 663 1 0 1 1 0 8 0 zombiepl 144 1147 0 1145 1 0 1 1 0 8 0 processpl 1096 989 0 921 5 0 5 5 0 8 0 procpl 648 1946 0 1869 8 0 8 8 0 8 0 sosppl 168 3 0 3 2 1 1 1 0 8 1 sockpl 504 1326 0 1293 20 8 12 13 0 8 7 mcl64k 65536 8 0 8 1 0 1 1 0 8 1 mcl12k 12288 1 0 1 1 0 1 1 0 8 1 mcl8k 8192 14 0 14 2 1 1 1 0 8 1 mcl4k 4096 3368 0 3316 19 11 8 18 0 8 1 mcl2k 2048 934 0 930 4 2 2 3 0 8 1 mtagpl 96 52 0 14 2 0 2 2 0 8 1 mbufpl 256 11105 0 10977 19 3 16 19 0 8 2 bufpl 280 3155 0 96 219 0 219 219 0 8 0 anonpl 24 181703 0 178465 67 0 67 67 0 187 43 amapchunkpl 152 27520 0 27010 44 10 34 34 0 158 13 amappl16 200 4010 0 3979 31 20 11 27 0 8 8 amappl15 192 6 0 6 1 1 0 1 0 8 0 amappl14 184 109 0 99 1 0 1 1 0 8 0 amappl13 176 6 0 6 1 1 0 1 0 8 0 amappl12 168 1578 0 1548 3 1 2 3 0 8 0 amappl11 160 49 0 39 1 0 1 1 0 8 0 amappl10 152 9 0 9 1 1 0 1 0 8 0 amappl9 144 107 0 107 1 1 0 1 0 8 0 amappl8 136 15 0 14 1 0 1 1 0 8 0 amappl7 128 97 0 87 1 0 1 1 0 8 0 amappl6 120 175 0 174 1 0 1 1 0 8 0 amappl5 112 129 0 120 1 0 1 1 0 8 0 amappl4 104 289 0 272 1 0 1 1 0 8 0 amappl3 96 5019 0 4921 3 0 3 3 0 8 0 amappl2 88 1216 0 1138 2 0 2 2 0 8 0 amappl1 80 8984 0 8470 13 2 11 13 0 8 0 amappl 88 7595 0 7418 5 0 5 5 0 92 0 dma16384 16384 1 0 1 1 0 1 1 0 8 1 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 7 0 7 1 1 0 1 0 8 0 dma128 128 253 0 253 1 1 0 1 0 8 0 dma64 64 6 0 6 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 100 0 3 2 0 2 2 0 8 0 uaddrrnd 24 949 0 919 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 949 0 919 1 0 1 1 0 8 0 vmmpekpl 168 8739 0 8700 3 0 3 3 0 8 0 vmmpepl 168 64298 0 62517 99 0 99 99 0 357 20 vmsppl 352 948 0 919 4 1 3 4 0 8 0 rwobjpl 24 23438 0 19490 24 0 24 24 0 8 0 pdppl 4096 1904 0 1838 104 38 66 82 0 8 0 pvpl 32 437000 0 428392 143 6 137 137 0 265 61 pmappl 216 948 0 919 3 0 3 3 0 8 0 extentpl 40 55 0 38 1 0 1 1 0 8 0 phpool 112 412 0 77 11 1 10 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(ffffffff830b7de5) at panic+0x1cf sys/kern/subr_prf.c:198 __assert(ffffffff8306aab1,ffffffff830660da,307,ffffffff830209ee) at __assert+0x29 splraise(deafbead) at splraise+0xad sys/arch/amd64/amd64/intr.c:775 mtx_enter(ffff8000012c9808) at mtx_enter+0x9e sys/kern/kern_lock.c:308 klist_mutex_lock(ffff8000012c9808) at klist_mutex_lock+0x32 sys/kern/kern_event.c:2352 klist_invalidate(ffff8000012c98a8) at klist_invalidate+0xe6 klist_lock sys/kern/kern_event.c:2317 [inline] klist_invalidate(ffff8000012c98a8) at klist_invalidate+0xe6 sys/kern/kern_event.c:2283 bpfsdetach(ffff8000012a5b00) at bpfsdetach+0xff sys/net/bpf.c:1800 bpfdetach(ffff800001286800) at bpfdetach+0x76 if_detach(ffff800001286800) at if_detach+0x14f sys/net/if.c:1193 tun_clone_destroy(ffff800001286800) at tun_clone_destroy+0x2aa sys/net/if_tun.c:338 if_clone_destroy(ffff800037607ce0) at if_clone_destroy+0x1d7 sys/net/if.c:1382 sys_ioctl(ffff80003761af50,ffff800037607ec0,ffff800037607e10) at sys_ioctl+0x678 syscall(ffff800037607ec0) at syscall+0x97e sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x54b540f41e0, 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(ffffffff830b7de5) at panic+0x1cf sys/kern/subr_prf.c:198 __assert(ffffffff8306aab1,ffffffff830660da,307,ffffffff830209ee) at __assert+0x29 splraise(deafbead) at splraise+0xad sys/arch/amd64/amd64/intr.c:775 mtx_enter(ffff8000012c9808) at mtx_enter+0x9e sys/kern/kern_lock.c:308 klist_mutex_lock(ffff8000012c9808) at klist_mutex_lock+0x32 sys/kern/kern_event.c:2352 klist_invalidate(ffff8000012c98a8) at klist_invalidate+0xe6 klist_lock sys/kern/kern_event.c:2317 [inline] klist_invalidate(ffff8000012c98a8) at klist_invalidate+0xe6 sys/kern/kern_event.c:2283 bpfsdetach(ffff8000012a5b00) at bpfsdetach+0xff sys/net/bpf.c:1800 bpfdetach(ffff800001286800) at bpfdetach+0x76 if_detach(ffff800001286800) at if_detach+0x14f sys/net/if.c:1193 tun_clone_destroy(ffff800001286800) at tun_clone_destroy+0x2aa sys/net/if_tun.c:338 if_clone_destroy(ffff800037607ce0) at if_clone_destroy+0x1d7 sys/net/if.c:1382 sys_ioctl(ffff80003761af50,ffff800037607ec0,ffff800037607e10) at sys_ioctl+0x678 syscall(ffff800037607ec0) at syscall+0x97e sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x54b540f41e0, count: -15