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(ffffffff818e4124,ffff8000211c8f40,ffff8000210a3530,ffff800000038e80) at __assert+0x24 sys/kern/subr_prf.c:155 _kernel_lock(ffff8000210a3530,ffff8000211c4000) 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,ffff8000022d8000,ffffffffffffffff,0,9,ffff8000210a3530) at alltraps_kern+0x7b ptsignal(1cf0,ffff8000210a3530,ffff8000210b6668) at ptsignal+0x115 sys/kern/kern_sig.c:944 mi_switch() at mi_switch+0x1fb sys/kern/sched_bsd.c:392 sleep_finish(1,ffff8000211c91d0) at sleep_finish+0xd3 sys/kern/kern_synch.c:312 sleep_finish_all(ffff8000211c91d0,32) at sleep_finish_all+0x22 sleep_finish_timeout sys/kern/kern_synch.c:336 [inline] sleep_finish_all(ffff8000211c91d0,32) at sleep_finish_all+0x22 sys/kern/kern_synch.c:157 tsleep(ffff8000210a3530,3,0,ffff8000210b6730) at tsleep+0x142 single_thread_set(ffff8000210a3530,ffff8000210a3530,0) at single_thread_set+0x28b single_thread_wait sys/kern/kern_sig.c:2051 [inline] single_thread_set(ffff8000210a3530,ffff8000210a3530,0) at single_thread_set+0x28b sys/kern/kern_sig.c:2042 exit1(ffff8000210a3530,9,0) at exit1+0x84 sys/kern/kern_exit.c:137 end trace frame: 0xffff8000211c93a0, 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(ffffffff818e4124,ffff8000211c8f40,ffff8000210a3530,ffff800000038e80) at __assert+0x24 sys/kern/subr_prf.c:155 _kernel_lock(ffff8000210a3530,ffff8000211c4000) 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,ffff8000022d8000,ffffffffffffffff,0,9,ffff8000210a3530) at alltraps_kern+0x7b ptsignal(1cf0,ffff8000210a3530,ffff8000210b6668) at ptsignal+0x115 sys/kern/kern_sig.c:944 mi_switch() at mi_switch+0x1fb sys/kern/sched_bsd.c:392 sleep_finish(1,ffff8000211c91d0) at sleep_finish+0xd3 sys/kern/kern_synch.c:312 sleep_finish_all(ffff8000211c91d0,32) at sleep_finish_all+0x22 sleep_finish_timeout sys/kern/kern_synch.c:336 [inline] sleep_finish_all(ffff8000211c91d0,32) at sleep_finish_all+0x22 sys/kern/kern_synch.c:157 tsleep(ffff8000210a3530,3,0,ffff8000210b6730) at tsleep+0x142 single_thread_set(ffff8000210a3530,ffff8000210a3530,0) at single_thread_set+0x28b single_thread_wait sys/kern/kern_sig.c:2051 [inline] single_thread_set(ffff8000210a3530,ffff8000210a3530,0) at single_thread_set+0x28b sys/kern/kern_sig.c:2042 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:1500 [inline] postsig(100,ffff8000210a3530) at postsig+0x3ea sys/kern/kern_sig.c:1432 userret(0) at userret+0x11b sys/kern/kern_sig.c:1882 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,9a7bd072200,53,0,9a7bd06fde0) at Xsyscall+0x128 end of kernel end trace frame: 0x9a7a6a9d630, count: -18 ddb{1}> show registers rdi 0xffffffff81e337f8 kprintf_mutex rsi 0xffffffff81696879 db_enter+0x9 rbp 0xffff8000211c8ea0 rbx 0xffff8000211c8f40 rdx 0xffff8000022d8000 rcx 0x46a4 __ALIGN_SIZE+0x36a4 rax 0xffff8000022d8000 r8 0xffff8000211c8e70 r9 0x8080808080808080 r10 0x22a86a9d2793140 r11 0xffffffff8181f470 x86_bus_space_io_read_1 r12 0x3000000008 r13 0xffff8000211c8eb0 r14 0x100 r15 0xffffffff81bf4e1e cmd0646_9_tim_udma+0x1f12c rip 0xffffffff8169687a db_enter+0xa cs 0x8 rflags 0x202 rsp 0xffff8000211c8ea0 ss 0x10 db_enter+0xa: popq %rbp ddb{1}> show proc PROC (syz-executor0) pid=231481 stat=sleep flags process=1010 proc=4002000 pri=50, usrpri=78, nice=20 forw=0x0, list=0xffff8000210a3080,0xffffffff81eb7cb0 process=0xffff8000210b6668 user=0xffff8000211c4000, vmspace=0xffffff0065a15320 estcpu=36, cpticks=0, pctcpu=0.0 user=0, sys=0, intr=0 ddb{1}> ps PID TID PPID UID S FLAGS WAIT COMMAND 66021 122069 37749 65534 2 0x4081090 syz-executor0 *66021 231481 37749 65534 3 0x4003010 suspend syz-executor0 14550 285643 1522 65534 3 0x90 nanosleep syz-executor1 1522 304053 51823 0 3 0x82 wait syz-executor1 37749 462224 92840 65534 3 0x90 nanosleep syz-executor0 92840 152499 51823 0 3 0x82 wait syz-executor0 73209 401093 0 0 3 0x14200 bored sosplice 51823 425778 59442 0 3 0x82 thrsleep syz-fuzzer 51823 425390 59442 0 3 0x4000082 thrsleep syz-fuzzer 51823 299514 59442 0 3 0x4000082 thrsleep syz-fuzzer 51823 2159 59442 0 3 0x4000082 thrsleep syz-fuzzer 51823 182924 59442 0 3 0x4000082 thrsleep syz-fuzzer 51823 265727 59442 0 3 0x4000082 thrsleep syz-fuzzer 51823 395747 59442 0 3 0x4000082 thrsleep syz-fuzzer 51823 40754 59442 0 3 0x4000082 thrsleep syz-fuzzer 51823 281864 59442 0 3 0x4000082 kqread syz-fuzzer 51823 18576 59442 0 3 0x4000082 thrsleep syz-fuzzer 59442 107826 27988 0 3 0x10008a pause ksh 27988 38504 11473 0 3 0x92 select sshd 83241 365997 1 0 3 0x100083 ttyin getty 11473 53953 1 0 3 0x80 select sshd 33960 383238 51613 73 3 0x100090 kqread syslogd 51613 52139 1 0 3 0x100082 netio syslogd 29180 230897 1 77 3 0x100090 poll dhclient 89751 746 1 0 3 0x80 poll dhclient 72696 506452 0 0 2 0x14200 zerothread 58815 39401 0 0 3 0x14200 aiodoned aiodoned 42010 88738 0 0 3 0x14200 syncer update 1765 224437 0 0 3 0x14200 cleaner cleaner 49781 135942 0 0 3 0x14200 reaper reaper 43954 321774 0 0 3 0x14200 pgdaemon pagedaemon 38087 388129 0 0 3 0x14200 bored crynlk 11843 283149 0 0 3 0x14200 bored crypto 83663 473721 0 0 3 0x40014200 acpi0 acpi0 385 502562 0 0 3 0x40014200 idle1 89253 354081 0 0 3 0x14200 bored softnet 1590 192481 0 0 3 0x14200 bored systqmp 95758 7104 0 0 3 0x14200 bored systq 46153 95914 0 0 3 0x40014200 bored softclock 26969 436604 0 0 3 0x40014200 idle0 1 326524 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper