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(ffffffff8146e494,ffff8000211bf8e0,ffff8000210a3788,ffff80000002f180) at __assert+0x24 sys/kern/subr_prf.c:155 _kernel_lock(ffff8000210a3788,ffff8000211ba000) 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,ffff8000018d8000,ffffffffffffffff,0,9,ffff8000210a3788) at alltraps_kern+0x7b ptsignal(31bd,ffff8000210a3788,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,ffff8000211bfb70) at sleep_finish+0xd3 sys/kern/kern_synch.c:312 sleep_finish_all(ffff8000211bfb70,32) at sleep_finish_all+0x22 sleep_finish_timeout sys/kern/kern_synch.c:336 [inline] sleep_finish_all(ffff8000211bfb70,32) at sleep_finish_all+0x22 sys/kern/kern_synch.c:157 tsleep(ffff8000210a3788,3,0,ffff8000210b6d80) 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: 0xffff8000211bfd40, 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(ffffffff8146e494,ffff8000211bf8e0,ffff8000210a3788,ffff80000002f180) at __assert+0x24 sys/kern/subr_prf.c:155 _kernel_lock(ffff8000210a3788,ffff8000211ba000) 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,ffff8000018d8000,ffffffffffffffff,0,9,ffff8000210a3788) at alltraps_kern+0x7b ptsignal(31bd,ffff8000210a3788,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,ffff8000211bfb70) at sleep_finish+0xd3 sys/kern/kern_synch.c:312 sleep_finish_all(ffff8000211bfb70,32) at sleep_finish_all+0x22 sleep_finish_timeout sys/kern/kern_synch.c:336 [inline] sleep_finish_all(ffff8000211bfb70,32) at sleep_finish_all+0x22 sys/kern/kern_synch.c:157 tsleep(ffff8000210a3788,3,0,ffff8000210b6d80) 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,bd7107f9a00,53,0,bd7107f6a40) at Xsyscall+0x128 end of kernel end trace frame: 0xbd691d16280, count: -18 ddb{0}> show registers rdi 0xffffffff81e2dc08 kprintf_mutex rsi 0xffffffff81960729 db_enter+0x9 rbp 0xffff8000211bf840 rbx 0xffff8000211bf8e0 rdx 0xffff8000018d8000 rcx 0x4ee3 __ALIGN_SIZE+0x3ee3 rax 0xffff8000018d8000 r8 0xffff8000211bf810 r9 0x8080808080808080 r10 0x9a0847e514626745 r11 0xffffffff81182760 x86_bus_space_io_read_1 r12 0x3000000008 r13 0xffff8000211bf850 r14 0x100 r15 0xffffffff81bf4bcd cmd0646_9_tim_udma+0x1bba5 rip 0xffffffff8196072a db_enter+0xa cs 0x8 rflags 0x202 rsp 0xffff8000211bf840 ss 0x10 db_enter+0xa: popq %rbp ddb{0}> show proc PROC (syz-executor0) pid=377223 stat=sleep flags process=1010 proc=4002000 pri=50, usrpri=76, nice=20 forw=0x0, list=0xffff8000210a2978,0xffff8000210a2730 process=0xffff8000210b6cb8 user=0xffff8000211ba000, vmspace=0xffffff0069f2b220 estcpu=36, cpticks=0, pctcpu=0.0 user=0, sys=0, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND *79154 377223 30899 65534 3 0x4003010 suspend syz-executor0 79154 368396 30899 65534 2 0x4081090 syz-executor0 42392 151073 53465 65534 3 0x90 nanosleep syz-executor1 53465 78932 7100 0 3 0x82 wait syz-executor1 30899 521111 28599 65534 3 0x90 nanosleep syz-executor0 28599 106551 7100 0 3 0x82 wait syz-executor0 6477 475398 0 0 3 0x14200 bored sosplice 7100 381932 26810 0 3 0x82 thrsleep syz-fuzzer 7100 98181 26810 0 3 0x4000082 thrsleep syz-fuzzer 7100 49359 26810 0 3 0x4000082 thrsleep syz-fuzzer 7100 40857 26810 0 3 0x4000082 thrsleep syz-fuzzer 7100 287077 26810 0 3 0x4000082 thrsleep syz-fuzzer 7100 437952 26810 0 3 0x4000082 thrsleep syz-fuzzer 7100 219940 26810 0 3 0x4000082 thrsleep syz-fuzzer 7100 229732 26810 0 3 0x4000082 thrsleep syz-fuzzer 7100 437746 26810 0 3 0x4000082 thrsleep syz-fuzzer 7100 291130 26810 0 3 0x4000082 kqread syz-fuzzer 7100 367739 26810 0 3 0x4000082 thrsleep syz-fuzzer 7100 142222 26810 0 3 0x4000082 thrsleep syz-fuzzer 26810 207095 59235 0 3 0x10008a pause ksh 59235 64618 3415 0 3 0x92 select sshd 35943 443597 1 0 3 0x100083 ttyin getty 3415 118330 1 0 3 0x80 select sshd 12041 468355 58 73 3 0x100090 kqread syslogd 58 452261 1 0 3 0x100082 netio syslogd 81798 254388 1 77 3 0x100090 poll dhclient 88646 62480 1 0 3 0x80 poll dhclient 42968 115480 0 0 3 0x14200 pgzero zerothread 4069 252641 0 0 3 0x14200 aiodoned aiodoned 33253 519290 0 0 3 0x14200 syncer update 3680 126789 0 0 3 0x14200 cleaner cleaner 90305 148475 0 0 3 0x14200 reaper reaper 57560 174068 0 0 3 0x14200 pgdaemon pagedaemon 41934 14849 0 0 3 0x14200 bored crynlk 1004 284300 0 0 3 0x14200 bored crypto 67920 4097 0 0 3 0x40014200 acpi0 acpi0 19045 398547 0 0 3 0x40014200 idle1 56345 134352 0 0 3 0x14200 bored softnet 57921 191691 0 0 3 0x14200 bored systqmp 72996 291238 0 0 3 0x14200 bored systq 74862 484115 0 0 3 0x40014200 bored softclock 87793 66401 0 0 3 0x40014200 idle0 1 276553 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper