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(ffffffff81866be4,ffff800021193500,ffff8000210a2978,ffff800000038e80) at __assert+0x24 sys/kern/subr_prf.c:155 _kernel_lock(ffff8000210a2978,ffff80002118e000) 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,ffff800001cd8000,ffffffffffffffff,0,9,ffff8000210a2978) at alltraps_kern+0x7b ptsignal(2849,ffff8000210a2978,ffff8000210b6990) at ptsignal+0x115 sys/kern/kern_sig.c:944 mi_switch() at mi_switch+0x1fb sys/kern/sched_bsd.c:392 sleep_finish(1,ffff800021193790) at sleep_finish+0xd3 sys/kern/kern_synch.c:312 sleep_finish_all(ffff800021193790,32) at sleep_finish_all+0x22 sleep_finish_timeout sys/kern/kern_synch.c:336 [inline] sleep_finish_all(ffff800021193790,32) at sleep_finish_all+0x22 sys/kern/kern_synch.c:157 tsleep(ffff8000210a2978,3,0,ffff8000210b6a58) at tsleep+0x142 single_thread_set(ffff8000210a2978,ffff8000210a2978,0) at single_thread_set+0x28b single_thread_wait sys/kern/kern_sig.c:2051 [inline] single_thread_set(ffff8000210a2978,ffff8000210a2978,0) at single_thread_set+0x28b sys/kern/kern_sig.c:2042 exit1(ffff8000210a2978,9,0) at exit1+0x84 sys/kern/kern_exit.c:137 end trace frame: 0xffff800021193960, 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(ffffffff81866be4,ffff800021193500,ffff8000210a2978,ffff800000038e80) at __assert+0x24 sys/kern/subr_prf.c:155 _kernel_lock(ffff8000210a2978,ffff80002118e000) 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,ffff800001cd8000,ffffffffffffffff,0,9,ffff8000210a2978) at alltraps_kern+0x7b ptsignal(2849,ffff8000210a2978,ffff8000210b6990) at ptsignal+0x115 sys/kern/kern_sig.c:944 mi_switch() at mi_switch+0x1fb sys/kern/sched_bsd.c:392 sleep_finish(1,ffff800021193790) at sleep_finish+0xd3 sys/kern/kern_synch.c:312 sleep_finish_all(ffff800021193790,32) at sleep_finish_all+0x22 sleep_finish_timeout sys/kern/kern_synch.c:336 [inline] sleep_finish_all(ffff800021193790,32) at sleep_finish_all+0x22 sys/kern/kern_synch.c:157 tsleep(ffff8000210a2978,3,0,ffff8000210b6a58) at tsleep+0x142 single_thread_set(ffff8000210a2978,ffff8000210a2978,0) at single_thread_set+0x28b single_thread_wait sys/kern/kern_sig.c:2051 [inline] single_thread_set(ffff8000210a2978,ffff8000210a2978,0) at single_thread_set+0x28b sys/kern/kern_sig.c:2042 exit1(ffff8000210a2978,9,0) at exit1+0x84 sys/kern/kern_exit.c:137 postsig(100,ffff8000210a2978) at postsig+0x3ea sigexit sys/kern/kern_sig.c:1500 [inline] postsig(100,ffff8000210a2978) 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,6f8ea8c1c00,53,0,6f97b511c40) at Xsyscall+0x128 end of kernel end trace frame: 0x6f89c919350, count: -18 ddb{1}> show registers rdi 0xffffffff81e46760 kprintf_mutex rsi 0xffffffff81aee3b9 db_enter+0x9 rbp 0xffff800021193460 rbx 0xffff800021193500 rdx 0xffff800001cd8000 rcx 0x3f21 __ALIGN_SIZE+0x2f21 rax 0xffff800001cd8000 r8 0xffff800021193430 r9 0x8080808080808080 r10 0 r11 0xffffffff81112fe0 x86_bus_space_io_read_1 r12 0x3000000008 r13 0xffff800021193470 r14 0x100 r15 0xffffffff81bf55e1 cmd0646_9_tim_udma+0x1dacc rip 0xffffffff81aee3ba db_enter+0xa cs 0x8 rflags 0x206 rsp 0xffff800021193460 ss 0x10 db_enter+0xa: popq %rbp ddb{1}> show proc PROC (syz-executor1) pid=19569 stat=sleep flags process=1010 proc=4002000 pri=50, usrpri=70, nice=20 forw=0x0, list=0xffff8000210a3788,0xffff8000210a3090 process=0xffff8000210b6990 user=0xffff80002118e000, vmspace=0xffffff007f124d68 estcpu=36, cpticks=0, pctcpu=0.0 user=0, sys=0, intr=0 ddb{1}> ps PID TID PPID UID S FLAGS WAIT COMMAND 67930 305314 40457 65534 2 0x10 syz-executor0 67930 421173 40457 65534 3 0x4000010 getblk syz-executor0 67930 349570 40457 65534 3 0x4000010 inode syz-executor0 * 980 19569 20939 65534 3 0x4003010 suspend syz-executor1 980 197842 20939 65534 2 0x4081090 syz-executor1 20939 423888 59762 65534 3 0x90 nanosleep syz-executor1 59762 455848 10507 0 3 0x82 wait syz-executor1 40457 233421 19281 65534 3 0x90 nanosleep syz-executor0 19281 366583 10507 0 3 0x82 wait syz-executor0 82045 388307 0 0 3 0x14200 bored sosplice 10507 429590 52857 0 3 0x82 thrsleep syz-fuzzer 10507 433172 52857 0 3 0x4000082 thrsleep syz-fuzzer 10507 98333 52857 0 3 0x4000082 thrsleep syz-fuzzer 10507 471550 52857 0 3 0x4000082 thrsleep syz-fuzzer 10507 42703 52857 0 3 0x4000082 thrsleep syz-fuzzer 10507 312635 52857 0 3 0x4000082 thrsleep syz-fuzzer 10507 400983 52857 0 3 0x4000082 kqread syz-fuzzer 10507 343260 52857 0 3 0x4000082 thrsleep syz-fuzzer 10507 161709 52857 0 3 0x4000082 thrsleep syz-fuzzer 10507 73353 52857 0 3 0x4000082 thrsleep syz-fuzzer 52857 222424 33685 0 3 0x10008a pause ksh 33685 136930 57541 0 3 0x92 select sshd 20201 479896 1 0 3 0x100083 ttyin getty 57541 320245 1 0 3 0x80 select sshd 89134 380162 16486 73 3 0x100010 ffs_fsync syslogd 16486 351642 1 0 3 0x100082 netio syslogd 22344 419285 1 77 3 0x100090 poll dhclient 41156 372811 1 0 3 0x80 poll dhclient 276 265817 0 0 2 0x14200 zerothread 58059 338487 0 0 3 0x14200 aiodoned aiodoned 55653 257144 0 0 3 0x14200 syncer update 7952 357633 0 0 3 0x14200 cleaner cleaner 99976 394326 0 0 3 0x14200 reaper reaper 20141 302511 0 0 3 0x14200 pgdaemon pagedaemon 30824 300873 0 0 3 0x14200 bored crynlk 85491 182237 0 0 3 0x14200 bored crypto 10917 145619 0 0 3 0x40014200 acpi0 acpi0 3441 90719 0 0 3 0x40014200 idle1 7591 255155 0 0 3 0x14200 bored softnet 98969 455104 0 0 3 0x14200 bored systqmp 81867 304497 0 0 3 0x14200 bored systq 38193 139619 0 0 3 0x40014200 bored softclock 26053 60950 0 0 3 0x40014200 idle0 1 437566 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper