panic: kernel diagnostic assertion "nlevel >= IPL_NONE" failed: file "/syzkaller/managers/setuid/kernel/sys/arch/amd64/amd64/intr.c", line 699 Stopped at db_enter+0x1c: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND 411982 84712 32767 0x10 0 1 syz-executor.2 db_enter() at db_enter+0x1c sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff8279f709) at panic+0x17b sys/kern/subr_prf.c:198 __assert(ffffffff8281d9e3,ffffffff8283c03e,2bb,ffffffff827a18af) at __assert+0x29 sys/kern/subr_prf.c:157 splraise(e3a31f25) at splraise+0xb4 sys/arch/amd64/amd64/intr.c:699 mtx_enter_try(fffffd806f27c870) at mtx_enter_try+0x73 sys/kern/kern_lock.c:291 mtx_enter(fffffd806f27c870) at mtx_enter+0x4f sys/kern/kern_lock.c:266 knote_remove(ffff8000211d87f8,fffffd806f27c870,fffffd806f27c8f8,3,0) at knote_remove+0x20d sys/kern/kern_event.c:1881 knote_fdclose(ffff8000211d87f8,3) at knote_fdclose+0xae sys/kern/kern_event.c:1934 fdfree(ffff8000211d87f8) at fdfree+0xdf sys/kern/kern_descrip.c:1196 exit1(ffff8000211d87f8,0,0,1) at exit1+0x3e4 sys/kern/kern_exit.c:206 sys_exit(ffff8000211d87f8,ffff80002adc9290,ffff80002adc92e0) at sys_exit+0x1a sys/kern/kern_exit.c:89 syscall(ffff80002adc9360) at syscall+0x5e2 mi_syscall sys/sys/syscall_mi.h:110 [inline] syscall(ffff80002adc9360) at syscall+0x5e2 sys/arch/amd64/amd64/trap.c:623 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7258bf8ced50, count: 2 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{0}> ddb{0}> set $lines = 0 ddb{0}> set $maxwidth = 0 ddb{0}> show panic *cpu0: kernel diagnostic assertion "nlevel >= IPL_NONE" failed: file "/syzkaller/managers/setuid/kernel/sys/arch/amd64/amd64/intr.c", line 699 ddb{0}> trace db_enter() at db_enter+0x1c sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff8279f709) at panic+0x17b sys/kern/subr_prf.c:198 __assert(ffffffff8281d9e3,ffffffff8283c03e,2bb,ffffffff827a18af) at __assert+0x29 sys/kern/subr_prf.c:157 splraise(e3a31f25) at splraise+0xb4 sys/arch/amd64/amd64/intr.c:699 mtx_enter_try(fffffd806f27c870) at mtx_enter_try+0x73 sys/kern/kern_lock.c:291 mtx_enter(fffffd806f27c870) at mtx_enter+0x4f sys/kern/kern_lock.c:266 knote_remove(ffff8000211d87f8,fffffd806f27c870,fffffd806f27c8f8,3,0) at knote_remove+0x20d sys/kern/kern_event.c:1881 knote_fdclose(ffff8000211d87f8,3) at knote_fdclose+0xae sys/kern/kern_event.c:1934 fdfree(ffff8000211d87f8) at fdfree+0xdf sys/kern/kern_descrip.c:1196 exit1(ffff8000211d87f8,0,0,1) at exit1+0x3e4 sys/kern/kern_exit.c:206 sys_exit(ffff8000211d87f8,ffff80002adc9290,ffff80002adc92e0) at sys_exit+0x1a sys/kern/kern_exit.c:89 syscall(ffff80002adc9360) at syscall+0x5e2 mi_syscall sys/sys/syscall_mi.h:110 [inline] syscall(ffff80002adc9360) at syscall+0x5e2 sys/arch/amd64/amd64/trap.c:623 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7258bf8ced50, count: -13 ddb{0}> show registers rdi 0 rsi 0x1 rbp 0xffff80002adc8ed0 rbx 0xffffffff82bbeb9f cpu_info_full_primary+0x2b9f rdx 0 rcx 0xffff8000211d87f8 rax 0xffffffff82bbdff0 cpu_info_full_primary+0x1ff0 r8 0x101010101010101 r9 0x8080808080808080 r10 0xd9bc3afe084514fd r11 0x997fb326c8c7bfe2 r12 0xffffffff82bbe9a0 cpu_info_full_primary+0x29a0 r13 0 r14 0 r15 0x1 rip 0xffffffff81b3671c db_enter+0x1c cs 0x8 rflags 0x246 rsp 0xffff80002adc8ec0 ss 0x10 db_enter+0x1c: addq $0x8,%rsp ddb{0}> show proc PROC (syz-executor.1) pid=293782 stat=onproc flags process=1018 proc=2000 pri=0, usrpri=82, nice=20 forw=0xffffffffffffffff, list=0xffff8000211f5008,0xffff8000211d9000 process=0xffff80002a9b3688 user=0xffff80002adc4000, vmspace=0xfffffd806bb33598 estcpu=36, cpticks=3, pctcpu=0.0 user=0, sys=1, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND 38435 364239 30430 32767 2 0x10 syz-executor.6 47468 38601 66992 32767 2 0x10 syz-executor.3 47468 239506 66992 32767 3 0x4000090 fsleep syz-executor.3 37691 12726 38459 32767 2 0x490 syz-executor.7 37691 426327 38459 32767 3 0x4000090 netio syz-executor.7 37691 8092 38459 32767 3 0x4000090 fsleep syz-executor.7 59210 486242 18604 32767 2 0x10 syz-executor.5 59210 349144 18604 32767 3 0x4000090 fsleep syz-executor.5 59210 7146 18604 32767 3 0x4000090 fsleep syz-executor.5 21962 324542 88095 32767 2 0x10 syz-executor.0 21962 369918 88095 32767 3 0x4000090 ttyout syz-executor.0 21962 240120 88095 32767 3 0x4000090 ttyin syz-executor.0 97245 124867 36829 32767 2 0x10 syz-executor.4 97245 75991 36829 32767 3 0x4000090 fsleep syz-executor.4 97245 90023 36829 32767 3 0x4000090 fsleep syz-executor.4 37733 131510 24742 32767 3 0x90 nanoslp syz-executor.1 24742 363540 53806 0 3 0x82 wait syz-executor.1 66992 316291 16933 32767 3 0x90 nanoslp syz-executor.3 16933 424092 53806 0 3 0x82 wait syz-executor.3 36829 473540 71794 32767 3 0x90 nanoslp syz-executor.4 71794 195244 53806 0 3 0x82 wait syz-executor.4 30430 205541 83497 32767 2 0x490 syz-executor.6 83497 248625 53806 0 3 0x82 wait syz-executor.6 18604 349773 73378 32767 3 0x90 nanoslp syz-executor.5 73378 225165 53806 0 3 0x82 wait syz-executor.5 84712 411982 16762 32767 7 0x10 syz-executor.2 16762 475487 53806 0 3 0x82 wait syz-executor.2 88095 268214 44456 32767 3 0x90 nanoslp syz-executor.0 44456 1943 53806 0 3 0x82 wait syz-executor.0 38459 27328 99607 32767 3 0x90 nanoslp syz-executor.7 99607 337791 53806 0 3 0x82 wait syz-executor.7 43206 420033 0 0 3 0x14200 bored sosplice 53806 290707 82888 0 3 0x2000082 wait syz-fuzzer 53806 374272 82888 0 3 0x6000082 nanoslp syz-fuzzer 53806 288489 82888 0 3 0x6000082 wait syz-fuzzer 53806 462757 82888 0 3 0x6000082 thrsleep syz-fuzzer 53806 383067 82888 0 3 0x6000082 wait syz-fuzzer 53806 407424 82888 0 3 0x6000082 wait syz-fuzzer 53806 125484 82888 0 3 0x6000082 wait syz-fuzzer 53806 413082 82888 0 3 0x6000082 thrsleep syz-fuzzer 53806 523176 82888 0 3 0x6000082 thrsleep syz-fuzzer 53806 384094 82888 0 3 0x6000082 thrsleep syz-fuzzer 53806 189821 82888 0 3 0x6000082 wait syz-fuzzer 53806 195822 82888 0 3 0x6000082 kqread syz-fuzzer 53806 320975 82888 0 3 0x6000082 wait syz-fuzzer 53806 263606 82888 0 3 0x6000082 thrsleep syz-fuzzer 53806 239456 82888 0 3 0x6000082 wait syz-fuzzer 53806 82426 82888 0 3 0x6000082 thrsleep syz-fuzzer 82888 83646 27204 0 3 0x10008a sigsusp ksh 27204 46044 78014 0 3 0x9a kqread sshd 68818 51001 1 0 3 0x100083 ttyin getty 78014 475943 1 0 3 0x88 kqread sshd 44320 128046 96428 73 3 0x1100090 kqread syslogd 96428 168886 1 0 3 0x100082 netio syslogd 63630 175654 1 0 3 0x100080 kqread resolvd 57192 348371 9285 77 3 0x100092 kqread dhcpleased 44963 401704 9285 77 3 0x100092 kqread dhcpleased 9285 336908 1 0 3 0x80 kqread dhcpleased 64181 48342 0 0 3 0x14200 bored smr 26611 186254 0 0 2 0x14200 zerothread 89534 143537 0 0 3 0x14200 aiodoned aiodoned 17830 214810 0 0 3 0x14200 syncer update 2723 442040 0 0 3 0x14200 cleaner cleaner 85942 372345 0 0 2 0x14200 reaper 71014 242081 0 0 3 0x14200 pgdaemon pagedaemon 86737 420911 0 0 3 0x14200 bored viomb 75601 45594 0 0 3 0x40014200 acpi0 acpi0 97225 25098 0 0 3 0x40014200 idle1 74087 185523 0 0 3 0x14200 bored softnet3 85366 443510 0 0 3 0x14200 bored softnet2 28936 438359 0 0 3 0x14200 bored softnet1 47068 130603 0 0 3 0x14200 bored softnet0 65570 202939 0 0 3 0x14200 bored systqmp 29874 273881 0 0 3 0x14200 bored systq 86635 152518 0 0 2 0x40014200 softclock 62889 20585 0 0 3 0x40014200 idle0 1 508140 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{0}> show all locks ddb{0}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim devbuf 10209 6412K 6420K 78643K 11378 0 pcb 13 12K 14K 78643K 17 0 rtable 238 6K 7K 78643K 1604 0 pf 29 8K 8K 78643K 89 0 ifaddr 44 15K 16K 78643K 170 0 ifgroup 50 2K 2K 78643K 170 0 sysctl 3 1K 1K 78643K 3 0 counters 60 35K 35K 78643K 120 0 ioctlops 0 0K 2K 78643K 124 0 iov 0 0K 20K 78643K 1177 0 mount 1 1K 1K 78643K 1 0 log 0 0K 0K 78643K 4 0 vnodes 1278 80K 80K 78643K 4387 0 UFS quota 1 32K 32K 78643K 1 0 UFS mount 5 36K 36K 78643K 5 0 shm 2 1K 9K 78643K 217 0 VM map 2 1K 1K 78643K 2 0 sem 12 0K 0K 78643K 1926 0 dirhash 12 2K 2K 78643K 12 0 ACPI 1697 195K 286K 78643K 12548 0 file desc 25 93K 117K 78643K 12987 0 sigio 1 0K 0K 78643K 1011 0 proc 56 78K 103K 78643K 2097 0 subproc 104 6K 6K 78643K 494 0 NFS srvsock 1 0K 0K 78643K 1 0 NFS daemon 1 16K 16K 78643K 1 0 ip_moptions 0 0K 0K 78643K 5451 0 in_multi 99 7K 7K 78643K 500 0 ether_multi 1 0K 0K 78643K 20 0 mrt 1 0K 0K 78643K 1 0 ISOFS mount 1 32K 32K 78643K 1 0 MSDOSFS mount 1 16K 16K 78643K 1 0 ttys 193 864K 864K 78643K 193 0 exec 0 0K 1K 78643K 2403 0 tdb 3 0K 0K 78643K 3 0 pagedep 1 8K 8K 78643K 1 0 inodedep 1 32K 32K 78643K 1 0 newblk 1 0K 0K 78643K 1 0 VM swap 8 62K 64K 78643K 10 0 UVM amap 476 95K 107K 78643K 128885 0 UVM aobj 131 7K 7K 78643K 134 0 memdesc 1 4K 4K 78643K 1 0 crypto data 1 1K 1K 78643K 1 0 ip6_options 0 0K 0K 78643K 346 0 NDP 11 0K 2K 78643K 117 0 temp 74 5920K 6048K 78643K 35493 0 kqueue 12 18K 32K 78643K 1299 0 SYN cache 2 16K 16K 78643K 2 0 ddb{0}> show all pools Name Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle plcache 128 22 0 0 1 0 1 1 0 8 0 rtpcb 120 776 0 773 12 11 1 3 0 8 0 rtentry 112 462 0 350 4 0 4 4 0 8 0 unpcb 144 7063 0 7050 78 77 1 8 0 8 0 syncache 304 158 0 158 24 23 1 1 0 8 1 sackhl 24 1 0 1 1 1 0 1 0 8 0 tcpqe 32 471 0 469 21 20 1 1 0 8 0 tcpcb 808 5251 0 5207 120 109 11 15 0 8 3 arp 120 82 0 63 1 0 1 1 0 8 0 ipq 40 12 0 11 7 6 1 1 0 8 0 ipqe 40 105 0 104 7 6 1 1 0 8 0 inpcb 368 20271 0 20152 202 191 11 23 0 8 0 nd6 136 131 0 106 1 0 1 1 0 8 0 kcovpl 48 38 0 30 1 0 1 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 1832 0 1371 30 1 29 30 0 8 0 art_table 32 1833 0 1371 4 0 4 4 0 8 0 art_node 16 461 0 359 1 0 1 1 0 8 0 semupl 112 3 0 3 1 1 0 1 0 8 0 semapl 112 1921 0 1911 1 0 1 1 0 8 0 shmpl 112 131 0 3 4 0 4 4 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 18810 0 17358 92 0 92 92 0 8 0 ffsino 272 18810 0 17358 98 0 98 98 0 8 0 nchpl 144 35966 0 34322 63 0 63 63 0 8 0 uvmvnodes 80 5926 0 0 121 0 121 121 0 8 0 vnodes 216 5926 0 0 330 0 330 330 0 8 0 namei 1024 122184 0 122184 6 5 1 2 0 8 1 percpumem 16 73 0 30 1 0 1 1 0 8 0 kstatmem 264 82 0 60 2 0 2 2 0 8 0 scxspl 216 118470 0 118470 41 38 3 8 1 8 3 plimitpl 152 2168 0 2144 18 16 2 2 0 8 1 sigapl 424 13221 0 13167 7 0 7 7 0 8 0 futexpl 64 106692 0 106686 4 3 1 1 0 8 0 knotepl 120 813 0 0 10 0 10 10 0 8 0 kqueuepl 216 3108 0 3100 51 50 1 5 0 8 0 pipepl 320 2703 0 2675 71 65 6 13 0 8 3 fdescpl 496 13203 0 13167 7 2 5 6 0 8 0 filepl 152 87744 0 87436 135 122 13 21 0 8 0 lockfpl 104 2957 0 2954 2 1 1 2 0 8 0 lockfspl 48 1061 0 1058 1 0 1 1 0 8 0 sessionpl 144 53 0 37 1 0 1 1 0 8 0 pgrppl 48 143 0 127 1 0 1 1 0 8 0 ucredpl 104 14334 0 14316 1 0 1 1 0 8 0 zombiepl 144 13168 0 13167 1 0 1 1 0 8 0 processpl 1072 13221 0 13167 4 0 4 4 0 8 0 procpl 680 36266 0 36187 16 8 8 8 0 8 0 srpgc 96 1 0 1 1 1 0 1 0 8 0 sosppl 168 149 0 147 11 10 1 1 0 8 0 sockpl 488 28562 0 28429 448 430 18 37 0 8 0 mcl64k 65536 41 0 0 5 2 3 3 0 8 0 mcl16k 16384 41 0 0 6 3 3 3 0 8 0 mcl12k 12288 17 0 0 2 0 2 2 0 8 0 mcl9k 9216 17 0 0 2 0 2 2 0 8 0 mcl8k 8192 25 0 0 4 1 3 3 0 8 0 mcl4k 4096 47 0 0 4 0 4 4 0 8 0 mcl2k2 2112 10 0 0 1 0 1 1 0 8 0 mcl2k 2048 375 0 0 35 12 23 35 0 8 0 mtagpl 96 5 0 0 1 0 1 1 0 8 0 mbufpl 256 1573 0 0 73 0 73 73 0 8 0 bufpl 288 26750 0 20424 454 2 452 453 0 8 0 anonpl 24 1360036 0 1348459 222 127 95 115 0 186 3 amapchunkpl 152 414614 0 413653 154 113 41 54 0 158 3 amappl16 200 28176 0 27870 145 119 26 40 0 8 8 amappl15 192 15 0 15 2 2 0 1 0 8 0 amappl14 184 241 0 226 2 1 1 2 0 8 0 amappl13 176 9 0 9 1 1 0 1 0 8 0 amappl12 168 14283 0 14245 2 0 2 2 0 8 0 amappl11 160 65 0 54 1 0 1 1 0 8 0 amappl10 152 81 0 66 1 0 1 1 0 8 0 amappl9 144 315 0 314 1 0 1 1 0 8 0 amappl8 136 777 0 590 7 0 7 7 0 8 0 amappl7 128 135 0 119 2 0 2 2 0 8 0 amappl6 120 614 0 594 2 1 1 2 0 8 0 amappl5 112 605 0 596 1 0 1 1 0 8 0 amappl4 104 1065 0 1023 3 1 2 3 0 8 0 amappl3 96 79904 0 79799 4 1 3 4 0 8 0 amappl2 88 13906 0 13821 3 1 2 3 0 8 0 amappl1 80 55722 0 55191 22 10 12 22 0 8 0 amappl 88 127476 0 127189 8 1 7 8 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 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 133 0 3 3 0 3 3 0 8 0 uaddrrnd 24 13203 0 13167 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 13203 0 13167 1 0 1 1 0 8 0 vmmpekpl 168 106552 0 106491 4 0 4 4 0 8 0 vmmpepl 168 780674 0 778091 282 156 126 130 0 357 7 vmsppl 464 13202 0 13167 7 2 5 6 0 8 0 rwobjpl 56 197362 0 189831 123 13 110 111 0 8 1 pdppl 4096 26414 0 26334 483 401 82 92 0 8 2 pvpl 32 3906174 0 3887885 544 343 201 363 0 265 34 pmappl 248 13202 0 13167 4 1 3 3 0 8 0 extentpl 40 56 0 38 1 0 1 1 0 8 0 phpool 112 1635 0 737 27 0 27 27 0 8 0 ddb{0}> machine ddbcpu 0 Invalid cpu 0 ddb{0}> trace db_enter() at db_enter+0x1c sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff8279f709) at panic+0x17b sys/kern/subr_prf.c:198 __assert(ffffffff8281d9e3,ffffffff8283c03e,2bb,ffffffff827a18af) at __assert+0x29 sys/kern/subr_prf.c:157 splraise(e3a31f25) at splraise+0xb4 sys/arch/amd64/amd64/intr.c:699 mtx_enter_try(fffffd806f27c870) at mtx_enter_try+0x73 sys/kern/kern_lock.c:291 mtx_enter(fffffd806f27c870) at mtx_enter+0x4f sys/kern/kern_lock.c:266 knote_remove(ffff8000211d87f8,fffffd806f27c870,fffffd806f27c8f8,3,0) at knote_remove+0x20d sys/kern/kern_event.c:1881 knote_fdclose(ffff8000211d87f8,3) at knote_fdclose+0xae sys/kern/kern_event.c:1934 fdfree(ffff8000211d87f8) at fdfree+0xdf sys/kern/kern_descrip.c:1196 exit1(ffff8000211d87f8,0,0,1) at exit1+0x3e4 sys/kern/kern_exit.c:206 sys_exit(ffff8000211d87f8,ffff80002adc9290,ffff80002adc92e0) at sys_exit+0x1a sys/kern/kern_exit.c:89 syscall(ffff80002adc9360) at syscall+0x5e2 mi_syscall sys/sys/syscall_mi.h:110 [inline] syscall(ffff80002adc9360) at syscall+0x5e2 sys/arch/amd64/amd64/trap.c:623 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7258bf8ced50, count: -13 ddb{0}> machine ddbcpu 1 Stopped at x86_ipi_db+0x1e: addq $0x8,%rsp x86_ipi_db(ffff800020d58ff0) at x86_ipi_db+0x1e sys/arch/amd64/amd64/db_interface.c:393 x86_ipi_handler() at x86_ipi_handler+0xb7 sys/arch/amd64/amd64/ipi.c:106 Xresume_lapic_ipi() at Xresume_lapic_ipi+0x27 __sanitizer_cov_trace_pc() at __sanitizer_cov_trace_pc+0x29 kd_curproc sys/dev/kcov.c:589 [inline] __sanitizer_cov_trace_pc() at __sanitizer_cov_trace_pc+0x29 sys/dev/kcov.c:158 __mp_lock(ffffffff82d841f0) at __mp_lock+0x133 __mp_lock_spin sys/kern/kern_lock.c:116 [inline] __mp_lock(ffffffff82d841f0) at __mp_lock+0x133 sys/kern/kern_lock.c:147 syscall(ffff800022cfd870) at syscall+0x5cd mi_syscall sys/sys/syscall_mi.h:110 [inline] syscall(ffff800022cfd870) at syscall+0x5cd sys/arch/amd64/amd64/trap.c:623 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x783218361c60, count: 8 ddb{1}> trace x86_ipi_db(ffff800020d58ff0) at x86_ipi_db+0x1e sys/arch/amd64/amd64/db_interface.c:393 x86_ipi_handler() at x86_ipi_handler+0xb7 sys/arch/amd64/amd64/ipi.c:106 Xresume_lapic_ipi() at Xresume_lapic_ipi+0x27 __sanitizer_cov_trace_pc() at __sanitizer_cov_trace_pc+0x29 kd_curproc sys/dev/kcov.c:589 [inline] __sanitizer_cov_trace_pc() at __sanitizer_cov_trace_pc+0x29 sys/dev/kcov.c:158 __mp_lock(ffffffff82d841f0) at __mp_lock+0x133 __mp_lock_spin sys/kern/kern_lock.c:116 [inline] __mp_lock(ffffffff82d841f0) at __mp_lock+0x133 sys/kern/kern_lock.c:147 syscall(ffff800022cfd870) at syscall+0x5cd mi_syscall sys/sys/syscall_mi.h:110 [inline] syscall(ffff800022cfd870) at syscall+0x5cd sys/arch/amd64/amd64/trap.c:623 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x783218361c60, count: -7