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(ffffffff819f9534,ffff8000211d0e70,ffff8000210a2720,ffff800000038e80) at __assert+0x24 sys/kern/subr_prf.c:155 _kernel_lock(ffff8000210a2720,ffff8000211cc000) 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,ffff8000040dd000,ffffffffffffffff,0,9,ffff8000210a3080) at alltraps_kern+0x7b ptsignal(4c92,ffff8000210a2720,ffff8000210e6990) at ptsignal+0x115 sys/kern/kern_sig.c:932 mi_switch() at mi_switch+0x1fb sys/kern/sched_bsd.c:392 sleep_finish(1,ffff8000211d1100) at sleep_finish+0xd3 sys/kern/kern_synch.c:312 sleep_finish_all(ffff8000211d1100,32) at sleep_finish_all+0x22 sleep_finish_timeout sys/kern/kern_synch.c:336 [inline] sleep_finish_all(ffff8000211d1100,32) at sleep_finish_all+0x22 sys/kern/kern_synch.c:157 tsleep(ffff8000210a2720,3,0,ffff8000210e6a58) at tsleep+0x142 single_thread_set(ffff8000210a2720,ffff8000210a2720,0) at single_thread_set+0x28b single_thread_wait sys/kern/kern_sig.c:2039 [inline] single_thread_set(ffff8000210a2720,ffff8000210a2720,0) at single_thread_set+0x28b sys/kern/kern_sig.c:2030 exit1(ffff8000210a2720,9,0) at exit1+0x84 sys/kern/kern_exit.c:137 end trace frame: 0xffff8000211d12d0, 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(ffffffff819f9534,ffff8000211d0e70,ffff8000210a2720,ffff800000038e80) at __assert+0x24 sys/kern/subr_prf.c:155 _kernel_lock(ffff8000210a2720,ffff8000211cc000) 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,ffff8000040dd000,ffffffffffffffff,0,9,ffff8000210a3080) at alltraps_kern+0x7b ptsignal(4c92,ffff8000210a2720,ffff8000210e6990) at ptsignal+0x115 sys/kern/kern_sig.c:932 mi_switch() at mi_switch+0x1fb sys/kern/sched_bsd.c:392 sleep_finish(1,ffff8000211d1100) at sleep_finish+0xd3 sys/kern/kern_synch.c:312 sleep_finish_all(ffff8000211d1100,32) at sleep_finish_all+0x22 sleep_finish_timeout sys/kern/kern_synch.c:336 [inline] sleep_finish_all(ffff8000211d1100,32) at sleep_finish_all+0x22 sys/kern/kern_synch.c:157 tsleep(ffff8000210a2720,3,0,ffff8000210e6a58) at tsleep+0x142 single_thread_set(ffff8000210a2720,ffff8000210a2720,0) at single_thread_set+0x28b single_thread_wait sys/kern/kern_sig.c:2039 [inline] single_thread_set(ffff8000210a2720,ffff8000210a2720,0) at single_thread_set+0x28b sys/kern/kern_sig.c:2030 exit1(ffff8000210a2720,9,0) at exit1+0x84 sys/kern/kern_exit.c:137 postsig(100,ffff8000210a2720) at postsig+0x3ea sigexit sys/kern/kern_sig.c:1488 [inline] postsig(100,ffff8000210a2720) 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,b43b8e5e000,53,0,b43f2411a20) at Xsyscall+0x128 end of kernel end trace frame: 0xb437e0dbdc0, count: -18 ddb{1}> show registers rdi 0xffffffff81e50050 kprintf_mutex rsi 0xffffffff819c0949 db_enter+0x9 rbp 0xffff8000211d0dd0 rbx 0xffff8000211d0e70 rdx 0xffff8000040dd000 rcx 0x4953 __ALIGN_SIZE+0x3953 rax 0xffff8000040dd000 r8 0xffff8000211d0da0 r9 0x8080808080808080 r10 0 r11 0xffffffff81b67390 x86_bus_space_io_read_1 r12 0x3000000008 r13 0xffff8000211d0de0 r14 0x100 r15 0xffffffff81bf53b4 cmd0646_9_tim_udma+0x220eb rip 0xffffffff819c094a db_enter+0xa cs 0x8 rflags 0x206 rsp 0xffff8000211d0dd0 ss 0x10 db_enter+0xa: popq %rbp ddb{1}> show proc PROC (syz-executor0) pid=370625 stat=sleep flags process=1010 proc=4002000 pri=50, usrpri=74, nice=20 forw=0x0, list=0xffff8000210a3080,0xffff8000210a3540 process=0xffff8000210e6990 user=0xffff8000211cc000, vmspace=0xffffff00657a9740 estcpu=36, cpticks=0, pctcpu=0.0 user=0, sys=0, intr=0 ddb{1}> ps PID TID PPID UID S FLAGS WAIT COMMAND 97434 277513 94705 65534 2 0x81010 syz-executor0 *97434 370625 94705 65534 3 0x4003010 suspend syz-executor0 25205 329861 88670 65534 2 0x10 syz-executor1 25205 145043 88670 65534 3 0x4000090 ttyout syz-executor1 25205 381475 88670 65534 3 0x4000090 fsleep syz-executor1 88670 323337 8882 65534 3 0x90 nanosleep syz-executor1 8882 342647 37932 0 3 0x82 wait syz-executor1 94705 386289 33562 65534 3 0x90 nanosleep syz-executor0 33562 90259 37932 0 3 0x82 wait syz-executor0 90382 116006 0 0 3 0x14200 bored sosplice 37932 353023 48034 0 3 0x82 thrsleep syz-fuzzer 37932 298798 48034 0 3 0x4000082 thrsleep syz-fuzzer 37932 45486 48034 0 3 0x4000082 thrsleep syz-fuzzer 37932 135026 48034 0 3 0x4000082 thrsleep syz-fuzzer 37932 403510 48034 0 3 0x4000082 thrsleep syz-fuzzer 37932 410494 48034 0 3 0x4000082 thrsleep syz-fuzzer 37932 65958 48034 0 3 0x4000082 thrsleep syz-fuzzer 37932 299515 48034 0 3 0x4000082 kqread syz-fuzzer 37932 521175 48034 0 3 0x4000082 thrsleep syz-fuzzer 37932 369664 48034 0 3 0x4000082 thrsleep syz-fuzzer 37932 24515 48034 0 3 0x4000082 thrsleep syz-fuzzer 37932 430609 48034 0 3 0x4000082 thrsleep syz-fuzzer 48034 515424 79761 0 3 0x10008a pause ksh 79761 349305 72955 0 3 0x92 select sshd 13332 54521 1 0 3 0x100083 ttyin getty 72955 394008 1 0 3 0x80 select sshd 70821 209159 92848 73 3 0x100090 kqread syslogd 92848 129038 1 0 3 0x100082 netio syslogd 61135 490754 1 77 3 0x100090 poll dhclient 73219 396649 1 0 3 0x80 poll dhclient 63332 359558 0 0 2 0x14200 zerothread 53919 149622 0 0 3 0x14200 aiodoned aiodoned 19710 351041 0 0 3 0x14200 syncer update 53143 423421 0 0 3 0x14200 cleaner cleaner 73707 168441 0 0 3 0x14200 reaper reaper 555 316808 0 0 3 0x14200 pgdaemon pagedaemon 85781 57413 0 0 3 0x14200 bored crynlk 41821 474924 0 0 3 0x14200 bored crypto 32696 263440 0 0 3 0x40014200 acpi0 acpi0 66431 343005 0 0 3 0x40014200 idle1 12497 171052 0 0 3 0x14200 bored softnet 80335 63525 0 0 3 0x14200 bored systqmp 30012 70190 0 0 3 0x14200 bored systq 47927 284606 0 0 3 0x40014200 bored softclock 28164 420671 0 0 3 0x40014200 idle0 1 19118 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper