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(ffffffff81209224,ffff8000211cf730,ffff8000210a3080,ffff800000038e80) at __assert+0x24 sys/kern/subr_prf.c:155 _kernel_lock(ffff8000210a3080,ffff8000211ca000) 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,ffff8000040dc000,ffffffffffffffff,0,9,ffff8000210a2270) at alltraps_kern+0x7b ptsignal(2bb3,ffff8000210a3080,ffff8000210b6018) at ptsignal+0x115 sys/kern/kern_sig.c:944 mi_switch() at mi_switch+0x1fb sys/kern/sched_bsd.c:392 sleep_finish(1,ffff8000211cf9c0) at sleep_finish+0xd3 sys/kern/kern_synch.c:312 sleep_finish_all(ffff8000211cf9c0,32) at sleep_finish_all+0x22 sleep_finish_timeout sys/kern/kern_synch.c:336 [inline] sleep_finish_all(ffff8000211cf9c0,32) at sleep_finish_all+0x22 sys/kern/kern_synch.c:157 tsleep(ffff8000210a3080,3,0,ffff8000210b60e0) at tsleep+0x142 single_thread_set(ffff8000210a3080,ffff8000210a3080,0) at single_thread_set+0x28b single_thread_wait sys/kern/kern_sig.c:2051 [inline] single_thread_set(ffff8000210a3080,ffff8000210a3080,0) at single_thread_set+0x28b sys/kern/kern_sig.c:2042 exit1(ffff8000210a3080,9,0) at exit1+0x84 sys/kern/kern_exit.c:137 end trace frame: 0xffff8000211cfb90, 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(ffffffff81209224,ffff8000211cf730,ffff8000210a3080,ffff800000038e80) at __assert+0x24 sys/kern/subr_prf.c:155 _kernel_lock(ffff8000210a3080,ffff8000211ca000) 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,ffff8000040dc000,ffffffffffffffff,0,9,ffff8000210a2270) at alltraps_kern+0x7b ptsignal(2bb3,ffff8000210a3080,ffff8000210b6018) at ptsignal+0x115 sys/kern/kern_sig.c:944 mi_switch() at mi_switch+0x1fb sys/kern/sched_bsd.c:392 sleep_finish(1,ffff8000211cf9c0) at sleep_finish+0xd3 sys/kern/kern_synch.c:312 sleep_finish_all(ffff8000211cf9c0,32) at sleep_finish_all+0x22 sleep_finish_timeout sys/kern/kern_synch.c:336 [inline] sleep_finish_all(ffff8000211cf9c0,32) at sleep_finish_all+0x22 sys/kern/kern_synch.c:157 tsleep(ffff8000210a3080,3,0,ffff8000210b60e0) at tsleep+0x142 single_thread_set(ffff8000210a3080,ffff8000210a3080,0) at single_thread_set+0x28b single_thread_wait sys/kern/kern_sig.c:2051 [inline] single_thread_set(ffff8000210a3080,ffff8000210a3080,0) at single_thread_set+0x28b sys/kern/kern_sig.c:2042 exit1(ffff8000210a3080,9,0) at exit1+0x84 sys/kern/kern_exit.c:137 postsig(100,ffff8000210a3080) at postsig+0x3ea sigexit sys/kern/kern_sig.c:1500 [inline] postsig(100,ffff8000210a3080) 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,2fa00497800,53,0,2fa6cb206c0) at Xsyscall+0x128 end of kernel end trace frame: 0x2f97b427810, count: -18 ddb{1}> show registers rdi 0xffffffff81e1bfa0 kprintf_mutex rsi 0xffffffff819de6e9 db_enter+0x9 rbp 0xffff8000211cf690 rbx 0xffff8000211cf730 rdx 0xffff8000040dc000 rcx 0x33e7 __ALIGN_SIZE+0x23e7 rax 0xffff8000040dc000 r8 0xffff8000211cf660 r9 0x8080808080808080 r10 0x30db75ac933220b7 r11 0xffffffff81190360 x86_bus_space_io_read_1 r12 0x3000000008 r13 0xffff8000211cf6a0 r14 0x100 r15 0xffffffff81bf25e3 cmd0646_9_tim_udma+0x1f2b1 rip 0xffffffff819de6ea db_enter+0xa cs 0x8 rflags 0x206 rsp 0xffff8000211cf690 ss 0x10 db_enter+0xa: popq %rbp ddb{1}> show proc PROC (syz-executor1) pid=99477 stat=sleep flags process=1010 proc=4002000 pri=50, usrpri=86, nice=20 forw=0x0, list=0xffff8000210a2720,0xffff8000210a2e38 process=0xffff8000210b6018 user=0xffff8000211ca000, vmspace=0xffffff00658ab428 estcpu=36, cpticks=0, pctcpu=0.0 user=0, sys=0, intr=0 ddb{1}> ps PID TID PPID UID S FLAGS WAIT COMMAND 42958 333281 56197 65534 2 0x81010 syz-executor1 *42958 99477 56197 65534 3 0x4003010 suspend syz-executor1 30808 240629 23174 65534 2 0x10 syz-executor0 30808 454326 23174 65534 3 0x4000090 fsleep syz-executor0 30808 181436 23174 65534 2 0x4000010 syz-executor0 23174 377360 92296 65534 3 0x90 nanosleep syz-executor0 92296 410313 85589 0 3 0x82 wait syz-executor0 56197 515390 68987 65534 3 0x90 nanosleep syz-executor1 68987 457596 85589 0 3 0x82 wait syz-executor1 8647 243847 0 0 3 0x14200 bored sosplice 85589 154533 2233 0 3 0x82 thrsleep syz-fuzzer 85589 241634 2233 0 3 0x4000082 thrsleep syz-fuzzer 85589 9986 2233 0 3 0x4000082 thrsleep syz-fuzzer 85589 237470 2233 0 3 0x4000082 thrsleep syz-fuzzer 85589 98973 2233 0 3 0x4000082 thrsleep syz-fuzzer 85589 370307 2233 0 3 0x4000082 thrsleep syz-fuzzer 85589 98674 2233 0 3 0x4000082 thrsleep syz-fuzzer 85589 485387 2233 0 3 0x4000082 thrsleep syz-fuzzer 85589 45655 2233 0 3 0x4000082 thrsleep syz-fuzzer 85589 100442 2233 0 3 0x4000082 kqread syz-fuzzer 2233 203509 46236 0 3 0x10008a pause ksh 46236 311811 69442 0 3 0x92 select sshd 34801 143797 1 0 3 0x100083 ttyin getty 69442 341562 1 0 3 0x80 select sshd 85363 180227 8384 73 3 0x100090 kqread syslogd 8384 306826 1 0 3 0x100082 netio syslogd 34994 43531 1 77 3 0x100090 poll dhclient 75798 40429 1 0 3 0x80 poll dhclient 85299 338262 0 0 2 0x14200 zerothread 11067 6950 0 0 3 0x14200 aiodoned aiodoned 33481 317642 0 0 3 0x14200 syncer update 49399 8270 0 0 3 0x14200 cleaner cleaner 51443 472365 0 0 3 0x14200 reaper reaper 40726 184976 0 0 3 0x14200 pgdaemon pagedaemon 97356 408485 0 0 3 0x14200 bored crynlk 156 74267 0 0 3 0x14200 bored crypto 40998 375449 0 0 3 0x40014200 acpi0 acpi0 40655 131798 0 0 3 0x40014200 idle1 79271 187719 0 0 3 0x14200 bored softnet 73937 180456 0 0 3 0x14200 bored systqmp 78681 21778 0 0 3 0x14200 bored systq 32574 300446 0 0 3 0x40014200 bored softclock 69700 208141 0 0 3 0x40014200 idle0 1 289273 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper