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(ffffffff816d4174,ffff8000211cd9a0,ffff8000210a3530,ffff800000038e80) at __assert+0x24 sys/kern/subr_prf.c:155 _kernel_lock(ffff8000210a3530,ffff8000211c8000) 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,ffff800000ed7000,ffffffffffffffff,0,9,ffff8000210a3530) at alltraps_kern+0x7b ptsignal(295a,ffff8000210a3530,ffff8000210b6cb8) at ptsignal+0x115 sys/kern/kern_sig.c:932 mi_switch() at mi_switch+0x1fb sys/kern/sched_bsd.c:392 sleep_finish(1,ffff8000211cdc30) at sleep_finish+0xd3 sys/kern/kern_synch.c:312 sleep_finish_all(ffff8000211cdc30,32) at sleep_finish_all+0x22 sleep_finish_timeout sys/kern/kern_synch.c:336 [inline] sleep_finish_all(ffff8000211cdc30,32) at sleep_finish_all+0x22 sys/kern/kern_synch.c:157 tsleep(ffff8000210a3530,3,0,ffff8000210b6d80) at tsleep+0x142 single_thread_set(ffff8000210a3530,ffff8000210a3530,0) at single_thread_set+0x28b single_thread_wait sys/kern/kern_sig.c:2039 [inline] single_thread_set(ffff8000210a3530,ffff8000210a3530,0) at single_thread_set+0x28b sys/kern/kern_sig.c:2030 exit1(ffff8000210a3530,9,0) at exit1+0x84 sys/kern/kern_exit.c:137 end trace frame: 0xffff8000211cde00, 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(ffffffff816d4174,ffff8000211cd9a0,ffff8000210a3530,ffff800000038e80) at __assert+0x24 sys/kern/subr_prf.c:155 _kernel_lock(ffff8000210a3530,ffff8000211c8000) 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,ffff800000ed7000,ffffffffffffffff,0,9,ffff8000210a3530) at alltraps_kern+0x7b ptsignal(295a,ffff8000210a3530,ffff8000210b6cb8) at ptsignal+0x115 sys/kern/kern_sig.c:932 mi_switch() at mi_switch+0x1fb sys/kern/sched_bsd.c:392 sleep_finish(1,ffff8000211cdc30) at sleep_finish+0xd3 sys/kern/kern_synch.c:312 sleep_finish_all(ffff8000211cdc30,32) at sleep_finish_all+0x22 sleep_finish_timeout sys/kern/kern_synch.c:336 [inline] sleep_finish_all(ffff8000211cdc30,32) at sleep_finish_all+0x22 sys/kern/kern_synch.c:157 tsleep(ffff8000210a3530,3,0,ffff8000210b6d80) at tsleep+0x142 single_thread_set(ffff8000210a3530,ffff8000210a3530,0) at single_thread_set+0x28b single_thread_wait sys/kern/kern_sig.c:2039 [inline] single_thread_set(ffff8000210a3530,ffff8000210a3530,0) at single_thread_set+0x28b sys/kern/kern_sig.c:2030 exit1(ffff8000210a3530,9,0) at exit1+0x84 sys/kern/kern_exit.c:137 postsig(100,ffff8000210a3530) at postsig+0x3ea sigexit sys/kern/kern_sig.c:1488 [inline] postsig(100,ffff8000210a3530) 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,9e0e5c7ba00,53,0,9e0e5c78640) at Xsyscall+0x128 end of kernel end trace frame: 0x9e13fc28240, count: -18 ddb{1}> show registers rdi 0xffffffff81e437c0 kprintf_mutex rsi 0xffffffff814f4f69 db_enter+0x9 rbp 0xffff8000211cd900 rbx 0xffff8000211cd9a0 rdx 0xffff800000ed7000 rcx 0x4012 __ALIGN_SIZE+0x3012 rax 0xffff800000ed7000 r8 0xffff8000211cd8d0 r9 0x8080808080808080 r10 0 r11 0xffffffff81521dd0 x86_bus_space_io_read_1 r12 0x3000000008 r13 0xffff8000211cd910 r14 0x100 r15 0xffffffff81bf7c10 cmd0646_9_tim_udma+0x20b2b rip 0xffffffff814f4f6a db_enter+0xa cs 0x8 rflags 0x206 rsp 0xffff8000211cd900 ss 0x10 db_enter+0xa: popq %rbp ddb{1}> show proc PROC (syz-executor0) pid=454219 stat=sleep flags process=1010 proc=4002000 pri=50, usrpri=73, nice=20 forw=0x0, list=0xffff8000210a2978,0xffff8000210a3c48 process=0xffff8000210b6cb8 user=0xffff8000211c8000, vmspace=0xffffff0065a97218 estcpu=36, cpticks=0, pctcpu=0.0 user=0, sys=0, intr=0 ddb{1}> ps PID TID PPID UID S FLAGS WAIT COMMAND * 3412 454219 80439 65534 3 0x4003010 suspend syz-executor0 3412 58105 80439 65534 2 0x4081090 syz-executor0 47441 243635 39910 65534 2 0x10 syz-executor1 47441 112988 39910 65534 3 0x4000090 poll syz-executor1 47441 131563 39910 65534 3 0x4000090 fifor syz-executor1 39910 220641 75618 65534 3 0x90 nanosleep syz-executor1 75618 488178 12927 0 3 0x82 wait syz-executor1 80439 228489 99551 65534 3 0x90 nanosleep syz-executor0 99551 110630 12927 0 3 0x82 wait syz-executor0 13176 422394 0 0 3 0x14200 bored sosplice 12927 123615 63151 0 3 0x82 thrsleep syz-fuzzer 12927 110802 63151 0 3 0x4000082 nanosleep syz-fuzzer 12927 259594 63151 0 3 0x4000082 thrsleep syz-fuzzer 12927 32305 63151 0 3 0x4000082 kqread syz-fuzzer 12927 311402 63151 0 3 0x4000082 thrsleep syz-fuzzer 12927 209559 63151 0 3 0x4000082 thrsleep syz-fuzzer 12927 334972 63151 0 3 0x4000082 thrsleep syz-fuzzer 12927 522559 63151 0 3 0x4000082 thrsleep syz-fuzzer 12927 469724 63151 0 3 0x4000082 thrsleep syz-fuzzer 12927 11181 63151 0 3 0x4000082 thrsleep syz-fuzzer 63151 52506 87184 0 3 0x10008a pause ksh 87184 444233 221 0 3 0x92 select sshd 61091 63321 1 0 3 0x100083 ttyin getty 221 87533 1 0 3 0x80 select sshd 49799 39288 68246 73 3 0x100090 kqread syslogd 68246 405737 1 0 3 0x100082 netio syslogd 39137 130887 1 77 3 0x100090 poll dhclient 13395 517567 1 0 3 0x80 poll dhclient 97459 174852 0 0 3 0x14200 pgzero zerothread 30296 115791 0 0 3 0x14200 aiodoned aiodoned 54726 454055 0 0 3 0x14200 syncer update 51439 52254 0 0 3 0x14200 cleaner cleaner 94496 152322 0 0 3 0x14200 reaper reaper 67969 443778 0 0 3 0x14200 pgdaemon pagedaemon 20121 233822 0 0 3 0x14200 bored crynlk 2075 244894 0 0 3 0x14200 bored crypto 70278 370174 0 0 3 0x40014200 acpi0 acpi0 75856 191656 0 0 3 0x40014200 idle1 17374 169492 0 0 3 0x14200 bored softnet 79873 515662 0 0 3 0x14200 bored systqmp 30533 233066 0 0 3 0x14200 bored systq 65201 47611 0 0 3 0x40014200 bored softclock 87162 342518 0 0 3 0x40014200 idle0 1 320287 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper