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(ffffffff81487d04,ffff8000211cd4f0,ffff8000210a3080,ffff80000002f180) at __assert+0x24 sys/kern/subr_prf.c:155 _kernel_lock(ffff8000210a3080,ffff8000211c8000) 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,ffff8000042da000,ffffffffffffffff,0,9,ffff8000210a3080) at alltraps_kern+0x7b ptsignal(1814,ffff8000210a3080,ffff8000210b6fe0) at ptsignal+0x115 sys/kern/kern_sig.c:932 mi_switch() at mi_switch+0x1fb sys/kern/sched_bsd.c:392 sleep_finish(1,ffff8000211cd780) at sleep_finish+0xd3 sys/kern/kern_synch.c:312 sleep_finish_all(ffff8000211cd780,32) at sleep_finish_all+0x22 sleep_finish_timeout sys/kern/kern_synch.c:336 [inline] sleep_finish_all(ffff8000211cd780,32) at sleep_finish_all+0x22 sys/kern/kern_synch.c:157 tsleep(ffff8000210a3080,3,0,ffff8000210b70a8) at tsleep+0x142 single_thread_set(ffff8000210a3080,ffff8000210a3080,0) at single_thread_set+0x28b single_thread_wait sys/kern/kern_sig.c:2039 [inline] single_thread_set(ffff8000210a3080,ffff8000210a3080,0) at single_thread_set+0x28b sys/kern/kern_sig.c:2030 exit1(ffff8000210a3080,9,0) at exit1+0x84 sys/kern/kern_exit.c:137 end trace frame: 0xffff8000211cd950, 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/setuid/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(ffffffff81487d04,ffff8000211cd4f0,ffff8000210a3080,ffff80000002f180) at __assert+0x24 sys/kern/subr_prf.c:155 _kernel_lock(ffff8000210a3080,ffff8000211c8000) 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,ffff8000042da000,ffffffffffffffff,0,9,ffff8000210a3080) at alltraps_kern+0x7b ptsignal(1814,ffff8000210a3080,ffff8000210b6fe0) at ptsignal+0x115 sys/kern/kern_sig.c:932 mi_switch() at mi_switch+0x1fb sys/kern/sched_bsd.c:392 sleep_finish(1,ffff8000211cd780) at sleep_finish+0xd3 sys/kern/kern_synch.c:312 sleep_finish_all(ffff8000211cd780,32) at sleep_finish_all+0x22 sleep_finish_timeout sys/kern/kern_synch.c:336 [inline] sleep_finish_all(ffff8000211cd780,32) at sleep_finish_all+0x22 sys/kern/kern_synch.c:157 tsleep(ffff8000210a3080,3,0,ffff8000210b70a8) at tsleep+0x142 single_thread_set(ffff8000210a3080,ffff8000210a3080,0) at single_thread_set+0x28b single_thread_wait sys/kern/kern_sig.c:2039 [inline] single_thread_set(ffff8000210a3080,ffff8000210a3080,0) at single_thread_set+0x28b sys/kern/kern_sig.c:2030 exit1(ffff8000210a3080,9,0) at exit1+0x84 sys/kern/kern_exit.c:137 postsig(100,ffff8000210a3080) at postsig+0x3ea sigexit sys/kern/kern_sig.c:1488 [inline] postsig(100,ffff8000210a3080) 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,8f1e4324600,53,0,8f1f03499e0) at Xsyscall+0x128 end of kernel end trace frame: 0x8f2602f5100, count: -18 ddb{0}> show registers rdi 0xffffffff81e28590 kprintf_mutex rsi 0xffffffff815b4b89 db_enter+0x9 rbp 0xffff8000211cd450 rbx 0xffff8000211cd4f0 rdx 0xffff8000042da000 rcx 0x4191 __ALIGN_SIZE+0x3191 rax 0xffff8000042da000 r8 0xffff8000211cd420 r9 0x8080808080808080 r10 0x87616cc8d5e1ac43 r11 0xffffffff81349670 x86_bus_space_io_read_1 r12 0x3000000008 r13 0xffff8000211cd460 r14 0x100 r15 0xffffffff81bf5a22 cmd0646_9_tim_udma+0x1f0e5 rip 0xffffffff815b4b8a db_enter+0xa cs 0x8 rflags 0x202 rsp 0xffff8000211cd450 ss 0x10 db_enter+0xa: popq %rbp ddb{0}> show proc PROC (syz-executor0) pid=362368 stat=sleep flags process=1010 proc=4002000 pri=50, usrpri=62, nice=20 forw=0x0, list=0xffff8000210a32d8,0xffff8000210a39f0 process=0xffff8000210b6fe0 user=0xffff8000211c8000, vmspace=0xffffff00697ce008 estcpu=12, cpticks=0, pctcpu=0.0 user=0, sys=0, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND 15004 505145 36098 65534 2 0x10 syz-executor1 15004 208504 36098 65534 2 0x4000010 syz-executor1 15004 244223 36098 65534 2 0x4000010 syz-executor1 63809 25358 24733 65534 2 0x4081090 syz-executor0 *63809 362368 24733 65534 3 0x4003010 suspend syz-executor0 24733 285061 93588 65534 3 0x90 nanosleep syz-executor0 93588 506623 93902 0 3 0x82 wait syz-executor0 36098 514862 34320 65534 3 0x90 nanosleep syz-executor1 34320 453248 93902 0 3 0x82 wait syz-executor1 33677 264919 0 0 3 0x14200 bored sosplice 93902 73667 64626 0 3 0x82 thrsleep syz-fuzzer 93902 299284 64626 0 3 0x4000082 thrsleep syz-fuzzer 93902 63641 64626 0 3 0x4000082 thrsleep syz-fuzzer 93902 430182 64626 0 3 0x4000082 thrsleep syz-fuzzer 93902 103368 64626 0 3 0x4000082 thrsleep syz-fuzzer 93902 223769 64626 0 3 0x4000082 thrsleep syz-fuzzer 93902 402694 64626 0 3 0x4000082 thrsleep syz-fuzzer 93902 434280 64626 0 3 0x4000082 kqread syz-fuzzer 93902 407224 64626 0 3 0x4000082 thrsleep syz-fuzzer 93902 358789 64626 0 3 0x4000082 thrsleep syz-fuzzer 64626 149387 64387 0 3 0x10008a pause ksh 64387 215069 81813 0 3 0x92 select sshd 58281 369210 1 0 3 0x100083 ttyin getty 81813 312511 1 0 3 0x80 select sshd 73509 481949 62585 73 3 0x100090 kqread syslogd 62585 347581 1 0 3 0x100082 netio syslogd 20360 102799 1 77 3 0x100090 poll dhclient 60430 114087 1 0 3 0x80 poll dhclient 59071 31137 0 0 2 0x14200 zerothread 95529 456509 0 0 3 0x14200 aiodoned aiodoned 7881 132777 0 0 3 0x14200 syncer update 47354 138908 0 0 3 0x14200 cleaner cleaner 83828 164941 0 0 3 0x14200 reaper reaper 14706 54676 0 0 3 0x14200 pgdaemon pagedaemon 64224 143045 0 0 3 0x14200 bored crynlk 16386 472199 0 0 3 0x14200 bored crypto 23680 33165 0 0 3 0x40014200 acpi0 acpi0 83674 107069 0 0 3 0x40014200 idle1 61141 66674 0 0 3 0x14200 bored softnet 73318 166598 0 0 3 0x14200 bored systqmp 48156 252651 0 0 3 0x14200 bored systq 81358 412855 0 0 3 0x40014200 bored softclock 54554 514285 0 0 3 0x40014200 idle0 1 318244 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper