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(ffffffff8172be34,ffff80002118d380,ffff8000210a32d8,ffff800000038e80) at __assert+0x24 sys/kern/subr_prf.c:155 _kernel_lock(ffff8000210a32d8,ffff800021188000) 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,ffff800000ad6000,ffffffffffffffff,0,9,ffff8000210a32d8) at alltraps_kern+0x7b ptsignal(1617,ffff8000210a32d8,ffff8000210b7c80) at ptsignal+0x115 sys/kern/kern_sig.c:944 mi_switch() at mi_switch+0x1fb sys/kern/sched_bsd.c:392 sleep_finish(1,ffff80002118d610) at sleep_finish+0xd3 sys/kern/kern_synch.c:312 sleep_finish_all(ffff80002118d610,32) at sleep_finish_all+0x22 sleep_finish_timeout sys/kern/kern_synch.c:336 [inline] sleep_finish_all(ffff80002118d610,32) at sleep_finish_all+0x22 sys/kern/kern_synch.c:157 tsleep(ffff8000210a32d8,3,0,ffff8000210b7d48) at tsleep+0x142 single_thread_set(ffff8000210a32d8,ffff8000210a32d8,0) at single_thread_set+0x28b single_thread_wait sys/kern/kern_sig.c:2051 [inline] single_thread_set(ffff8000210a32d8,ffff8000210a32d8,0) at single_thread_set+0x28b sys/kern/kern_sig.c:2042 exit1(ffff8000210a32d8,9,0) at exit1+0x84 sys/kern/kern_exit.c:137 end trace frame: 0xffff80002118d7e0, 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(ffffffff8172be34,ffff80002118d380,ffff8000210a32d8,ffff800000038e80) at __assert+0x24 sys/kern/subr_prf.c:155 _kernel_lock(ffff8000210a32d8,ffff800021188000) 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,ffff800000ad6000,ffffffffffffffff,0,9,ffff8000210a32d8) at alltraps_kern+0x7b ptsignal(1617,ffff8000210a32d8,ffff8000210b7c80) at ptsignal+0x115 sys/kern/kern_sig.c:944 mi_switch() at mi_switch+0x1fb sys/kern/sched_bsd.c:392 sleep_finish(1,ffff80002118d610) at sleep_finish+0xd3 sys/kern/kern_synch.c:312 sleep_finish_all(ffff80002118d610,32) at sleep_finish_all+0x22 sleep_finish_timeout sys/kern/kern_synch.c:336 [inline] sleep_finish_all(ffff80002118d610,32) at sleep_finish_all+0x22 sys/kern/kern_synch.c:157 tsleep(ffff8000210a32d8,3,0,ffff8000210b7d48) at tsleep+0x142 single_thread_set(ffff8000210a32d8,ffff8000210a32d8,0) at single_thread_set+0x28b single_thread_wait sys/kern/kern_sig.c:2051 [inline] single_thread_set(ffff8000210a32d8,ffff8000210a32d8,0) at single_thread_set+0x28b sys/kern/kern_sig.c:2042 exit1(ffff8000210a32d8,9,0) at exit1+0x84 sys/kern/kern_exit.c:137 postsig(100,ffff8000210a32d8) at postsig+0x3ea sigexit sys/kern/kern_sig.c:1500 [inline] postsig(100,ffff8000210a32d8) 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,b391a022e00,53,0,b391a01eb60) at Xsyscall+0x128 end of kernel end trace frame: 0xb38c276eb40, count: -18 ddb{1}> show registers rdi 0xffffffff81e3d210 kprintf_mutex rsi 0xffffffff8188a899 db_enter+0x9 rbp 0xffff80002118d2e0 rbx 0xffff80002118d380 rdx 0xffff800000ad6000 rcx 0x42ea __ALIGN_SIZE+0x32ea rax 0xffff800000ad6000 r8 0xffff80002118d2b0 r9 0x8080808080808080 r10 0x6abf2558575917ec r11 0xffffffff816984e0 x86_bus_space_io_read_1 r12 0x3000000008 r13 0xffff80002118d2f0 r14 0x100 r15 0xffffffff81bf66f0 cmd0646_9_tim_udma+0x1ebfb rip 0xffffffff8188a89a db_enter+0xa cs 0x8 rflags 0x202 rsp 0xffff80002118d2e0 ss 0x10 db_enter+0xa: popq %rbp ddb{1}> show proc PROC (syz-executor0) pid=271863 stat=sleep flags process=1010 proc=4002000 pri=50, usrpri=77, nice=20 forw=0x0, list=0xffff8000210a2978,0xffff8000210a2730 process=0xffff8000210b7c80 user=0xffff800021188000, vmspace=0xffffff00658b0e78 estcpu=27, cpticks=0, pctcpu=0.0 user=0, sys=0, intr=0 ddb{1}> ps PID TID PPID UID S FLAGS WAIT COMMAND *75281 271863 83690 65534 3 0x4003010 suspend syz-executor0 75281 128218 83690 65534 2 0x4081090 syz-executor0 47645 334451 91063 65534 3 0x90 nanosleep syz-executor1 91063 34094 63138 0 3 0x82 wait syz-executor1 83690 422442 52900 65534 3 0x90 nanosleep syz-executor0 52900 429195 63138 0 3 0x82 wait syz-executor0 31879 482541 0 0 3 0x14200 bored sosplice 63138 235457 17509 0 3 0x82 thrsleep syz-fuzzer 63138 487960 17509 0 3 0x4000082 thrsleep syz-fuzzer 63138 37897 17509 0 3 0x4000082 thrsleep syz-fuzzer 63138 178178 17509 0 3 0x4000082 thrsleep syz-fuzzer 63138 443667 17509 0 3 0x4000082 thrsleep syz-fuzzer 63138 516983 17509 0 3 0x4000082 thrsleep syz-fuzzer 63138 83778 17509 0 3 0x4000082 thrsleep syz-fuzzer 63138 134129 17509 0 3 0x4000082 thrsleep syz-fuzzer 63138 499247 17509 0 3 0x4000082 kqread syz-fuzzer 63138 109028 17509 0 3 0x4000082 thrsleep syz-fuzzer 17509 99244 87817 0 3 0x10008a pause ksh 87817 486785 51721 0 3 0x92 select sshd 41423 493880 1 0 3 0x100083 ttyin getty 51721 176236 1 0 3 0x80 select sshd 27849 364535 89561 73 3 0x100090 kqread syslogd 89561 262836 1 0 3 0x100082 netio syslogd 49462 63465 1 77 3 0x100090 poll dhclient 85566 356758 1 0 3 0x80 poll dhclient 31908 467141 0 0 3 0x14200 pgzero zerothread 955 516612 0 0 3 0x14200 aiodoned aiodoned 17222 199639 0 0 3 0x14200 syncer update 66809 10031 0 0 3 0x14200 cleaner cleaner 44957 323947 0 0 3 0x14200 reaper reaper 99331 117003 0 0 3 0x14200 pgdaemon pagedaemon 8469 222461 0 0 3 0x14200 bored crynlk 16358 510897 0 0 3 0x14200 bored crypto 48007 281156 0 0 3 0x40014200 acpi0 acpi0 58070 468378 0 0 3 0x40014200 idle1 21292 241177 0 0 3 0x14200 bored softnet 22369 68789 0 0 3 0x14200 bored systqmp 98316 33991 0 0 3 0x14200 bored systq 71424 147509 0 0 3 0x40014200 bored softclock 16042 251462 0 0 3 0x40014200 idle0 1 347268 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper