panic: kernel diagnostic assertion "__mp_lock_held(&sched_lock, curcpu()) == 0" failed: file "/syzkaller/managers/multicore/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(ffffffff81948d04,ffff8000211e2c00,ffff8000210a39e0,ffff800000038e80) at __assert+0x24 sys/kern/subr_prf.c:155 _kernel_lock(ffff8000210a39e0,ffff8000211de000) 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,ffff800000cd7000,ffffffffffffffff,0,9,ffff8000210a39e0) at alltraps_kern+0x7b ptsignal(3648,ffff8000210a39e0,ffff8000210be988) at ptsignal+0x115 sys/kern/kern_sig.c:932 mi_switch() at mi_switch+0x1fb sys/kern/sched_bsd.c:392 sleep_finish(1,ffff8000211e2e90) at sleep_finish+0xd3 sys/kern/kern_synch.c:312 sleep_finish_all(ffff8000211e2e90,32) at sleep_finish_all+0x22 sleep_finish_timeout sys/kern/kern_synch.c:336 [inline] sleep_finish_all(ffff8000211e2e90,32) at sleep_finish_all+0x22 sys/kern/kern_synch.c:157 tsleep(ffff8000210a39e0,3,0,ffff8000210bea50) at tsleep+0x142 single_thread_set(ffff8000210a39e0,ffff8000210a39e0,0) at single_thread_set+0x28b single_thread_wait sys/kern/kern_sig.c:2039 [inline] single_thread_set(ffff8000210a39e0,ffff8000210a39e0,0) at single_thread_set+0x28b sys/kern/kern_sig.c:2030 exit1(ffff8000210a39e0,9,0) at exit1+0x84 sys/kern/kern_exit.c:137 end trace frame: 0xffff8000211e3060, 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/multicore/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(ffffffff81948d04,ffff8000211e2c00,ffff8000210a39e0,ffff800000038e80) at __assert+0x24 sys/kern/subr_prf.c:155 _kernel_lock(ffff8000210a39e0,ffff8000211de000) 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,ffff800000cd7000,ffffffffffffffff,0,9,ffff8000210a39e0) at alltraps_kern+0x7b ptsignal(3648,ffff8000210a39e0,ffff8000210be988) at ptsignal+0x115 sys/kern/kern_sig.c:932 mi_switch() at mi_switch+0x1fb sys/kern/sched_bsd.c:392 sleep_finish(1,ffff8000211e2e90) at sleep_finish+0xd3 sys/kern/kern_synch.c:312 sleep_finish_all(ffff8000211e2e90,32) at sleep_finish_all+0x22 sleep_finish_timeout sys/kern/kern_synch.c:336 [inline] sleep_finish_all(ffff8000211e2e90,32) at sleep_finish_all+0x22 sys/kern/kern_synch.c:157 tsleep(ffff8000210a39e0,3,0,ffff8000210bea50) at tsleep+0x142 single_thread_set(ffff8000210a39e0,ffff8000210a39e0,0) at single_thread_set+0x28b single_thread_wait sys/kern/kern_sig.c:2039 [inline] single_thread_set(ffff8000210a39e0,ffff8000210a39e0,0) at single_thread_set+0x28b sys/kern/kern_sig.c:2030 exit1(ffff8000210a39e0,9,0) at exit1+0x84 sys/kern/kern_exit.c:137 postsig(100,ffff8000210a39e0) at postsig+0x3ea sigexit sys/kern/kern_sig.c:1488 [inline] postsig(100,ffff8000210a39e0) at postsig+0x3ea sys/kern/kern_sig.c:1420 userret(0) at userret+0x11b sys/kern/kern_sig.c:1870 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,87831aeb000,53,0,8783b7dd0e0) at Xsyscall+0x128 end of kernel end trace frame: 0x877c76e7f70, count: -18 ddb{1}> show registers rdi 0xffffffff81e4d538 kprintf_mutex rsi 0xffffffff819bc229 db_enter+0x9 rbp 0xffff8000211e2b60 rbx 0xffff8000211e2c00 rdx 0xffff800000cd7000 rcx 0x3b7c __ALIGN_SIZE+0x2b7c rax 0xffff800000cd7000 r8 0xffff8000211e2b30 r9 0x8080808080808080 r10 0x88930a0602741720 r11 0xffffffff81410660 x86_bus_space_io_read_1 r12 0x3000000008 r13 0xffff8000211e2b70 r14 0x100 r15 0xffffffff81bf8aa7 cmd0646_9_tim_udma+0x1ef54 rip 0xffffffff819bc22a db_enter+0xa cs 0x8 rflags 0x202 rsp 0xffff8000211e2b60 ss 0x10 db_enter+0xa: popq %rbp ddb{1}> show proc PROC (syz-executor0) pid=300335 stat=sleep flags process=1000 proc=4002000 pri=50, usrpri=86, nice=20 forw=0x0, list=0xffff8000210a3c38,0xffffffff81eb5768 process=0xffff8000210be988 user=0xffff8000211de000, vmspace=0xffffff007f124c60 estcpu=36, cpticks=0, pctcpu=0.0 user=0, sys=0, intr=0 ddb{1}> ps PID TID PPID UID S FLAGS WAIT COMMAND 86834 203577 6754 0 2 0x4081080 syz-executor0 *86834 300335 6754 0 3 0x4003000 suspend syz-executor0 62517 449175 1 0 3 0x100083 ttyin getty 48173 114452 0 0 3 0x14200 bored sosplice 43956 417474 63396 0 3 0x82 nanosleep syz-executor1 6754 109448 63396 0 3 0x82 nanosleep syz-executor0 63396 171774 34847 0 3 0x82 kqread syz-fuzzer 63396 286301 34847 0 3 0x4000082 thrsleep syz-fuzzer 63396 342173 34847 0 3 0x4000082 thrsleep syz-fuzzer 63396 157979 34847 0 3 0x4000082 thrsleep syz-fuzzer 63396 67717 34847 0 3 0x4000082 thrsleep syz-fuzzer 63396 266988 34847 0 3 0x4000082 thrsleep syz-fuzzer 63396 43713 34847 0 3 0x4000082 thrsleep syz-fuzzer 63396 341421 34847 0 3 0x4000082 thrsleep syz-fuzzer 63396 267929 34847 0 3 0x4000082 thrsleep syz-fuzzer 63396 160628 34847 0 3 0x4000082 thrsleep syz-fuzzer 34847 60277 63755 0 3 0x10008a pause ksh 63755 514137 61311 0 3 0x92 select sshd 61311 510466 1 0 3 0x80 select sshd 67703 430129 82026 73 3 0x100090 kqread syslogd 82026 455936 1 0 3 0x100082 netio syslogd 55183 477818 1 77 3 0x100090 poll dhclient 49764 168152 1 0 3 0x80 poll dhclient 19872 229127 0 0 3 0x14200 pgzero zerothread 46999 178533 0 0 3 0x14200 aiodoned aiodoned 48633 314257 0 0 3 0x14200 syncer update 14420 294539 0 0 3 0x14200 cleaner cleaner 38815 223280 0 0 3 0x14200 reaper reaper 38485 261743 0 0 3 0x14200 pgdaemon pagedaemon 44430 170149 0 0 3 0x14200 bored crynlk 22955 259073 0 0 3 0x14200 bored crypto 76318 255498 0 0 3 0x40014200 acpi0 acpi0 71661 161189 0 0 3 0x40014200 idle1 57306 442497 0 0 3 0x14200 bored softnet 93717 442667 0 0 3 0x14200 bored systqmp 75743 441796 0 0 3 0x14200 bored systq 52571 106148 0 0 3 0x40014200 bored softclock 54781 16324 0 0 3 0x40014200 idle0 1 403864 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper