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 *249644 32729 0 0 0x4000000 0 syz-executor db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff830c048b) at panic+0x1cf sys/kern/subr_prf.c:198 __assert(ffffffff830749f4,ffffffff83072d7c,307,ffffffff8302d75f) at __assert+0x29 splraise(deaf4152) at splraise+0xad sys/arch/amd64/amd64/intr.c:775 mtx_enter(ffff8000012bbc08) at mtx_enter+0x9e sys/kern/kern_lock.c:308 klist_mutex_lock(ffff8000012bbc08) at klist_mutex_lock+0x32 sys/kern/kern_event.c:2352 klist_invalidate(ffff8000012bbca8) at klist_invalidate+0xe6 klist_lock sys/kern/kern_event.c:2317 [inline] klist_invalidate(ffff8000012bbca8) at klist_invalidate+0xe6 sys/kern/kern_event.c:2283 bpfsdetach(ffff80000129b940) at bpfsdetach+0xff sys/net/bpf.c:1800 bpfdetach(ffff80000128e800) at bpfdetach+0x76 if_detach(ffff80000128e800) at if_detach+0x14f sys/net/if.c:1193 tun_clone_destroy(ffff80000128e800) at tun_clone_destroy+0x2aa sys/net/if_tun.c:338 if_clone_destroy(ffff8000376577a0) at if_clone_destroy+0x1d7 sys/net/if.c:1382 sys_ioctl(ffff80002a4d0030,ffff800037657980,ffff8000376578d0) at sys_ioctl+0x678 syscall(ffff800037657980) at syscall+0x97e sys/arch/amd64/amd64/trap.c:577 end trace frame: 0xffff800037657a00, 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(ffffffff830c048b) at panic+0x1cf sys/kern/subr_prf.c:198 __assert(ffffffff830749f4,ffffffff83072d7c,307,ffffffff8302d75f) at __assert+0x29 splraise(deaf4152) at splraise+0xad sys/arch/amd64/amd64/intr.c:775 mtx_enter(ffff8000012bbc08) at mtx_enter+0x9e sys/kern/kern_lock.c:308 klist_mutex_lock(ffff8000012bbc08) at klist_mutex_lock+0x32 sys/kern/kern_event.c:2352 klist_invalidate(ffff8000012bbca8) at klist_invalidate+0xe6 klist_lock sys/kern/kern_event.c:2317 [inline] klist_invalidate(ffff8000012bbca8) at klist_invalidate+0xe6 sys/kern/kern_event.c:2283 bpfsdetach(ffff80000129b940) at bpfsdetach+0xff sys/net/bpf.c:1800 bpfdetach(ffff80000128e800) at bpfdetach+0x76 if_detach(ffff80000128e800) at if_detach+0x14f sys/net/if.c:1193 tun_clone_destroy(ffff80000128e800) at tun_clone_destroy+0x2aa sys/net/if_tun.c:338 if_clone_destroy(ffff8000376577a0) at if_clone_destroy+0x1d7 sys/net/if.c:1382 sys_ioctl(ffff80002a4d0030,ffff800037657980,ffff8000376578d0) at sys_ioctl+0x678 syscall(ffff800037657980) at syscall+0x97e sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xf7e992a6210, count: -15 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff800037657440 rbx 0xffffffff834cb950 cdevsw+0x730 rdx 0xffff80000128f940 rcx 0 rax 0xffff80002a4d0030 r8 0 r9 0x8080808080808080 r10 0x3d23c32c65164b08 r11 0xfe8577f5c4d44cb3 r12 0 r13 0xffff8000012bbca8 r14 0 r15 0x1 rip 0xffffffff8140ffa5 db_enter+0x25 cs 0x8 rflags 0x246 rsp 0xffff800037657430 ss 0x10 db_enter+0x25: addq $0x8,%rsp ddb> show proc PROC (syz-executor) tid=249644 pid=32729 tcnt=4 stat=onproc flags process=0 proc=4000000 runpri=32, usrpri=75, slppri=32, nice=20 wchan=0x0, wmesg=, ps_single=0x0 scnt=0 ecnt=0 forw=0xffffffffffffffff, list=0xffff80002a4d07c8,0xffff80002a4d0f70 process=0xffff80002f7f7378 user=0xffff800037652000, vmspace=0xfffffd806c2222d0 estcpu=25, cpticks=1, pctcpu=0.0, user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 37023 467804 7424 0 3 0 futex syz-executor 37023 479158 7424 0 3 0x4000000 futex syz-executor 37023 152475 7424 0 3 0x4000080 fsleep syz-executor 35685 422301 55868 0 3 0 futex syz-executor 35685 70045 55868 0 2 0x4000000 syz-executor 35685 213793 55868 0 3 0x4000080 fifor syz-executor 35685 469139 55868 0 3 0x4000000 futex syz-executor 43555 364145 60444 0 3 0 futex syz-executor 43555 8625 60444 0 3 0x4000000 futex syz-executor 31532 249876 65744 60929 3 0x10 futex syz-executor 31532 419880 65744 60929 3 0x4000010 futex syz-executor 31532 191344 65744 60929 3 0x4000010 futex syz-executor 32729 464674 24019 0 3 0 futex syz-executor *32729 249644 24019 0 7 0x4000000 syz-executor 32729 67605 24019 0 3 0x4000080 fsleep syz-executor 32729 329062 24019 0 3 0x4000080 fsleep syz-executor 6888 435005 50477 0 3 0x3010 suspend syz-executor 6888 7605 50477 0 2 0x4081010 syz-executor 93677 220418 29697 0 3 0 futex syz-executor 93677 333861 29697 0 2 0x4000000 syz-executor 93677 49215 29697 0 2 0x4000000 syz-executor 93677 413678 29697 0 3 0x4000080 fsleep syz-executor 8572 450261 0 0 3 0x14200 acct acct 31295 42883 0 0 3 0x14200 bored sosplice 24019 72714 56573 0 2 0x482 syz-executor 7424 229969 56573 0 2 0x482 syz-executor 65744 407904 56573 0 2 0x482 syz-executor 60444 180961 56573 0 2 0x482 syz-executor 50477 311913 56573 0 2 0x482 syz-executor 42899 340978 56573 0 3 0x82 wait syz-executor 29697 522318 56573 0 2 0x482 syz-executor 55868 34678 56573 0 2 0x482 syz-executor 56573 138016 31958 0 3 0x82 kqread syz-executor 31958 426383 38826 0 3 0x10008a sigsusp ksh 38826 307995 8134 0 3 0x98 kqread sshd-session 8134 141904 80216 0 3 0x92 kqread sshd-session 4554 412552 1 0 3 0x100083 ttyin getty 80216 234089 1 0 3 0x88 kqread sshd 92947 380688 37214 73 3 0x1100090 kqread syslogd 37214 37501 1 0 3 0x100082 sbwait syslogd 63621 241100 1 0 3 0x100080 kqread resolvd 77897 21540 63379 77 3 0x100092 kqread dhcpleased 52482 158155 63379 77 3 0x100092 kqread dhcpleased 63379 6403 1 0 3 0x80 kqread dhcpleased 61278 315923 0 0 3 0x14200 bored smr 46324 7597 0 0 2 0x14200 zerothread 19395 386680 0 0 3 0x14200 aiodoned aiodoned 60939 8847 0 0 3 0x14200 syncer update 53560 331098 0 0 3 0x14200 cleaner cleaner 61023 390457 0 0 3 0x14200 reaper reaper 88744 453359 0 0 3 0x14200 pgdaemon pagedaemon 14374 27204 0 0 3 0x14200 bored viomb 20703 338688 0 0 3 0x40014200 acpi0 acpi0 12330 451466 0 0 3 0x14200 bored softnet3 16953 372739 0 0 3 0x14200 bored softnet2 34989 427938 0 0 3 0x14200 bored softnet1 30882 146356 0 0 3 0x14200 bored softnet0 18131 143996 0 0 3 0x14200 bored systqmp 27722 151659 0 0 3 0x14200 bored systq 9070 432811 0 0 2 0x40014200 softclock 95831 286710 0 0 3 0x40014200 idle0 1 107219 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 10181 11068K 11374K 166960K 11442 0 pcb 17 12K 12K 166960K 52 0 rtable 226 7K 7K 166960K 452 0 pf 33 13K 15K 166960K 39 0 ifaddr 41 7K 7K 166960K 48 0 ifgroup 54 2K 2K 166960K 59 0 sysctl 3 0K 0K 166960K 5 0 counters 31 17K 17K 166960K 32 0 ioctlops 0 0K 4K 166960K 46 0 iov 0 0K 18K 166960K 11 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1370 86K 87K 166960K 1514 0 UFS quota 1 32K 32K 166960K 1 0 UFS mount 5 36K 36K 166960K 5 0 shm 3 5K 5K 166960K 5 0 VM map 2 1K 1K 166960K 2 0 sem 9 0K 0K 166960K 13 0 dirhash 12 2K 2K 166960K 12 0 ACPI 1690 195K 286K 166960K 12468 0 file desc 18 65K 89K 166960K 319 0 sigio 0 0K 0K 166960K 3 0 proc 60 59K 83K 166960K 499 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 2 0K 0K 166960K 87 0 in_multi 89 6K 7K 166960K 109 0 ether_multi 2 0K 0K 166960K 2 0 mrt 1 0K 0K 166960K 1 0 ISOFS mount 1 32K 32K 166960K 1 0 MSDOSFS mount 1 16K 16K 166960K 1 0 ttys 61 281K 281K 166960K 61 0 exec 0 0K 1K 166960K 363 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 251 73K 76K 166960K 4370 0 UVM aobj 9 3K 3K 166960K 11 0 pinsyscall 39 78K 93K 166960K 1337 0 memdesc 1 4K 4K 166960K 1 0 crypto data 1 1K 1K 166960K 1 0 ip6_options 0 0K 0K 166960K 10 0 NDP 12 0K 2K 166960K 30 0 temp 40 6811K 6875K 166960K 9458 0 kqueue 15 24K 32K 166960K 64 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 55 0 49 1 0 1 1 0 8 0 rtentry 112 118 0 15 4 0 4 4 0 8 0 unpcb 144 142 0 120 1 0 1 1 0 8 0 syncache 336 4 0 4 1 1 0 1 0 8 0 tcpqe 32 2 0 2 1 1 0 1 0 8 0 tcpcb 808 109 0 71 5 1 4 4 0 8 0 arp 88 19 0 2 1 0 1 1 0 8 0 ipq 40 2 0 1 1 0 1 1 0 8 0 ipqe 40 47 0 46 1 0 1 1 0 8 0 inpcb 336 279 0 237 4 0 4 4 0 8 0 nd6 104 27 0 3 1 0 1 1 0 8 0 pkpcb 40 1 0 1 1 1 0 1 0 8 0 kcovpl 48 8 0 0 1 0 1 1 0 8 0 ppxss 1072 1 0 1 1 1 0 1 0 8 0 pfstitem 24 1 0 0 1 0 1 1 0 8 0 pfstkey 128 1 0 0 1 0 1 1 0 8 0 pfstate 344 1 0 0 1 0 1 1 0 8 0 pfrule 1344 2 0 2 1 1 0 1 0 8 0 art_heap8 4096 2 0 0 2 0 2 2 0 8 0 art_heap4 256 470 0 56 29 2 27 29 0 8 0 art_table 32 472 0 56 4 0 4 4 0 8 0 art_node 16 117 0 25 1 0 1 1 0 8 0 sysvmsgpl 40 3 0 3 1 1 0 1 0 8 0 semupl 112 1 0 1 1 1 0 1 0 8 0 semapl 112 7 0 0 1 0 1 1 0 8 0 shmpl 112 8 0 2 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 1886 0 389 95 0 95 95 0 8 0 ffsino 240 1886 0 389 89 0 89 89 0 8 0 nchpl 144 2335 0 652 63 0 63 63 0 8 0 uvmvnodes 80 2071 0 0 43 0 43 43 0 8 0 vnodes 216 2071 0 0 116 0 116 116 0 8 0 namei 1024 7073 0 7072 3 2 1 2 0 8 0 kstatmem 264 26 0 2 2 0 2 2 0 8 0 scxspl 216 6991 0 6991 8 7 1 8 1 8 1 plimitpl 152 47 0 30 1 0 1 1 0 8 0 sigapl 424 599 0 551 6 0 6 6 0 8 0 futexpl 64 3012 0 3007 1 0 1 1 0 8 0 knotepl 120 17000 0 16950 17 8 9 10 0 8 7 kqueuepl 184 115 0 103 3 2 1 3 0 8 0 pipepl 288 124 0 96 4 1 3 3 0 8 1 fdescpl 432 581 0 551 5 1 4 5 0 8 0 filepl 120 2534 0 2238 10 1 9 10 0 8 0 lockfpl 104 63 0 57 1 0 1 1 0 8 0 lockfspl 48 31 0 26 1 0 1 1 0 8 0 sessionpl 144 22 0 14 1 0 1 1 0 8 0 pgrppl 48 32 0 16 1 0 1 1 0 8 0 ucredpl 104 279 0 265 1 0 1 1 0 8 0 zombiepl 144 579 0 577 1 0 1 1 0 8 0 processpl 1096 599 0 551 4 0 4 4 0 8 0 procpl 648 906 0 843 8 1 7 7 0 8 1 sosppl 168 5 0 5 2 1 1 1 0 8 1 sockpl 504 482 0 412 10 1 9 9 0 8 0 mcl64k 65536 4 0 4 1 1 0 1 0 8 0 mcl9k 9216 1 0 1 1 1 0 1 0 8 0 mcl8k 8192 8 0 8 1 1 0 1 0 8 0 mcl4k 4096 2844 0 2795 14 7 7 14 0 8 0 mcl2k 2048 379 0 378 3 2 1 3 0 8 0 mtagpl 96 7 0 4 1 0 1 1 0 8 0 mbufpl 256 6380 0 6233 20 7 13 20 0 8 1 bufpl 280 2513 0 96 173 0 173 173 0 8 0 anonpl 24 147741 0 144187 38 9 29 33 0 187 0 amapchunkpl 152 14238 0 13658 26 3 23 25 0 158 0 amappl16 200 3528 0 3504 8 2 6 6 0 8 3 amappl15 192 11 0 11 1 1 0 1 0 8 0 amappl14 184 110 0 100 1 0 1 1 0 8 0 amappl13 176 78 0 78 1 1 0 1 0 8 0 amappl12 168 1197 0 1167 2 0 2 2 0 8 0 amappl11 160 70 0 60 1 0 1 1 0 8 0 amappl10 152 30 0 30 1 1 0 1 0 8 0 amappl9 144 177 0 177 1 1 0 1 0 8 0 amappl8 136 21 0 19 1 0 1 1 0 8 0 amappl7 128 98 0 88 1 0 1 1 0 8 0 amappl6 120 162 0 161 1 0 1 1 0 8 0 amappl5 112 125 0 117 1 0 1 1 0 8 0 amappl4 104 278 0 262 1 0 1 1 0 8 0 amappl3 96 2670 0 2562 3 0 3 3 0 8 0 amappl2 88 853 0 776 2 0 2 2 0 8 0 amappl1 80 8035 0 7518 13 1 12 13 0 8 0 amappl 88 4008 0 3811 5 0 5 5 0 92 0 dma4096 4096 1 0 1 1 1 0 1 0 8 0 dma2048 2048 1 0 1 1 0 1 1 0 8 1 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 1 1 1 0 8 1 dma64 64 6 0 6 1 1 0 1 0 8 0 dma32 32 8 0 8 1 1 0 1 0 8 0 dma16 16 18 0 17 1 0 1 1 0 8 0 aobjpl 72 10 0 2 1 0 1 1 0 8 0 uaddrrnd 24 581 0 551 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 581 0 551 1 0 1 1 0 8 0 vmmpekpl 168 6068 0 6033 2 0 2 2 0 8 0 vmmpepl 168 43690 0 41890 83 2 81 81 0 357 2 vmsppl 352 580 0 551 4 1 3 4 0 8 0 rwobjpl 24 17899 0 14941 18 0 18 18 0 8 0 pdppl 4096 1168 0 1102 92 26 66 78 0 8 0 pvpl 32 309377 0 300265 105 17 88 97 0 265 8 pmappl 216 580 0 551 2 0 2 2 0 8 0 extentpl 40 55 0 38 1 0 1 1 0 8 0 phpool 112 380 0 54 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(ffffffff830c048b) at panic+0x1cf sys/kern/subr_prf.c:198 __assert(ffffffff830749f4,ffffffff83072d7c,307,ffffffff8302d75f) at __assert+0x29 splraise(deaf4152) at splraise+0xad sys/arch/amd64/amd64/intr.c:775 mtx_enter(ffff8000012bbc08) at mtx_enter+0x9e sys/kern/kern_lock.c:308 klist_mutex_lock(ffff8000012bbc08) at klist_mutex_lock+0x32 sys/kern/kern_event.c:2352 klist_invalidate(ffff8000012bbca8) at klist_invalidate+0xe6 klist_lock sys/kern/kern_event.c:2317 [inline] klist_invalidate(ffff8000012bbca8) at klist_invalidate+0xe6 sys/kern/kern_event.c:2283 bpfsdetach(ffff80000129b940) at bpfsdetach+0xff sys/net/bpf.c:1800 bpfdetach(ffff80000128e800) at bpfdetach+0x76 if_detach(ffff80000128e800) at if_detach+0x14f sys/net/if.c:1193 tun_clone_destroy(ffff80000128e800) at tun_clone_destroy+0x2aa sys/net/if_tun.c:338 if_clone_destroy(ffff8000376577a0) at if_clone_destroy+0x1d7 sys/net/if.c:1382 sys_ioctl(ffff80002a4d0030,ffff800037657980,ffff8000376578d0) at sys_ioctl+0x678 syscall(ffff800037657980) at syscall+0x97e sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xf7e992a6210, 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(ffffffff830c048b) at panic+0x1cf sys/kern/subr_prf.c:198 __assert(ffffffff830749f4,ffffffff83072d7c,307,ffffffff8302d75f) at __assert+0x29 splraise(deaf4152) at splraise+0xad sys/arch/amd64/amd64/intr.c:775 mtx_enter(ffff8000012bbc08) at mtx_enter+0x9e sys/kern/kern_lock.c:308 klist_mutex_lock(ffff8000012bbc08) at klist_mutex_lock+0x32 sys/kern/kern_event.c:2352 klist_invalidate(ffff8000012bbca8) at klist_invalidate+0xe6 klist_lock sys/kern/kern_event.c:2317 [inline] klist_invalidate(ffff8000012bbca8) at klist_invalidate+0xe6 sys/kern/kern_event.c:2283 bpfsdetach(ffff80000129b940) at bpfsdetach+0xff sys/net/bpf.c:1800 bpfdetach(ffff80000128e800) at bpfdetach+0x76 if_detach(ffff80000128e800) at if_detach+0x14f sys/net/if.c:1193 tun_clone_destroy(ffff80000128e800) at tun_clone_destroy+0x2aa sys/net/if_tun.c:338 if_clone_destroy(ffff8000376577a0) at if_clone_destroy+0x1d7 sys/net/if.c:1382 sys_ioctl(ffff80002a4d0030,ffff800037657980,ffff8000376578d0) at sys_ioctl+0x678 syscall(ffff800037657980) at syscall+0x97e sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xf7e992a6210, count: -15