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(ffffffff812d0b14,ffff8000211af230,ffff8000210a3788,ffff800000038e80) at __assert+0x24 sys/kern/subr_prf.c:155 _kernel_lock(ffff8000210a3788,ffff8000211aa000) 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,ffff8000014d8000,ffffffffffffffff,0,9,ffff8000210a3788) at alltraps_kern+0x7b ptsignal(2280,ffff8000210a3788,ffff8000210e6668) at ptsignal+0x115 sys/kern/kern_sig.c:932 mi_switch() at mi_switch+0x1fb sys/kern/sched_bsd.c:392 sleep_finish(1,ffff8000211af4c0) at sleep_finish+0xd3 sys/kern/kern_synch.c:312 sleep_finish_all(ffff8000211af4c0,32) at sleep_finish_all+0x22 sleep_finish_timeout sys/kern/kern_synch.c:336 [inline] sleep_finish_all(ffff8000211af4c0,32) at sleep_finish_all+0x22 sys/kern/kern_synch.c:157 tsleep(ffff8000210a3788,3,0,ffff8000210e6730) at tsleep+0x142 single_thread_set(ffff8000210a3788,ffff8000210a3788,0) at single_thread_set+0x28b single_thread_wait sys/kern/kern_sig.c:2039 [inline] single_thread_set(ffff8000210a3788,ffff8000210a3788,0) at single_thread_set+0x28b sys/kern/kern_sig.c:2030 exit1(ffff8000210a3788,9,0) at exit1+0x84 sys/kern/kern_exit.c:137 end trace frame: 0xffff8000211af690, 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(ffffffff812d0b14,ffff8000211af230,ffff8000210a3788,ffff800000038e80) at __assert+0x24 sys/kern/subr_prf.c:155 _kernel_lock(ffff8000210a3788,ffff8000211aa000) 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,ffff8000014d8000,ffffffffffffffff,0,9,ffff8000210a3788) at alltraps_kern+0x7b ptsignal(2280,ffff8000210a3788,ffff8000210e6668) at ptsignal+0x115 sys/kern/kern_sig.c:932 mi_switch() at mi_switch+0x1fb sys/kern/sched_bsd.c:392 sleep_finish(1,ffff8000211af4c0) at sleep_finish+0xd3 sys/kern/kern_synch.c:312 sleep_finish_all(ffff8000211af4c0,32) at sleep_finish_all+0x22 sleep_finish_timeout sys/kern/kern_synch.c:336 [inline] sleep_finish_all(ffff8000211af4c0,32) at sleep_finish_all+0x22 sys/kern/kern_synch.c:157 tsleep(ffff8000210a3788,3,0,ffff8000210e6730) at tsleep+0x142 single_thread_set(ffff8000210a3788,ffff8000210a3788,0) at single_thread_set+0x28b single_thread_wait sys/kern/kern_sig.c:2039 [inline] single_thread_set(ffff8000210a3788,ffff8000210a3788,0) at single_thread_set+0x28b sys/kern/kern_sig.c:2030 exit1(ffff8000210a3788,9,0) at exit1+0x84 sys/kern/kern_exit.c:137 postsig(100,ffff8000210a3788) at postsig+0x3ea sigexit sys/kern/kern_sig.c:1488 [inline] postsig(100,ffff8000210a3788) 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,51b6db6b400,53,0,51c270d5520) at Xsyscall+0x128 end of kernel end trace frame: 0x51b5ad6c480, count: -18 ddb{1}> show registers rdi 0xffffffff81e23cf8 kprintf_mutex rsi 0xffffffff8126f0d9 db_enter+0x9 rbp 0xffff8000211af190 rbx 0xffff8000211af230 rdx 0xffff8000014d8000 rcx 0x3a5f __ALIGN_SIZE+0x2a5f rax 0xffff8000014d8000 r8 0xffff8000211af160 r9 0x8080808080808080 r10 0xa9b8307d48ee461 r11 0xffffffff81092d60 x86_bus_space_io_read_1 r12 0x3000000008 r13 0xffff8000211af1a0 r14 0x100 r15 0xffffffff81bf511d cmd0646_9_tim_udma+0x1c4e7 rip 0xffffffff8126f0da db_enter+0xa cs 0x8 rflags 0x206 rsp 0xffff8000211af190 ss 0x10 db_enter+0xa: popq %rbp ddb{1}> show proc PROC (syz-executor0) pid=229046 stat=sleep flags process=1010 proc=4002000 pri=50, usrpri=82, nice=20 forw=0x0, list=0xffff8000210a2bd0,0xffffffff81ee1b10 process=0xffff8000210e6668 user=0xffff8000211aa000, vmspace=0xffffff0065674530 estcpu=32, cpticks=0, pctcpu=0.0 user=0, sys=0, intr=0 ddb{1}> ps PID TID PPID UID S FLAGS WAIT COMMAND 97560 384380 71671 65534 2 0x4081090 syz-executor0 *97560 229046 71671 65534 3 0x4003010 suspend syz-executor0 46439 55095 58536 65534 3 0x90 nanosleep syz-executor1 58536 280166 47483 0 3 0x82 wait syz-executor1 71671 185025 45304 65534 3 0x90 nanosleep syz-executor0 45304 69059 47483 0 3 0x82 wait syz-executor0 46200 139411 0 0 3 0x14200 bored sosplice 47483 412803 68391 0 3 0x82 thrsleep syz-fuzzer 47483 6298 68391 0 3 0x4000082 thrsleep syz-fuzzer 47483 99099 68391 0 3 0x4000082 thrsleep syz-fuzzer 47483 359689 68391 0 3 0x4000082 thrsleep syz-fuzzer 47483 406699 68391 0 3 0x4000082 thrsleep syz-fuzzer 47483 365010 68391 0 3 0x4000082 thrsleep syz-fuzzer 47483 174360 68391 0 3 0x4000082 thrsleep syz-fuzzer 47483 419372 68391 0 3 0x4000082 kqread syz-fuzzer 47483 65711 68391 0 3 0x4000082 thrsleep syz-fuzzer 47483 489426 68391 0 3 0x4000082 thrsleep syz-fuzzer 68391 422510 28183 0 3 0x10008a pause ksh 28183 53533 17905 0 3 0x92 select sshd 93236 427039 1 0 3 0x100083 ttyin getty 17905 132920 1 0 3 0x80 select sshd 12343 429870 49802 73 3 0x100090 kqread syslogd 49802 390360 1 0 3 0x100082 netio syslogd 34737 429730 1 77 3 0x100090 poll dhclient 81463 111177 1 0 3 0x80 poll dhclient 25415 53342 0 0 3 0x14200 pgzero zerothread 84586 346202 0 0 3 0x14200 aiodoned aiodoned 76795 77505 0 0 3 0x14200 syncer update 98249 247609 0 0 3 0x14200 cleaner cleaner 95140 138747 0 0 3 0x14200 reaper reaper 59568 376694 0 0 3 0x14200 pgdaemon pagedaemon 54247 354099 0 0 3 0x14200 bored crynlk 79076 425354 0 0 3 0x14200 bored crypto 42660 377922 0 0 3 0x40014200 acpi0 acpi0 22671 201136 0 0 3 0x40014200 idle1 38341 261884 0 0 3 0x14200 bored softnet 77086 483246 0 0 3 0x14200 bored systqmp 50095 224010 0 0 3 0x14200 bored systq 20019 304733 0 0 3 0x40014200 bored softclock 2535 389254 0 0 3 0x40014200 idle0 1 93323 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper