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(ffffffff813986c4,ffff8000211df360,ffff8000210a2e28,ffff800000038e80) at __assert+0x24 sys/kern/subr_prf.c:155 _kernel_lock(ffff8000210a2e28,ffff8000211da000) 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,ffff8000024d7000,ffffffffffffffff,0,9,ffff8000210a2e28) at alltraps_kern+0x7b ptsignal(19fc,ffff8000210a2e28,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,ffff8000211df5f0) at sleep_finish+0xd3 sys/kern/kern_synch.c:312 sleep_finish_all(ffff8000211df5f0,32) at sleep_finish_all+0x22 sleep_finish_timeout sys/kern/kern_synch.c:336 [inline] sleep_finish_all(ffff8000211df5f0,32) at sleep_finish_all+0x22 sys/kern/kern_synch.c:157 tsleep(ffff8000210a2e28,3,0,ffff8000210b70a8) at tsleep+0x142 single_thread_set(ffff8000210a2e28,ffff8000210a2e28,0) at single_thread_set+0x28b single_thread_wait sys/kern/kern_sig.c:2039 [inline] single_thread_set(ffff8000210a2e28,ffff8000210a2e28,0) at single_thread_set+0x28b sys/kern/kern_sig.c:2030 exit1(ffff8000210a2e28,9,0) at exit1+0x84 sys/kern/kern_exit.c:137 end trace frame: 0xffff8000211df7c0, 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(ffffffff813986c4,ffff8000211df360,ffff8000210a2e28,ffff800000038e80) at __assert+0x24 sys/kern/subr_prf.c:155 _kernel_lock(ffff8000210a2e28,ffff8000211da000) 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,ffff8000024d7000,ffffffffffffffff,0,9,ffff8000210a2e28) at alltraps_kern+0x7b ptsignal(19fc,ffff8000210a2e28,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,ffff8000211df5f0) at sleep_finish+0xd3 sys/kern/kern_synch.c:312 sleep_finish_all(ffff8000211df5f0,32) at sleep_finish_all+0x22 sleep_finish_timeout sys/kern/kern_synch.c:336 [inline] sleep_finish_all(ffff8000211df5f0,32) at sleep_finish_all+0x22 sys/kern/kern_synch.c:157 tsleep(ffff8000210a2e28,3,0,ffff8000210b70a8) at tsleep+0x142 single_thread_set(ffff8000210a2e28,ffff8000210a2e28,0) at single_thread_set+0x28b single_thread_wait sys/kern/kern_sig.c:2039 [inline] single_thread_set(ffff8000210a2e28,ffff8000210a2e28,0) at single_thread_set+0x28b sys/kern/kern_sig.c:2030 exit1(ffff8000210a2e28,9,0) at exit1+0x84 sys/kern/kern_exit.c:137 postsig(100,ffff8000210a2e28) at postsig+0x3ea sigexit sys/kern/kern_sig.c:1488 [inline] postsig(100,ffff8000210a2e28) 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,a61d48e1600,53,0,a62884115e0) at Xsyscall+0x128 end of kernel end trace frame: 0xa62b305bfa0, count: -18 ddb{1}> show registers rdi 0xffffffff81e33dc0 kprintf_mutex rsi 0xffffffff81bbd8d9 db_enter+0x9 rbp 0xffff8000211df2c0 rbx 0xffff8000211df360 rdx 0xffff8000024d7000 rcx 0x427c __ALIGN_SIZE+0x327c rax 0xffff8000024d7000 r8 0xffff8000211df290 r9 0x8080808080808080 r10 0xeb8dbee7e22cffaf r11 0xffffffff81969270 x86_bus_space_io_read_1 r12 0x3000000008 r13 0xffff8000211df2d0 r14 0x100 r15 0xffffffff81bf49f1 cmd0646_9_tim_udma+0x1f0c6 rip 0xffffffff81bbd8da db_enter+0xa cs 0x8 rflags 0x202 rsp 0xffff8000211df2c0 ss 0x10 db_enter+0xa: popq %rbp ddb{1}> show proc PROC (syz-executor0) pid=131353 stat=sleep flags process=1010 proc=4002000 pri=50, usrpri=86, nice=20 forw=0x0, list=0xffff8000210a2bd0,0xffffffff81ebe440 process=0xffff8000210b6fe0 user=0xffff8000211da000, vmspace=0xffffff00665a3850 estcpu=36, cpticks=0, pctcpu=0.0 user=0, sys=0, intr=0 ddb{1}> ps PID TID PPID UID S FLAGS WAIT COMMAND 69824 503606 28888 65534 2 0x4081010 syz-executor0 *69824 131353 28888 65534 3 0x4003010 suspend syz-executor0 28874 378507 46260 65534 2 0x10 syz-executor1 28874 131281 46260 65534 3 0x4000090 ttyout syz-executor1 28874 197225 46260 65534 2 0x4000010 syz-executor1 28888 188909 56526 65534 3 0x90 nanosleep syz-executor0 56526 255254 64115 0 3 0x82 wait syz-executor0 46260 390028 13511 65534 3 0x90 nanosleep syz-executor1 13511 480561 64115 0 3 0x82 wait syz-executor1 8973 170830 0 0 3 0x14200 bored sosplice 64115 205748 41486 0 3 0x82 thrsleep syz-fuzzer 64115 235198 41486 0 3 0x4000082 thrsleep syz-fuzzer 64115 253105 41486 0 3 0x4000082 thrsleep syz-fuzzer 64115 7546 41486 0 3 0x4000082 thrsleep syz-fuzzer 64115 160604 41486 0 3 0x4000082 thrsleep syz-fuzzer 64115 397318 41486 0 3 0x4000082 thrsleep syz-fuzzer 64115 70686 41486 0 3 0x4000082 kqread syz-fuzzer 64115 157790 41486 0 3 0x4000082 thrsleep syz-fuzzer 64115 374994 41486 0 3 0x4000082 thrsleep syz-fuzzer 64115 440282 41486 0 3 0x4000082 thrsleep syz-fuzzer 64115 36100 41486 0 3 0x4000082 thrsleep syz-fuzzer 64115 440848 41486 0 3 0x4000082 thrsleep syz-fuzzer 41486 256001 75994 0 3 0x10008a pause ksh 75994 307097 20301 0 3 0x92 select sshd 16608 114311 1 0 3 0x100083 ttyin getty 20301 241656 1 0 3 0x80 select sshd 84828 515962 69800 73 3 0x100090 kqread syslogd 69800 330573 1 0 3 0x100082 netio syslogd 7549 358413 1 77 3 0x100090 poll dhclient 70301 96161 1 0 3 0x80 poll dhclient 3326 262222 0 0 2 0x14200 zerothread 77034 449622 0 0 3 0x14200 aiodoned aiodoned 90262 495097 0 0 3 0x14200 syncer update 43360 312536 0 0 3 0x14200 cleaner cleaner 1368 348027 0 0 3 0x14200 reaper reaper 4830 505085 0 0 3 0x14200 pgdaemon pagedaemon 6879 177627 0 0 3 0x14200 bored crynlk 88643 285132 0 0 3 0x14200 bored crypto 98201 170827 0 0 3 0x40014200 acpi0 acpi0 46956 280964 0 0 3 0x40014200 idle1 48163 86097 0 0 3 0x14200 bored softnet 929 279123 0 0 3 0x14200 bored systqmp 41518 17878 0 0 3 0x14200 bored systq 59520 336346 0 0 3 0x40014200 bored softclock 85808 320944 0 0 3 0x40014200 idle0 1 115522 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper