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(ffffffff818a07e4,ffff800021160ee0,ffff80002109d788,ffff80000002f180) at __assert+0x24 sys/kern/subr_prf.c:155 _kernel_lock(ffff80002109d788,ffff80002115c000) 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,ffff8000010d7000,ffffffffffffffff,0,9,ffff80002109d788) at alltraps_kern+0x7b ptsignal(3019,ffff80002109d788,ffff8000210d8348) at ptsignal+0x115 sys/kern/kern_sig.c:932 mi_switch() at mi_switch+0x1fb sys/kern/sched_bsd.c:392 sleep_finish(1,ffff800021161170) at sleep_finish+0xd3 sys/kern/kern_synch.c:312 sleep_finish_all(ffff800021161170,32) at sleep_finish_all+0x22 sleep_finish_timeout sys/kern/kern_synch.c:336 [inline] sleep_finish_all(ffff800021161170,32) at sleep_finish_all+0x22 sys/kern/kern_synch.c:157 tsleep(ffff80002109d788,3,0,ffff8000210d8410) at tsleep+0x142 single_thread_set(ffff80002109d788,ffff80002109d788,0) at single_thread_set+0x26b single_thread_wait sys/kern/kern_sig.c:2039 [inline] single_thread_set(ffff80002109d788,ffff80002109d788,0) at single_thread_set+0x26b sys/kern/kern_sig.c:2030 exit1(ffff80002109d788,9,0) at exit1+0x84 sys/kern/kern_exit.c:137 end trace frame: 0xffff800021161340, 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(ffffffff818a07e4,ffff800021160ee0,ffff80002109d788,ffff80000002f180) at __assert+0x24 sys/kern/subr_prf.c:155 _kernel_lock(ffff80002109d788,ffff80002115c000) 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,ffff8000010d7000,ffffffffffffffff,0,9,ffff80002109d788) at alltraps_kern+0x7b ptsignal(3019,ffff80002109d788,ffff8000210d8348) at ptsignal+0x115 sys/kern/kern_sig.c:932 mi_switch() at mi_switch+0x1fb sys/kern/sched_bsd.c:392 sleep_finish(1,ffff800021161170) at sleep_finish+0xd3 sys/kern/kern_synch.c:312 sleep_finish_all(ffff800021161170,32) at sleep_finish_all+0x22 sleep_finish_timeout sys/kern/kern_synch.c:336 [inline] sleep_finish_all(ffff800021161170,32) at sleep_finish_all+0x22 sys/kern/kern_synch.c:157 tsleep(ffff80002109d788,3,0,ffff8000210d8410) at tsleep+0x142 single_thread_set(ffff80002109d788,ffff80002109d788,0) at single_thread_set+0x26b single_thread_wait sys/kern/kern_sig.c:2039 [inline] single_thread_set(ffff80002109d788,ffff80002109d788,0) at single_thread_set+0x26b sys/kern/kern_sig.c:2030 exit1(ffff80002109d788,9,0) at exit1+0x84 sys/kern/kern_exit.c:137 postsig(100,ffff80002109d788) at postsig+0x408 sigexit sys/kern/kern_sig.c:1488 [inline] postsig(100,ffff80002109d788) at postsig+0x408 sys/kern/kern_sig.c:1420 userret(530) at userret+0x11b sys/kern/kern_sig.c:1870 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,58,583a06ff600,53,0,5833abf7820) at Xsyscall+0x128 end of kernel end trace frame: 0x5831dda02c0, count: -18 ddb{0}> show registers rdi 0xffffffff81e323f0 kprintf_mutex rsi 0xffffffff811b5999 db_enter+0x9 rbp 0xffff800021160e40 rbx 0xffff800021160ee0 rdx 0xffff8000010d7000 rcx 0x49c0 __ALIGN_SIZE+0x39c0 rax 0xffff8000010d7000 r8 0xffff800021160e10 r9 0x8080808080808080 r10 0x18f18320fc493fde r11 0xffffffff817005e0 copy_fault r12 0x3000000008 r13 0xffff800021160e50 r14 0x100 r15 0xffffffff81b937b0 cmd0646_9_tim_udma+0x1d87d rip 0xffffffff811b599a db_enter+0xa cs 0x8 rflags 0x216 rsp 0xffff800021160e40 ss 0x10 db_enter+0xa: popq %rbp ddb{0}> show proc PROC (syz-executor1) pid=39679 stat=sleep flags process=1010 proc=4002000 pri=50, usrpri=77, nice=20 forw=0x0, list=0xffff80002109c720,0xffff80002109c4d8 process=0xffff8000210d8348 user=0xffff80002115c000, vmspace=0xffffff0067a39c60 estcpu=36, cpticks=0, pctcpu=0.0 user=0, sys=0, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND *29417 39679 53680 65534 3 0x4003010 suspend syz-executor1 29417 60283 53680 65534 2 0x4081090 syz-executor1 53680 143792 31383 65534 3 0x90 nanosleep syz-executor1 31383 35953 54711 0 3 0x82 wait syz-executor1 66662 94822 99042 65534 3 0x90 nanosleep syz-executor0 99042 436671 54711 0 3 0x82 wait syz-executor0 14650 125917 0 0 3 0x14200 bored sosplice 54711 44232 40808 0 3 0x82 thrsleep syz-fuzzer 54711 191905 40808 0 3 0x4000082 thrsleep syz-fuzzer 54711 132506 40808 0 3 0x4000082 thrsleep syz-fuzzer 54711 308560 40808 0 3 0x4000082 thrsleep syz-fuzzer 54711 29568 40808 0 3 0x4000082 thrsleep syz-fuzzer 54711 284132 40808 0 3 0x4000082 thrsleep syz-fuzzer 54711 467853 40808 0 3 0x4000082 thrsleep syz-fuzzer 54711 293320 40808 0 3 0x4000082 thrsleep syz-fuzzer 54711 191312 40808 0 3 0x4000082 kqread syz-fuzzer 54711 498531 40808 0 3 0x4000082 thrsleep syz-fuzzer 40808 470954 87658 0 3 0x10008a pause ksh 87658 357438 25194 0 3 0x92 select sshd 45005 151767 1 0 3 0x100083 ttyin getty 25194 189069 1 0 3 0x80 select sshd 27231 204464 70976 73 3 0x100090 kqread syslogd 70976 454485 1 0 3 0x100082 netio syslogd 57474 443014 1 77 3 0x100090 poll dhclient 80477 204147 1 0 3 0x80 poll dhclient 88627 239771 0 0 3 0x14200 pgzero zerothread 63109 79254 0 0 3 0x14200 aiodoned aiodoned 81218 320596 0 0 3 0x14200 syncer update 40599 482792 0 0 3 0x14200 cleaner cleaner 53493 425621 0 0 3 0x14200 reaper reaper 79899 214497 0 0 3 0x14200 pgdaemon pagedaemon 21345 400361 0 0 3 0x14200 bored crynlk 23999 202175 0 0 3 0x14200 bored crypto 7033 16782 0 0 3 0x40014200 acpi0 acpi0 44847 144064 0 0 3 0x40014200 idle1 88511 367683 0 0 3 0x14200 bored softnet 32221 509455 0 0 3 0x14200 bored systqmp 87613 23948 0 0 3 0x14200 bored systq 63248 322267 0 0 3 0x40014200 bored softclock 81081 343025 0 0 3 0x40014200 idle0 1 275969 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper