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(ffffffff81b07174,ffff800021154bc0,ffff800021084260,ffff800000038e80) at __assert+0x24 sys/kern/subr_prf.c:155 _kernel_lock(ffff800021084260,ffff800021150000) 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,ffff8000022d9000,ffffffffffffffff,0,9,ffff800021084260) at alltraps_kern+0x7b ptsignal(213c,ffff800021084260,ffff8000210b7c80) at ptsignal+0x115 sys/kern/kern_sig.c:932 mi_switch() at mi_switch+0x1fb sys/kern/sched_bsd.c:392 sleep_finish(1,ffff800021154e50) at sleep_finish+0xd3 sys/kern/kern_synch.c:312 sleep_finish_all(ffff800021154e50,32) at sleep_finish_all+0x22 sleep_finish_timeout sys/kern/kern_synch.c:336 [inline] sleep_finish_all(ffff800021154e50,32) at sleep_finish_all+0x22 sys/kern/kern_synch.c:157 tsleep(ffff800021084260,3,0,ffff8000210b7d48) at tsleep+0x142 single_thread_set(ffff800021084260,ffff800021084260,0) at single_thread_set+0x28b single_thread_wait sys/kern/kern_sig.c:2039 [inline] single_thread_set(ffff800021084260,ffff800021084260,0) at single_thread_set+0x28b sys/kern/kern_sig.c:2030 exit1(ffff800021084260,9,0) at exit1+0x84 sys/kern/kern_exit.c:137 end trace frame: 0xffff800021155020, 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(ffffffff81b07174,ffff800021154bc0,ffff800021084260,ffff800000038e80) at __assert+0x24 sys/kern/subr_prf.c:155 _kernel_lock(ffff800021084260,ffff800021150000) 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,ffff8000022d9000,ffffffffffffffff,0,9,ffff800021084260) at alltraps_kern+0x7b ptsignal(213c,ffff800021084260,ffff8000210b7c80) at ptsignal+0x115 sys/kern/kern_sig.c:932 mi_switch() at mi_switch+0x1fb sys/kern/sched_bsd.c:392 sleep_finish(1,ffff800021154e50) at sleep_finish+0xd3 sys/kern/kern_synch.c:312 sleep_finish_all(ffff800021154e50,32) at sleep_finish_all+0x22 sleep_finish_timeout sys/kern/kern_synch.c:336 [inline] sleep_finish_all(ffff800021154e50,32) at sleep_finish_all+0x22 sys/kern/kern_synch.c:157 tsleep(ffff800021084260,3,0,ffff8000210b7d48) at tsleep+0x142 single_thread_set(ffff800021084260,ffff800021084260,0) at single_thread_set+0x28b single_thread_wait sys/kern/kern_sig.c:2039 [inline] single_thread_set(ffff800021084260,ffff800021084260,0) at single_thread_set+0x28b sys/kern/kern_sig.c:2030 exit1(ffff800021084260,9,0) at exit1+0x84 sys/kern/kern_exit.c:137 postsig(100,ffff800021084260) at postsig+0x3ea sigexit sys/kern/kern_sig.c:1488 [inline] postsig(100,ffff800021084260) 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,46ffc6aa600,53,0,46ffc6a6900) at Xsyscall+0x128 end of kernel end trace frame: 0x46ff6623a70, count: -18 ddb{1}> show registers rdi 0xffffffff81e56b28 kprintf_mutex rsi 0xffffffff81871309 db_enter+0x9 rbp 0xffff800021154b20 rbx 0xffff800021154bc0 rdx 0xffff8000022d9000 rcx 0x3d5f __ALIGN_SIZE+0x2d5f rax 0xffff8000022d9000 r8 0xffff800021154af0 r9 0x8080808080808080 r10 0xff605dcf632ab8f1 r11 0xffffffff811194c0 x86_bus_space_io_read_1 r12 0x3000000008 r13 0xffff800021154b30 r14 0x100 r15 0xffffffff81bf7850 cmd0646_9_tim_udma+0x22507 rip 0xffffffff8187130a db_enter+0xa cs 0x8 rflags 0x206 rsp 0xffff800021154b20 ss 0x10 db_enter+0xa: popq %rbp ddb{1}> show proc PROC (syz-executor0) pid=483219 stat=sleep flags process=1010 proc=4002000 pri=50, usrpri=86, nice=20 forw=0x0, list=0xffff8000210859d0,0xffffffff81ecf050 process=0xffff8000210b7c80 user=0xffff800021150000, vmspace=0xffffff0065732740 estcpu=36, cpticks=0, pctcpu=0.0 user=0, sys=0, intr=0 ddb{1}> ps PID TID PPID UID S FLAGS WAIT COMMAND 49319 487952 81284 65534 3 0x4081010 getblk syz-executor0 *49319 483219 81284 65534 3 0x4003010 suspend syz-executor0 55024 207278 6130 65534 3 0x10 biowait syz-executor1 6130 390400 67108 0 3 0x82 wait syz-executor1 81284 213747 3035 65534 3 0x90 nanosleep syz-executor0 3035 164958 67108 0 3 0x82 wait syz-executor0 72970 267131 0 0 3 0x14200 bored sosplice 67108 435988 67488 0 3 0x82 thrsleep syz-fuzzer 67108 89866 67488 0 3 0x4000082 nanosleep syz-fuzzer 67108 96756 67488 0 3 0x4000082 thrsleep syz-fuzzer 67108 13687 67488 0 3 0x4000082 thrsleep syz-fuzzer 67108 278270 67488 0 3 0x4000082 thrsleep syz-fuzzer 67108 363566 67488 0 3 0x4000082 thrsleep syz-fuzzer 67108 130699 67488 0 3 0x4000082 kqread syz-fuzzer 67108 480511 67488 0 3 0x4000082 thrsleep syz-fuzzer 67108 162905 67488 0 3 0x4000082 thrsleep syz-fuzzer 67108 221459 67488 0 3 0x4000082 nanosleep syz-fuzzer 67108 243855 67488 0 3 0x4000082 thrsleep syz-fuzzer 67488 317826 27180 0 3 0x10008a pause ksh 27180 115563 56905 0 3 0x92 select sshd 79709 242752 1 0 3 0x100083 ttyin getty 56905 124808 1 0 3 0x80 select sshd 84996 351272 33316 73 3 0x100090 kqread syslogd 33316 72238 1 0 3 0x100082 netio syslogd 63953 394127 1 77 3 0x100090 poll dhclient 79901 274170 1 0 3 0x80 poll dhclient 86005 268031 0 0 3 0x14200 pgzero zerothread 417 477080 0 0 3 0x14200 aiodoned aiodoned 45712 263275 0 0 3 0x14200 syncer update 46398 91192 0 0 3 0x14200 cleaner cleaner 47570 220748 0 0 3 0x14200 reaper reaper 57952 169531 0 0 3 0x14200 pgdaemon pagedaemon 76985 3668 0 0 3 0x14200 bored crynlk 29874 362923 0 0 3 0x14200 bored crypto 46684 336329 0 0 3 0x40014200 acpi0 acpi0 37116 123651 0 0 3 0x40014200 idle1 61197 207101 0 0 3 0x14200 bored softnet 53475 415038 0 0 3 0x14200 bored systqmp 62144 14046 0 0 3 0x14200 bored systq 59884 493213 0 0 3 0x40014200 bored softclock 8070 469545 0 0 3 0x40014200 idle0 1 34623 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper