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(ffffffff818cdb14,ffff800021196f70,ffff8000210d9080,ffff80000002f180) at __assert+0x24 sys/kern/subr_prf.c:155 _kernel_lock(ffff8000210d9080,ffff800021192000) 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,ffff800000ad7000,ffffffffffffffff,0,9,ffff8000210d9080) at alltraps_kern+0x7b ptsignal(24ac,ffff8000210d9080,ffff8000210befd8) at ptsignal+0x115 sys/kern/kern_sig.c:932 mi_switch() at mi_switch+0x1fb sys/kern/sched_bsd.c:392 sleep_finish(1,ffff800021197200) at sleep_finish+0xd3 sys/kern/kern_synch.c:312 sleep_finish_all(ffff800021197200,32) at sleep_finish_all+0x22 sleep_finish_timeout sys/kern/kern_synch.c:336 [inline] sleep_finish_all(ffff800021197200,32) at sleep_finish_all+0x22 sys/kern/kern_synch.c:157 tsleep(ffff8000210d9080,3,0,ffff8000210bf0a0) at tsleep+0x142 single_thread_set(ffff8000210d9080,ffff8000210d9080,0) at single_thread_set+0x28b single_thread_wait sys/kern/kern_sig.c:2039 [inline] single_thread_set(ffff8000210d9080,ffff8000210d9080,0) at single_thread_set+0x28b sys/kern/kern_sig.c:2030 exit1(ffff8000210d9080,9,0) at exit1+0x84 sys/kern/kern_exit.c:137 end trace frame: 0xffff8000211973d0, 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{0}> ddb{0}> set $lines = 0 ddb{0}> 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{0}> 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(ffffffff818cdb14,ffff800021196f70,ffff8000210d9080,ffff80000002f180) at __assert+0x24 sys/kern/subr_prf.c:155 _kernel_lock(ffff8000210d9080,ffff800021192000) 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,ffff800000ad7000,ffffffffffffffff,0,9,ffff8000210d9080) at alltraps_kern+0x7b ptsignal(24ac,ffff8000210d9080,ffff8000210befd8) at ptsignal+0x115 sys/kern/kern_sig.c:932 mi_switch() at mi_switch+0x1fb sys/kern/sched_bsd.c:392 sleep_finish(1,ffff800021197200) at sleep_finish+0xd3 sys/kern/kern_synch.c:312 sleep_finish_all(ffff800021197200,32) at sleep_finish_all+0x22 sleep_finish_timeout sys/kern/kern_synch.c:336 [inline] sleep_finish_all(ffff800021197200,32) at sleep_finish_all+0x22 sys/kern/kern_synch.c:157 tsleep(ffff8000210d9080,3,0,ffff8000210bf0a0) at tsleep+0x142 single_thread_set(ffff8000210d9080,ffff8000210d9080,0) at single_thread_set+0x28b single_thread_wait sys/kern/kern_sig.c:2039 [inline] single_thread_set(ffff8000210d9080,ffff8000210d9080,0) at single_thread_set+0x28b sys/kern/kern_sig.c:2030 exit1(ffff8000210d9080,9,0) at exit1+0x84 sys/kern/kern_exit.c:137 postsig(100,ffff8000210d9080) at postsig+0x3ea sigexit sys/kern/kern_sig.c:1488 [inline] postsig(100,ffff8000210d9080) 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,bc642b1fe00,53,0,bc69ac4a7e0) at Xsyscall+0x128 end of kernel end trace frame: 0xbc698d00310, count: -18 ddb{0}> show registers rdi 0xffffffff81e4f760 kprintf_mutex rsi 0xffffffff817daed9 db_enter+0x9 rbp 0xffff800021196ed0 rbx 0xffff800021196f70 rdx 0xffff800000ad7000 rcx 0x3e01 __ALIGN_SIZE+0x2e01 rax 0xffff800000ad7000 r8 0xffff800021196ea0 r9 0x8080808080808080 r10 0xa1049a793a0dbe34 r11 0xffffffff8152ca90 x86_bus_space_io_read_1 r12 0x3000000008 r13 0xffff800021196ee0 r14 0x100 r15 0xffffffff81bf7ab8 cmd0646_9_tim_udma+0x20b37 rip 0xffffffff817daeda db_enter+0xa cs 0x8 rflags 0x202 rsp 0xffff800021196ed0 ss 0x10 db_enter+0xa: popq %rbp ddb{0}> show proc PROC (syz-executor0) pid=24921 stat=sleep flags process=1000 proc=4002000 pri=50, usrpri=83, nice=20 forw=0x0, list=0xffff8000210d9788,0xffff8000210d9540 process=0xffff8000210befd8 user=0xffff800021192000, vmspace=0xffffff007f124e70 estcpu=33, cpticks=0, pctcpu=1.2 user=0, sys=0, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND 53325 59090 76114 0 2 0 syz-executor1 53325 254011 76114 0 2 0x4000000 syz-executor1 *18754 24921 54517 0 3 0x4003000 suspend syz-executor0 18754 120268 54517 0 2 0x4081080 syz-executor0 11088 293010 1 0 3 0x100083 ttyin getty 2740 287472 0 0 3 0x14200 bored sosplice 76114 74986 9307 0 3 0x82 nanosleep syz-executor1 54517 117732 9307 0 3 0x82 nanosleep syz-executor0 9307 162062 4105 0 3 0x82 thrsleep syz-fuzzer 9307 388252 4105 0 3 0x4000082 nanosleep syz-fuzzer 9307 220092 4105 0 3 0x4000082 thrsleep syz-fuzzer 9307 507422 4105 0 3 0x4000082 thrsleep syz-fuzzer 9307 289224 4105 0 3 0x4000082 thrsleep syz-fuzzer 9307 341301 4105 0 3 0x4000082 thrsleep syz-fuzzer 9307 134729 4105 0 3 0x4000082 thrsleep syz-fuzzer 9307 72916 4105 0 3 0x4000082 thrsleep syz-fuzzer 9307 165338 4105 0 3 0x4000082 thrsleep syz-fuzzer 9307 281485 4105 0 3 0x4000082 thrsleep syz-fuzzer 9307 168025 4105 0 3 0x4000082 kqread syz-fuzzer 4105 45708 45231 0 3 0x10008a pause ksh 45231 92682 7090 0 3 0x92 select sshd 7090 203347 1 0 3 0x80 select sshd 66023 269011 13504 73 3 0x100090 kqread syslogd 13504 275173 1 0 3 0x100082 netio syslogd 9478 469853 1 77 3 0x100090 poll dhclient 49477 323769 1 0 3 0x80 poll dhclient 2322 49472 0 0 2 0x14200 zerothread 59125 410633 0 0 3 0x14200 aiodoned aiodoned 96043 293815 0 0 3 0x14200 syncer update 5946 422777 0 0 3 0x14200 cleaner cleaner 88905 210922 0 0 3 0x14200 reaper reaper 44634 330153 0 0 3 0x14200 pgdaemon pagedaemon 21541 508904 0 0 3 0x14200 bored crynlk 89159 102936 0 0 3 0x14200 bored crypto 68746 480598 0 0 3 0x40014200 acpi0 acpi0 28368 340794 0 0 3 0x40014200 idle1 25982 89819 0 0 3 0x14200 bored softnet 32693 240754 0 0 3 0x14200 bored systqmp 51940 461624 0 0 3 0x14200 bored systq 21193 129253 0 0 3 0x40014200 bored softclock 21802 70745 0 0 3 0x40014200 idle0 1 158467 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper