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(ffffffff81aa77c4,ffff8000211aadf0,ffff8000210844b8,ffff800000038e80) at __assert+0x24 sys/kern/subr_prf.c:155 _kernel_lock(ffff8000210844b8,ffff8000211a6000) 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,ffff8000022d7000,ffffffffffffffff,0,9,ffff8000210844b8) at alltraps_kern+0x7b ptsignal(1965,ffff8000210844b8,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,ffff8000211ab080) at sleep_finish+0xd3 sys/kern/kern_synch.c:312 sleep_finish_all(ffff8000211ab080,32) at sleep_finish_all+0x22 sleep_finish_timeout sys/kern/kern_synch.c:336 [inline] sleep_finish_all(ffff8000211ab080,32) at sleep_finish_all+0x22 sys/kern/kern_synch.c:157 tsleep(ffff8000210844b8,3,0,ffff8000210b6a58) at tsleep+0x142 single_thread_set(ffff8000210844b8,ffff8000210844b8,0) at single_thread_set+0x28b single_thread_wait sys/kern/kern_sig.c:2051 [inline] single_thread_set(ffff8000210844b8,ffff8000210844b8,0) at single_thread_set+0x28b sys/kern/kern_sig.c:2042 exit1(ffff8000210844b8,9,0) at exit1+0x84 sys/kern/kern_exit.c:137 end trace frame: 0xffff8000211ab250, 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(ffffffff81aa77c4,ffff8000211aadf0,ffff8000210844b8,ffff800000038e80) at __assert+0x24 sys/kern/subr_prf.c:155 _kernel_lock(ffff8000210844b8,ffff8000211a6000) 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,ffff8000022d7000,ffffffffffffffff,0,9,ffff8000210844b8) at alltraps_kern+0x7b ptsignal(1965,ffff8000210844b8,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,ffff8000211ab080) at sleep_finish+0xd3 sys/kern/kern_synch.c:312 sleep_finish_all(ffff8000211ab080,32) at sleep_finish_all+0x22 sleep_finish_timeout sys/kern/kern_synch.c:336 [inline] sleep_finish_all(ffff8000211ab080,32) at sleep_finish_all+0x22 sys/kern/kern_synch.c:157 tsleep(ffff8000210844b8,3,0,ffff8000210b6a58) at tsleep+0x142 single_thread_set(ffff8000210844b8,ffff8000210844b8,0) at single_thread_set+0x28b single_thread_wait sys/kern/kern_sig.c:2051 [inline] single_thread_set(ffff8000210844b8,ffff8000210844b8,0) at single_thread_set+0x28b sys/kern/kern_sig.c:2042 exit1(ffff8000210844b8,9,0) at exit1+0x84 sys/kern/kern_exit.c:137 postsig(100,ffff8000210844b8) at postsig+0x3ea sigexit sys/kern/kern_sig.c:1500 [inline] postsig(100,ffff8000210844b8) 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,2a72d15ae00,53,0,2a707237800) at Xsyscall+0x128 end of kernel end trace frame: 0x2a6e3ddfb80, count: -18 ddb{1}> show registers rdi 0xffffffff81e53648 kprintf_mutex rsi 0xffffffff81711a99 db_enter+0x9 rbp 0xffff8000211aad50 rbx 0xffff8000211aadf0 rdx 0xffff8000022d7000 rcx 0x4885 __ALIGN_SIZE+0x3885 rax 0xffff8000022d7000 r8 0xffff8000211aad20 r9 0x8080808080808080 r10 0x8e148540c0b6c5b5 r11 0xffffffff811c6fd0 x86_bus_space_io_read_1 r12 0x3000000008 r13 0xffff8000211aad60 r14 0x100 r15 0xffffffff81bf6fda cmd0646_9_tim_udma+0x1e6e0 rip 0xffffffff81711a9a db_enter+0xa cs 0x8 rflags 0x202 rsp 0xffff8000211aad50 ss 0x10 db_enter+0xa: popq %rbp ddb{1}> show proc PROC (syz-executor0) pid=94516 stat=sleep flags process=1010 proc=4002000 pri=50, usrpri=76, nice=20 forw=0x0, list=0xffff800021084968,0xffff800021085080 process=0xffff8000210b6990 user=0xffff8000211a6000, vmspace=0xffffff0065824e78 estcpu=36, cpticks=0, pctcpu=0.0 user=0, sys=0, intr=0 ddb{1}> ps PID TID PPID UID S FLAGS WAIT COMMAND 17397 56172 6651 65534 2 0x10 syz-executor1 17397 337640 6651 65534 3 0x4000090 ttyout syz-executor1 *41752 94516 82593 65534 3 0x4003010 suspend syz-executor0 41752 446308 82593 65534 2 0x4081090 syz-executor0 82593 276075 69876 65534 3 0x90 nanosleep syz-executor0 69876 36056 9260 0 3 0x82 wait syz-executor0 6651 12098 76462 65534 3 0x90 nanosleep syz-executor1 76462 50532 9260 0 3 0x82 wait syz-executor1 20445 252845 0 0 3 0x14200 bored sosplice 9260 242931 50003 0 3 0x82 thrsleep syz-fuzzer 9260 88512 50003 0 3 0x4000082 thrsleep syz-fuzzer 9260 247535 50003 0 3 0x4000082 thrsleep syz-fuzzer 9260 175701 50003 0 3 0x4000082 thrsleep syz-fuzzer 9260 305298 50003 0 3 0x4000082 thrsleep syz-fuzzer 9260 338773 50003 0 3 0x4000082 thrsleep syz-fuzzer 9260 63488 50003 0 3 0x4000082 thrsleep syz-fuzzer 9260 315981 50003 0 3 0x4000082 thrsleep syz-fuzzer 9260 41455 50003 0 3 0x4000082 thrsleep syz-fuzzer 9260 369128 50003 0 3 0x4000082 thrsleep syz-fuzzer 9260 232556 50003 0 3 0x4000082 kqread syz-fuzzer 9260 297152 50003 0 3 0x4000082 thrsleep syz-fuzzer 50003 159870 10634 0 3 0x10008a pause ksh 10634 142646 4950 0 3 0x92 select sshd 45708 175318 1 0 3 0x100083 ttyin getty 4950 97072 1 0 3 0x80 select sshd 84463 149003 13045 73 3 0x100090 kqread syslogd 13045 355030 1 0 3 0x100082 netio syslogd 26254 415841 1 77 3 0x100090 poll dhclient 34464 56663 1 0 3 0x80 poll dhclient 86893 201171 0 0 2 0x14200 zerothread 42616 341212 0 0 3 0x14200 aiodoned aiodoned 82369 465600 0 0 3 0x14200 syncer update 42351 313474 0 0 3 0x14200 cleaner cleaner 4815 112437 0 0 3 0x14200 reaper reaper 6834 179886 0 0 3 0x14200 pgdaemon pagedaemon 86449 115389 0 0 3 0x14200 bored crynlk 74890 406765 0 0 3 0x14200 bored crypto 75872 350728 0 0 3 0x40014200 acpi0 acpi0 95033 180177 0 0 3 0x40014200 idle1 49487 307508 0 0 3 0x14200 bored softnet 59358 351442 0 0 3 0x14200 bored systqmp 47903 332749 0 0 3 0x14200 bored systq 59572 190768 0 0 3 0x40014200 bored softclock 82025 243009 0 0 3 0x40014200 idle0 1 379444 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper