panic: kernel diagnostic assertion "__mp_lock_held(&sched_lock, curcpu()) == 0" failed: file "/syzkaller/managers/setuid/kernel/sys/kern/kern_lock.c", line 63 Stopped at db_enter+0xa: popq %rbp TID PID UID PRFLAGS PFLAGS CPU COMMAND db_enter() at db_enter+0xa sys/arch/amd64/amd64/db_interface.c:399 panic() at panic+0x147 sys/kern/subr_prf.c:208 __assert(ffffffff819f3a94,ffff8000211e0b90,ffff8000210a2270,ffff800000038e80) at __assert+0x24 sys/kern/subr_prf.c:155 _kernel_lock(ffff8000210a2270,ffff8000211dc000) at _kernel_lock+0x125 sys/kern/kern_lock.c:63 pageflttrap() at pageflttrap+0x6c sys/arch/amd64/amd64/trap.c:163 kerntrap(9) at kerntrap+0x8d sys/arch/amd64/amd64/trap.c:294 alltraps_kern(6,ffff800000cd6000,ffffffffffffffff,0,9,ffff8000210a2270) at alltraps_kern+0x7b ptsignal(2185,ffff8000210a2270,ffff8000210b6cb8) at ptsignal+0x115 sys/kern/kern_sig.c:944 mi_switch() at mi_switch+0x1fb sys/kern/sched_bsd.c:392 sleep_finish(1,ffff8000211e0e20) at sleep_finish+0xd3 sys/kern/kern_synch.c:312 sleep_finish_all(ffff8000211e0e20,32) at sleep_finish_all+0x22 sleep_finish_timeout sys/kern/kern_synch.c:336 [inline] sleep_finish_all(ffff8000211e0e20,32) at sleep_finish_all+0x22 sys/kern/kern_synch.c:157 tsleep(ffff8000210a2270,3,0,ffff8000210b6d80) at tsleep+0x142 single_thread_set(ffff8000210a2270,ffff8000210a2270,0) at single_thread_set+0x28b single_thread_wait sys/kern/kern_sig.c:2051 [inline] single_thread_set(ffff8000210a2270,ffff8000210a2270,0) at single_thread_set+0x28b sys/kern/kern_sig.c:2042 exit1(ffff8000210a2270,9,0) at exit1+0x84 sys/kern/kern_exit.c:137 end trace frame: 0xffff8000211e0ff0, 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{1}> ddb{1}> set $lines = 0 ddb{1}> show panic kernel diagnostic assertion "__mp_lock_held(&sched_lock, curcpu()) == 0" failed: file "/syzkaller/managers/setuid/kernel/sys/kern/kern_lock.c", line 63 ddb{1}> trace db_enter() at db_enter+0xa sys/arch/amd64/amd64/db_interface.c:399 panic() at panic+0x147 sys/kern/subr_prf.c:208 __assert(ffffffff819f3a94,ffff8000211e0b90,ffff8000210a2270,ffff800000038e80) at __assert+0x24 sys/kern/subr_prf.c:155 _kernel_lock(ffff8000210a2270,ffff8000211dc000) at _kernel_lock+0x125 sys/kern/kern_lock.c:63 pageflttrap() at pageflttrap+0x6c sys/arch/amd64/amd64/trap.c:163 kerntrap(9) at kerntrap+0x8d sys/arch/amd64/amd64/trap.c:294 alltraps_kern(6,ffff800000cd6000,ffffffffffffffff,0,9,ffff8000210a2270) at alltraps_kern+0x7b ptsignal(2185,ffff8000210a2270,ffff8000210b6cb8) at ptsignal+0x115 sys/kern/kern_sig.c:944 mi_switch() at mi_switch+0x1fb sys/kern/sched_bsd.c:392 sleep_finish(1,ffff8000211e0e20) at sleep_finish+0xd3 sys/kern/kern_synch.c:312 sleep_finish_all(ffff8000211e0e20,32) at sleep_finish_all+0x22 sleep_finish_timeout sys/kern/kern_synch.c:336 [inline] sleep_finish_all(ffff8000211e0e20,32) at sleep_finish_all+0x22 sys/kern/kern_synch.c:157 tsleep(ffff8000210a2270,3,0,ffff8000210b6d80) at tsleep+0x142 single_thread_set(ffff8000210a2270,ffff8000210a2270,0) at single_thread_set+0x28b single_thread_wait sys/kern/kern_sig.c:2051 [inline] single_thread_set(ffff8000210a2270,ffff8000210a2270,0) at single_thread_set+0x28b sys/kern/kern_sig.c:2042 exit1(ffff8000210a2270,9,0) at exit1+0x84 sys/kern/kern_exit.c:137 postsig(100,ffff8000210a2270) at postsig+0x3ea sigexit sys/kern/kern_sig.c:1500 [inline] postsig(100,ffff8000210a2270) at postsig+0x3ea sys/kern/kern_sig.c:1432 userret(0) at userret+0x11b sys/kern/kern_sig.c:1882 syscall(0) at syscall+0x54d mi_syscall_return sys/sys/syscall_mi.h:122 [inline] syscall(0) at syscall+0x54d sys/arch/amd64/amd64/trap.c:605 Xsyscall(6,58,5878bc03000,53,0,5879e87d500) at Xsyscall+0x128 end of kernel end trace frame: 0x58763d370d0, count: -18 ddb{1}> show registers rdi 0xffffffff81e53b20 kprintf_mutex rsi 0xffffffff817b5c89 db_enter+0x9 rbp 0xffff8000211e0af0 rbx 0xffff8000211e0b90 rdx 0xffff800000cd6000 rcx 0x3c6b __ALIGN_SIZE+0x2c6b rax 0xffff800000cd6000 r8 0xffff8000211e0ac0 r9 0x8080808080808080 r10 0xa8250e04ac73269c r11 0xffffffff81a1a540 x86_bus_space_io_read_1 r12 0x3000000008 r13 0xffff8000211e0b00 r14 0x100 r15 0xffffffff81bf67d0 cmd0646_9_tim_udma+0x20a53 rip 0xffffffff817b5c8a db_enter+0xa cs 0x8 rflags 0x202 rsp 0xffff8000211e0af0 ss 0x10 db_enter+0xa: popq %rbp ddb{1}> show proc PROC (syz-executor1) pid=375518 stat=sleep flags process=1010 proc=4002000 pri=50, usrpri=86, nice=20 forw=0x0, list=0xffff8000210a3530,0xffffffff81eefd60 process=0xffff8000210b6cb8 user=0xffff8000211dc000, vmspace=0xffffff00657ab320 estcpu=36, cpticks=0, pctcpu=0.0 user=0, sys=0, intr=0 ddb{1}> ps PID TID PPID UID S FLAGS WAIT COMMAND 16410 449504 66060 65534 2 0x4081010 syz-executor1 *16410 375518 66060 65534 3 0x4003010 suspend syz-executor1 74797 350006 96271 65534 2 0x10 syz-executor0 74797 504687 96271 65534 3 0x4000090 ttyin syz-executor0 74797 81396 96271 65534 2 0x4000010 syz-executor0 66060 152881 16040 65534 3 0x90 nanosleep syz-executor1 16040 80324 12455 0 3 0x82 wait syz-executor1 96271 198898 11226 65534 3 0x90 nanosleep syz-executor0 11226 15554 12455 0 3 0x82 wait syz-executor0 27670 110208 0 0 3 0x14200 bored sosplice 12455 478562 75245 0 3 0x82 thrsleep syz-fuzzer 12455 262324 75245 0 3 0x4000082 thrsleep syz-fuzzer 12455 122784 75245 0 3 0x4000082 thrsleep syz-fuzzer 12455 53060 75245 0 3 0x4000082 kqread syz-fuzzer 12455 118344 75245 0 3 0x4000082 thrsleep syz-fuzzer 12455 129671 75245 0 3 0x4000082 thrsleep syz-fuzzer 12455 177303 75245 0 3 0x4000082 thrsleep syz-fuzzer 12455 470320 75245 0 3 0x4000082 thrsleep syz-fuzzer 12455 24269 75245 0 3 0x4000082 thrsleep syz-fuzzer 12455 423683 75245 0 3 0x4000082 thrsleep syz-fuzzer 12455 352354 75245 0 3 0x4000082 thrsleep syz-fuzzer 12455 75469 75245 0 3 0x4000082 thrsleep syz-fuzzer 75245 407508 95516 0 3 0x10008a pause ksh 95516 350045 65074 0 3 0x92 select sshd 25170 435886 1 0 3 0x100083 ttyin getty 65074 275025 1 0 3 0x80 select sshd 39060 306422 93105 73 3 0x100090 kqread syslogd 93105 134626 1 0 3 0x100082 netio syslogd 90480 37692 1 77 3 0x100090 poll dhclient 10773 496565 1 0 3 0x80 poll dhclient 75534 226009 0 0 2 0x14200 zerothread 41000 68627 0 0 3 0x14200 aiodoned aiodoned 80774 152700 0 0 3 0x14200 syncer update 94792 257364 0 0 3 0x14200 cleaner cleaner 87 222760 0 0 3 0x14200 reaper reaper 41667 225269 0 0 3 0x14200 pgdaemon pagedaemon 77161 204500 0 0 3 0x14200 bored crynlk 7696 410279 0 0 3 0x14200 bored crypto 13747 361241 0 0 3 0x40014200 acpi0 acpi0 90171 390426 0 0 3 0x40014200 idle1 98958 384261 0 0 3 0x14200 bored softnet 7245 93 0 0 3 0x14200 bored systqmp 49029 363296 0 0 3 0x14200 bored systq 63565 151904 0 0 3 0x40014200 bored softclock 999 392910 0 0 3 0x40014200 idle0 1 495193 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper