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(ffffffff814de554,ffff80002117f370,ffff8000210a24c8,ffff800000038e80) at __assert+0x24 sys/kern/subr_prf.c:155 _kernel_lock(ffff8000210a24c8,ffff80002117a000) 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,0,ffffffffffffffff,0,9,ffff8000210a2978) at alltraps_kern+0x7b ptsignal(19bf5a,ffff8000210a24c8,ffff8000210b7918) at ptsignal+0x115 sys/kern/kern_sig.c:932 mi_switch() at mi_switch+0x1fb sys/kern/sched_bsd.c:392 sleep_finish(1,ffff80002117f600) at sleep_finish+0xd3 sys/kern/kern_synch.c:312 sleep_finish_all(ffff80002117f600,32) at sleep_finish_all+0x22 sleep_finish_timeout sys/kern/kern_synch.c:336 [inline] sleep_finish_all(ffff80002117f600,32) at sleep_finish_all+0x22 sys/kern/kern_synch.c:157 tsleep(ffff8000210b7918,ffff8000210a24c8,ffff80002117f740,ffff8000210b7938) at t sleep+0x142 exit1(ffff8000210a24c8,0,ffff80002117f740) at exit1+0x17b sys/kern/kern_exit.c:166 single_thread_check(80000,ffff8000210a24c8) at single_thread_check+0xd6 sys/kern/kern_sig.c:1925 end trace frame: 0xffff80002117f700, 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(ffffffff814de554,ffff80002117f370,ffff8000210a24c8,ffff800000038e80) at __assert+0x24 sys/kern/subr_prf.c:155 _kernel_lock(ffff8000210a24c8,ffff80002117a000) 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,0,ffffffffffffffff,0,9,ffff8000210a2978) at alltraps_kern+0x7b ptsignal(19bf5a,ffff8000210a24c8,ffff8000210b7918) at ptsignal+0x115 sys/kern/kern_sig.c:932 mi_switch() at mi_switch+0x1fb sys/kern/sched_bsd.c:392 sleep_finish(1,ffff80002117f600) at sleep_finish+0xd3 sys/kern/kern_synch.c:312 sleep_finish_all(ffff80002117f600,32) at sleep_finish_all+0x22 sleep_finish_timeout sys/kern/kern_synch.c:336 [inline] sleep_finish_all(ffff80002117f600,32) at sleep_finish_all+0x22 sys/kern/kern_synch.c:157 tsleep(ffff8000210b7918,ffff8000210a24c8,ffff80002117f740,ffff8000210b7938) at tsleep+0x142 exit1(ffff8000210a24c8,0,ffff80002117f740) at exit1+0x17b sys/kern/kern_exit.c:166 single_thread_check(80000,ffff8000210a24c8) at single_thread_check+0xd6 sys/kern/kern_sig.c:1925 userret(5b0) at userret+0x180 sys/kern/kern_sig.c:1894 syscall(0) at syscall+0x52f mi_syscall_return sys/sys/syscall_mi.h:122 [inline] syscall(0) at syscall+0x52f sys/arch/amd64/amd64/trap.c:605 Xsyscall(6,4,720a8db3c90,5b,110773,722dc97d000) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffec490, count: -17 ddb{1}> show registers rdi 0xffffffff81e155e8 kprintf_mutex rsi 0x5 rbp 0xffff80002117f2d0 rbx 0xffff80002117f370 rdx 0x3fd rcx 0 rax 0 r8 0xffff80002117f2a0 r9 0x8080808080808080 r10 0 r11 0xffffffff81907030 copy_fault r12 0x3000000008 r13 0xffff80002117f2e0 r14 0x100 r15 0xffffffff81b7dbf1 cmd0646_9_tim_udma+0x1d277 rip 0xffffffff8140a2ca db_enter+0xa cs 0x8 rflags 0x246 rsp 0xffff80002117f2d0 ss 0x10 db_enter+0xa: popq %rbp ddb{1}> show proc PROC (syz-executor0) pid=119767 stat=sleep flags process=1010 proc=82000 pri=50, usrpri=71, nice=20 forw=0x0, list=0xffff8000210a3080,0xffff8000210a2988 process=0xffff8000210b7918 user=0xffff80002117a000, vmspace=0xffffff00659c8428 estcpu=21, cpticks=11, pctcpu=0.0 user=0, sys=0, intr=0 ddb{1}> ps PID TID PPID UID S FLAGS WAIT COMMAND 87758 482676 58446 65534 2 0x4081090 syz-executor0 87758 292340 58446 65534 3 0x4003010 suspend syz-executor0 79348 440874 15693 65534 3 0x90 nanosleep syz-executor1 15693 168497 8236 0 3 0x82 wait syz-executor1 58446 309082 92665 65534 3 0x90 nanosleep syz-executor0 92665 302544 8236 0 3 0x82 wait syz-executor0 55838 301423 0 0 3 0x14200 bored sosplice 8236 57574 90631 0 3 0x82 kqread syz-fuzzer 8236 48898 90631 0 3 0x4000082 thrsleep syz-fuzzer 8236 222310 90631 0 3 0x4000082 thrsleep syz-fuzzer 8236 433688 90631 0 3 0x4000082 thrsleep syz-fuzzer 8236 306485 90631 0 3 0x4000082 thrsleep syz-fuzzer 8236 308362 90631 0 3 0x4000082 thrsleep syz-fuzzer 8236 475831 90631 0 3 0x4000082 thrsleep syz-fuzzer 8236 440410 90631 0 3 0x4000082 thrsleep syz-fuzzer 8236 270148 90631 0 3 0x4000082 thrsleep syz-fuzzer 8236 10502 90631 0 3 0x4000082 thrsleep syz-fuzzer 90631 353142 7143 0 3 0x10008a pause ksh 7143 384109 95464 0 3 0x92 select sshd 76611 298629 1 0 3 0x100083 ttyin getty 95464 163654 1 0 3 0x80 select sshd 47264 377321 37652 73 3 0x100090 kqread syslogd 37652 171504 1 0 3 0x100082 netio syslogd 66633 146956 1 77 3 0x100090 poll dhclient 81133 235343 1 0 3 0x80 poll dhclient 54994 372891 0 0 2 0x14200 zerothread 41308 497448 0 0 3 0x14200 aiodoned aiodoned 33792 513033 0 0 3 0x14200 syncer update 2036 370233 0 0 3 0x14200 cleaner cleaner 52838 87334 0 0 3 0x14200 reaper reaper 44545 369643 0 0 3 0x14200 pgdaemon pagedaemon 82064 236296 0 0 3 0x14200 bored crynlk 7162 492846 0 0 3 0x14200 bored crypto 55862 105502 0 0 3 0x40014200 acpi0 acpi0 56990 499628 0 0 3 0x40014200 idle1 43223 338219 0 0 3 0x14200 bored softnet 38345 79215 0 0 3 0x14200 bored systqmp 17783 462706 0 0 3 0x14200 bored systq 49811 518364 0 0 3 0x40014200 bored softclock 30103 151827 0 0 3 0x40014200 idle0 1 429277 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper