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(ffffffff813e52b4,ffff800021169080,ffff8000210a2e28,ffff800000038e80) at __assert+0x24 sys/kern/subr_prf.c:155 _kernel_lock(ffff8000210a2e28,ffff800021164000) 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,ffff800000ad6000,ffffffffffffffff,0,9,ffff8000210a2e28) at alltraps_kern+0x7b ptsignal(1970,ffff8000210a2e28,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,ffff800021169310) at sleep_finish+0xd3 sys/kern/kern_synch.c:312 sleep_finish_all(ffff800021169310,32) at sleep_finish_all+0x22 sleep_finish_timeout sys/kern/kern_synch.c:336 [inline] sleep_finish_all(ffff800021169310,32) at sleep_finish_all+0x22 sys/kern/kern_synch.c:157 tsleep(ffff8000210a2e28,3,0,ffff8000210b60e0) at tsleep+0x142 single_thread_set(ffff8000210a2e28,ffff8000210a2e28,0) at single_thread_set+0x28b single_thread_wait sys/kern/kern_sig.c:2039 [inline] single_thread_set(ffff8000210a2e28,ffff8000210a2e28,0) at single_thread_set+0x28b sys/kern/kern_sig.c:2030 exit1(ffff8000210a2e28,9,0) at exit1+0x84 sys/kern/kern_exit.c:137 end trace frame: 0xffff8000211694e0, 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(ffffffff813e52b4,ffff800021169080,ffff8000210a2e28,ffff800000038e80) at __assert+0x24 sys/kern/subr_prf.c:155 _kernel_lock(ffff8000210a2e28,ffff800021164000) 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,ffff800000ad6000,ffffffffffffffff,0,9,ffff8000210a2e28) at alltraps_kern+0x7b ptsignal(1970,ffff8000210a2e28,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,ffff800021169310) at sleep_finish+0xd3 sys/kern/kern_synch.c:312 sleep_finish_all(ffff800021169310,32) at sleep_finish_all+0x22 sleep_finish_timeout sys/kern/kern_synch.c:336 [inline] sleep_finish_all(ffff800021169310,32) at sleep_finish_all+0x22 sys/kern/kern_synch.c:157 tsleep(ffff8000210a2e28,3,0,ffff8000210b60e0) at tsleep+0x142 single_thread_set(ffff8000210a2e28,ffff8000210a2e28,0) at single_thread_set+0x28b single_thread_wait sys/kern/kern_sig.c:2039 [inline] single_thread_set(ffff8000210a2e28,ffff8000210a2e28,0) at single_thread_set+0x28b sys/kern/kern_sig.c:2030 exit1(ffff8000210a2e28,9,0) at exit1+0x84 sys/kern/kern_exit.c:137 postsig(100,ffff8000210a2e28) at postsig+0x3ea sigexit sys/kern/kern_sig.c:1488 [inline] postsig(100,ffff8000210a2e28) 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,a8ecfdbec00,53,0,a8ecfdba4c0) at Xsyscall+0x128 end of kernel end trace frame: 0xa8e4d089ad0, count: -18 ddb{1}> show registers rdi 0xffffffff81e291a8 kprintf_mutex rsi 0xffffffff81a8b5c9 db_enter+0x9 rbp 0xffff800021168fe0 rbx 0xffff800021169080 rdx 0xffff800000ad6000 rcx 0x3f1a __ALIGN_SIZE+0x2f1a rax 0xffff800000ad6000 r8 0xffff800021168fb0 r9 0x8080808080808080 r10 0x5b31def39b56c7ab r11 0xffffffff813a7780 x86_bus_space_io_read_1 r12 0x3000000008 r13 0xffff800021168ff0 r14 0x100 r15 0xffffffff81bf3c19 cmd0646_9_tim_udma+0x20790 rip 0xffffffff81a8b5ca db_enter+0xa cs 0x8 rflags 0x202 rsp 0xffff800021168fe0 ss 0x10 db_enter+0xa: popq %rbp ddb{1}> show proc PROC (syz-executor0) pid=221860 stat=sleep flags process=1010 proc=4002000 pri=50, usrpri=79, nice=20 forw=0x0, list=0xffff8000210a3c38,0xffff8000210a32e8 process=0xffff8000210b6018 user=0xffff800021164000, vmspace=0xffffff0068dd8218 estcpu=36, cpticks=0, pctcpu=0.0 user=0, sys=0, intr=0 ddb{1}> ps PID TID PPID UID S FLAGS WAIT COMMAND *98716 221860 73630 65534 3 0x4003010 suspend syz-executor0 98716 429545 73630 65534 2 0x4081090 syz-executor0 65158 35602 20426 65534 3 0x90 nanosleep syz-executor1 20426 255919 87900 0 3 0x82 wait syz-executor1 73630 334181 95061 65534 3 0x90 nanosleep syz-executor0 95061 440145 87900 0 3 0x82 wait syz-executor0 37629 131144 0 0 3 0x14200 bored sosplice 87900 269206 47240 0 3 0x82 thrsleep syz-fuzzer 87900 308689 47240 0 3 0x4000082 thrsleep syz-fuzzer 87900 36012 47240 0 3 0x4000082 thrsleep syz-fuzzer 87900 132448 47240 0 3 0x4000082 kqread syz-fuzzer 87900 163852 47240 0 3 0x4000082 thrsleep syz-fuzzer 87900 238616 47240 0 3 0x4000082 thrsleep syz-fuzzer 87900 231035 47240 0 3 0x4000082 thrsleep syz-fuzzer 87900 451515 47240 0 3 0x4000082 thrsleep syz-fuzzer 87900 281030 47240 0 3 0x4000082 thrsleep syz-fuzzer 87900 279812 47240 0 3 0x4000082 thrsleep syz-fuzzer 47240 264730 25452 0 3 0x10008a pause ksh 25452 519636 84870 0 3 0x92 select sshd 65159 233191 1 0 3 0x100083 ttyin getty 84870 226779 1 0 3 0x80 select sshd 47766 3183 44480 73 3 0x100090 kqread syslogd 44480 281423 1 0 3 0x100082 netio syslogd 22598 442325 1 77 3 0x100090 poll dhclient 34570 286885 1 0 3 0x80 poll dhclient 8897 47334 0 0 3 0x14200 pgzero zerothread 41281 436007 0 0 3 0x14200 aiodoned aiodoned 14994 520252 0 0 3 0x14200 syncer update 93461 84851 0 0 3 0x14200 cleaner cleaner 7328 513659 0 0 3 0x14200 reaper reaper 86295 227370 0 0 3 0x14200 pgdaemon pagedaemon 27516 36588 0 0 3 0x14200 bored crynlk 86210 24084 0 0 3 0x14200 bored crypto 9527 16381 0 0 3 0x40014200 acpi0 acpi0 57211 110800 0 0 3 0x40014200 idle1 42288 337104 0 0 3 0x14200 bored softnet 73118 374672 0 0 3 0x14200 bored systqmp 83871 288274 0 0 3 0x14200 bored systq 58970 217684 0 0 3 0x40014200 bored softclock 50691 505875 0 0 3 0x40014200 idle0 1 335559 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper