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(ffffffff81b07174,ffff8000211c7470,ffff8000210a39e0,ffff80000002f180) at __assert+0x24 sys/kern/subr_prf.c:155 _kernel_lock(ffff8000210a39e0,ffff8000211c2000) 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,ffff8000018da000,ffffffffffffffff,0,9,ffff8000210a39e0) at alltraps_kern+0x7b ptsignal(1afe,ffff8000210a39e0,ffff8000210cb308) at ptsignal+0x115 sys/kern/kern_sig.c:932 mi_switch() at mi_switch+0x1fb sys/kern/sched_bsd.c:392 sleep_finish(1,ffff8000211c7700) at sleep_finish+0xd3 sys/kern/kern_synch.c:312 sleep_finish_all(ffff8000211c7700,32) at sleep_finish_all+0x22 sleep_finish_timeout sys/kern/kern_synch.c:336 [inline] sleep_finish_all(ffff8000211c7700,32) at sleep_finish_all+0x22 sys/kern/kern_synch.c:157 tsleep(ffff8000210a39e0,3,0,ffff8000210cb3d0) at tsleep+0x142 single_thread_set(ffff8000210a39e0,ffff8000210a39e0,0) at single_thread_set+0x28b single_thread_wait sys/kern/kern_sig.c:2039 [inline] single_thread_set(ffff8000210a39e0,ffff8000210a39e0,0) at single_thread_set+0x28b sys/kern/kern_sig.c:2030 exit1(ffff8000210a39e0,9,0) at exit1+0x84 sys/kern/kern_exit.c:137 end trace frame: 0xffff8000211c78d0, 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(ffffffff81b07174,ffff8000211c7470,ffff8000210a39e0,ffff80000002f180) at __assert+0x24 sys/kern/subr_prf.c:155 _kernel_lock(ffff8000210a39e0,ffff8000211c2000) 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,ffff8000018da000,ffffffffffffffff,0,9,ffff8000210a39e0) at alltraps_kern+0x7b ptsignal(1afe,ffff8000210a39e0,ffff8000210cb308) at ptsignal+0x115 sys/kern/kern_sig.c:932 mi_switch() at mi_switch+0x1fb sys/kern/sched_bsd.c:392 sleep_finish(1,ffff8000211c7700) at sleep_finish+0xd3 sys/kern/kern_synch.c:312 sleep_finish_all(ffff8000211c7700,32) at sleep_finish_all+0x22 sleep_finish_timeout sys/kern/kern_synch.c:336 [inline] sleep_finish_all(ffff8000211c7700,32) at sleep_finish_all+0x22 sys/kern/kern_synch.c:157 tsleep(ffff8000210a39e0,3,0,ffff8000210cb3d0) at tsleep+0x142 single_thread_set(ffff8000210a39e0,ffff8000210a39e0,0) at single_thread_set+0x28b single_thread_wait sys/kern/kern_sig.c:2039 [inline] single_thread_set(ffff8000210a39e0,ffff8000210a39e0,0) at single_thread_set+0x28b sys/kern/kern_sig.c:2030 exit1(ffff8000210a39e0,9,0) at exit1+0x84 sys/kern/kern_exit.c:137 postsig(100,ffff8000210a39e0) at postsig+0x3ea sigexit sys/kern/kern_sig.c:1488 [inline] postsig(100,ffff8000210a39e0) 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,9adaadf8400,53,0,9ad8faf4ce0) at Xsyscall+0x128 end of kernel end trace frame: 0x9ae2c968590, count: -18 ddb{0}> show registers rdi 0xffffffff81e56b28 kprintf_mutex rsi 0xffffffff81871309 db_enter+0x9 rbp 0xffff8000211c73d0 rbx 0xffff8000211c7470 rdx 0xffff8000018da000 rcx 0x4239 __ALIGN_SIZE+0x3239 rax 0xffff8000018da000 r8 0xffff8000211c73a0 r9 0x8080808080808080 r10 0xacaa0da7896037e5 r11 0xffffffff811194c0 x86_bus_space_io_read_1 r12 0x3000000008 r13 0xffff8000211c73e0 r14 0x100 r15 0xffffffff81bf7850 cmd0646_9_tim_udma+0x22507 rip 0xffffffff8187130a db_enter+0xa cs 0x8 rflags 0x206 rsp 0xffff8000211c73d0 ss 0x10 db_enter+0xa: popq %rbp ddb{0}> show proc PROC (syz-executor1) pid=361093 stat=sleep flags process=1010 proc=4002000 pri=50, usrpri=86, nice=20 forw=0x0, list=0xffff8000210a3788,0xffffffff81ecf050 process=0xffff8000210cb308 user=0xffff8000211c2000, vmspace=0xffffff006773ae78 estcpu=36, cpticks=0, pctcpu=0.0 user=0, sys=0, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND 68705 363837 76045 65534 2 0x4081090 syz-executor1 *68705 361093 76045 65534 3 0x4003010 suspend syz-executor1 34457 240338 20193 65534 3 0x10 biowait syz-executor0 20193 479768 32528 0 3 0x82 wait syz-executor0 76045 228242 59616 65534 3 0x90 nanosleep syz-executor1 59616 375638 32528 0 3 0x82 wait syz-executor1 62946 438833 0 0 3 0x14200 bored sosplice 32528 510435 24861 0 3 0x82 thrsleep syz-fuzzer 32528 489713 24861 0 3 0x4000082 nanosleep syz-fuzzer 32528 350981 24861 0 3 0x4000082 thrsleep syz-fuzzer 32528 212358 24861 0 3 0x4000082 kqread syz-fuzzer 32528 255689 24861 0 3 0x4000082 thrsleep syz-fuzzer 32528 26849 24861 0 3 0x4000082 thrsleep syz-fuzzer 32528 123911 24861 0 3 0x4000082 thrsleep syz-fuzzer 32528 453797 24861 0 3 0x4000082 thrsleep syz-fuzzer 32528 273232 24861 0 3 0x4000082 thrsleep syz-fuzzer 32528 254882 24861 0 3 0x4000082 thrsleep syz-fuzzer 24861 379372 6741 0 3 0x10008a pause ksh 6741 37285 34688 0 3 0x92 select sshd 1073 228547 1 0 3 0x100083 ttyin getty 34688 150826 1 0 3 0x80 select sshd 53605 493997 78376 73 3 0x100090 kqread syslogd 78376 1555 1 0 3 0x100082 netio syslogd 43997 144189 1 77 3 0x100090 poll dhclient 12818 243728 1 0 3 0x80 poll dhclient 84829 368443 0 0 3 0x14200 pgzero zerothread 13964 242944 0 0 3 0x14200 aiodoned aiodoned 29917 66464 0 0 3 0x14200 syncer update 83074 170671 0 0 3 0x14200 cleaner cleaner 53110 480091 0 0 3 0x14200 reaper reaper 92344 302424 0 0 3 0x14200 pgdaemon pagedaemon 74958 293392 0 0 3 0x14200 bored crynlk 16575 103135 0 0 3 0x14200 bored crypto 52468 412815 0 0 3 0x40014200 acpi0 acpi0 7737 275819 0 0 3 0x40014200 idle1 81372 64720 0 0 3 0x14200 bored softnet 37431 203711 0 0 3 0x14200 bored systqmp 3862 371756 0 0 3 0x14200 bored systq 27991 184820 0 0 3 0x40014200 bored softclock 46551 470777 0 0 3 0x40014200 idle0 1 460031 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper