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(ffffffff8182cc24,ffff8000211cf830,ffff8000210a2270,ffff80000002f180) at __assert+0x24 sys/kern/subr_prf.c:155 _kernel_lock(ffff8000210a2270,ffff8000211ca000) 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,ffff8000024d9000,ffffffffffffffff,0,9,ffff8000210a2270) at alltraps_kern+0x7b ptsignal(231d,ffff8000210a2270,ffff8000210b6018) at ptsignal+0x115 sys/kern/kern_sig.c:932 mi_switch() at mi_switch+0x1fb sys/kern/sched_bsd.c:392 sleep_finish(1,ffff8000211cfac0) at sleep_finish+0xd3 sys/kern/kern_synch.c:312 sleep_finish_all(ffff8000211cfac0,32) at sleep_finish_all+0x22 sleep_finish_timeout sys/kern/kern_synch.c:336 [inline] sleep_finish_all(ffff8000211cfac0,32) at sleep_finish_all+0x22 sys/kern/kern_synch.c:157 tsleep(ffff8000210a2270,3,0,ffff8000210b60e0) at tsleep+0x142 single_thread_set(ffff8000210a2270,ffff8000210a2270,0) at single_thread_set+0x28b single_thread_wait sys/kern/kern_sig.c:2039 [inline] single_thread_set(ffff8000210a2270,ffff8000210a2270,0) at single_thread_set+0x28b sys/kern/kern_sig.c:2030 exit1(ffff8000210a2270,9,0) at exit1+0x84 sys/kern/kern_exit.c:137 end trace frame: 0xffff8000211cfc90, 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(ffffffff8182cc24,ffff8000211cf830,ffff8000210a2270,ffff80000002f180) at __assert+0x24 sys/kern/subr_prf.c:155 _kernel_lock(ffff8000210a2270,ffff8000211ca000) 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,ffff8000024d9000,ffffffffffffffff,0,9,ffff8000210a2270) at alltraps_kern+0x7b ptsignal(231d,ffff8000210a2270,ffff8000210b6018) at ptsignal+0x115 sys/kern/kern_sig.c:932 mi_switch() at mi_switch+0x1fb sys/kern/sched_bsd.c:392 sleep_finish(1,ffff8000211cfac0) at sleep_finish+0xd3 sys/kern/kern_synch.c:312 sleep_finish_all(ffff8000211cfac0,32) at sleep_finish_all+0x22 sleep_finish_timeout sys/kern/kern_synch.c:336 [inline] sleep_finish_all(ffff8000211cfac0,32) at sleep_finish_all+0x22 sys/kern/kern_synch.c:157 tsleep(ffff8000210a2270,3,0,ffff8000210b60e0) at tsleep+0x142 single_thread_set(ffff8000210a2270,ffff8000210a2270,0) at single_thread_set+0x28b single_thread_wait sys/kern/kern_sig.c:2039 [inline] single_thread_set(ffff8000210a2270,ffff8000210a2270,0) at single_thread_set+0x28b sys/kern/kern_sig.c:2030 exit1(ffff8000210a2270,9,0) at exit1+0x84 sys/kern/kern_exit.c:137 postsig(100,ffff8000210a2270) at postsig+0x3ea sigexit sys/kern/kern_sig.c:1488 [inline] postsig(100,ffff8000210a2270) 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,80f74be9600,53,0,80f74be4fa0) at Xsyscall+0x128 end of kernel end trace frame: 0x8104e6726a0, count: -18 ddb{0}> show registers rdi 0xffffffff81e41740 kprintf_mutex rsi 0xffffffff818d1379 db_enter+0x9 rbp 0xffff8000211cf790 rbx 0xffff8000211cf830 rdx 0xffff8000024d9000 rcx 0x3f64 __ALIGN_SIZE+0x2f64 rax 0xffff8000024d9000 r8 0xffff8000211cf760 r9 0x8080808080808080 r10 0x1048aa436800e51a r11 0xffffffff816a2e00 x86_bus_space_io_read_1 r12 0x3000000008 r13 0xffff8000211cf7a0 r14 0x100 r15 0xffffffff81bf5f70 cmd0646_9_tim_udma+0x1fb9a rip 0xffffffff818d137a db_enter+0xa cs 0x8 rflags 0x202 rsp 0xffff8000211cf790 ss 0x10 db_enter+0xa: popq %rbp ddb{0}> show proc PROC (syz-executor0) pid=111260 stat=sleep flags process=1010 proc=4002000 pri=50, usrpri=86, nice=20 forw=0x0, list=0xffff8000210a3c38,0xffff8000210a2988 process=0xffff8000210b6018 user=0xffff8000211ca000, vmspace=0xffffff0065762c68 estcpu=36, cpticks=0, pctcpu=0.0 user=0, sys=0, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND 18325 317816 99320 65534 3 0x90 nanosleep syz-executor1 18325 502528 99320 65534 3 0x4000090 fsleep syz-executor1 18325 32600 99320 65534 3 0x4000090 fsleep syz-executor1 86301 373068 84040 65534 2 0x4081090 syz-executor0 *86301 111260 84040 65534 3 0x4003010 suspend syz-executor0 99320 286811 77845 65534 3 0x90 nanosleep syz-executor1 77845 470511 11126 0 3 0x82 wait syz-executor1 84040 193626 34418 65534 3 0x90 nanosleep syz-executor0 34418 217362 11126 0 3 0x82 wait syz-executor0 45371 507131 0 0 3 0x14200 bored sosplice 11126 360926 71011 0 3 0x82 thrsleep syz-fuzzer 11126 138119 71011 0 3 0x4000082 thrsleep syz-fuzzer 11126 313761 71011 0 3 0x4000082 thrsleep syz-fuzzer 11126 513527 71011 0 3 0x4000082 thrsleep syz-fuzzer 11126 23367 71011 0 3 0x4000082 thrsleep syz-fuzzer 11126 415778 71011 0 3 0x4000082 thrsleep syz-fuzzer 11126 90502 71011 0 3 0x4000082 thrsleep syz-fuzzer 11126 426087 71011 0 3 0x4000082 kqread syz-fuzzer 11126 150497 71011 0 3 0x4000082 thrsleep syz-fuzzer 11126 470602 71011 0 3 0x4000082 thrsleep syz-fuzzer 71011 483146 27403 0 3 0x10008a pause ksh 27403 28201 86981 0 3 0x92 select sshd 78036 80806 1 0 3 0x100083 ttyin getty 86981 390060 1 0 3 0x80 select sshd 58442 32451 87731 73 3 0x100090 kqread syslogd 87731 383693 1 0 3 0x100082 netio syslogd 93117 99811 1 77 3 0x100090 poll dhclient 60966 47000 1 0 3 0x80 poll dhclient 27656 507452 0 0 3 0x14200 pgzero zerothread 43657 138488 0 0 3 0x14200 aiodoned aiodoned 82564 98277 0 0 3 0x14200 syncer update 86092 326441 0 0 3 0x14200 cleaner cleaner 15526 16930 0 0 3 0x14200 reaper reaper 91053 272523 0 0 3 0x14200 pgdaemon pagedaemon 85958 469782 0 0 3 0x14200 bored crynlk 218 229114 0 0 3 0x14200 bored crypto 75030 15003 0 0 3 0x40014200 acpi0 acpi0 22570 498272 0 0 3 0x40014200 idle1 1875 402622 0 0 3 0x14200 bored softnet 9910 136087 0 0 3 0x14200 bored systqmp 77400 370232 0 0 3 0x14200 bored systq 11039 519461 0 0 3 0x40014200 bored softclock 64863 459780 0 0 3 0x40014200 idle0 1 420086 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper