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(ffffffff810e4b54,ffff8000211ed780,ffff8000210a2e28,ffff800000038e80) at __assert+0x24 sys/kern/subr_prf.c:155 _kernel_lock(ffff8000210a2e28,ffff8000211e8000) 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,ffff8000022d7000,ffffffffffffffff,0,9,ffff8000210a2e28) at alltraps_kern+0x7b ptsignal(2195,ffff8000210a2e28,ffff8000210b6018) at ptsignal+0x115 sys/kern/kern_sig.c:944 mi_switch() at mi_switch+0x1fb sys/kern/sched_bsd.c:392 sleep_finish(1,ffff8000211eda10) at sleep_finish+0xd3 sys/kern/kern_synch.c:312 sleep_finish_all(ffff8000211eda10,32) at sleep_finish_all+0x22 sleep_finish_timeout sys/kern/kern_synch.c:336 [inline] sleep_finish_all(ffff8000211eda10,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:2051 [inline] single_thread_set(ffff8000210a2e28,ffff8000210a2e28,0) at single_thread_set+0x28b sys/kern/kern_sig.c:2042 exit1(ffff8000210a2e28,9,0) at exit1+0x84 sys/kern/kern_exit.c:137 end trace frame: 0xffff8000211edbe0, 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(ffffffff810e4b54,ffff8000211ed780,ffff8000210a2e28,ffff800000038e80) at __assert+0x24 sys/kern/subr_prf.c:155 _kernel_lock(ffff8000210a2e28,ffff8000211e8000) 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,ffff8000022d7000,ffffffffffffffff,0,9,ffff8000210a2e28) at alltraps_kern+0x7b ptsignal(2195,ffff8000210a2e28,ffff8000210b6018) at ptsignal+0x115 sys/kern/kern_sig.c:944 mi_switch() at mi_switch+0x1fb sys/kern/sched_bsd.c:392 sleep_finish(1,ffff8000211eda10) at sleep_finish+0xd3 sys/kern/kern_synch.c:312 sleep_finish_all(ffff8000211eda10,32) at sleep_finish_all+0x22 sleep_finish_timeout sys/kern/kern_synch.c:336 [inline] sleep_finish_all(ffff8000211eda10,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:2051 [inline] single_thread_set(ffff8000210a2e28,ffff8000210a2e28,0) at single_thread_set+0x28b sys/kern/kern_sig.c:2042 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:1500 [inline] postsig(100,ffff8000210a2e28) 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,e0c3cc10200,53,0,e0c74d3b6e0) at Xsyscall+0x128 end of kernel end trace frame: 0xe0c92c70820, count: -18 ddb{1}> show registers rdi 0xffffffff81e1a970 kprintf_mutex rsi 0xffffffff81796cb9 db_enter+0x9 rbp 0xffff8000211ed6e0 rbx 0xffff8000211ed780 rdx 0xffff8000022d7000 rcx 0x4b7f __ALIGN_SIZE+0x3b7f rax 0xffff8000022d7000 r8 0xffff8000211ed6b0 r9 0x8080808080808080 r10 0x41a0602f9dbf725d r11 0xffffffff811340d0 x86_bus_space_io_read_1 r12 0x3000000008 r13 0xffff8000211ed6f0 r14 0x100 r15 0xffffffff81bf1b93 cmd0646_9_tim_udma+0x1a347 rip 0xffffffff81796cba db_enter+0xa cs 0x8 rflags 0x202 rsp 0xffff8000211ed6e0 ss 0x10 db_enter+0xa: popq %rbp ddb{1}> show proc PROC (syz-executor0) pid=413641 stat=sleep flags process=1010 proc=4002000 pri=50, usrpri=86, nice=20 forw=0x0, list=0xffff8000210a2978,0xffffffff81ee00e8 process=0xffff8000210b6018 user=0xffff8000211e8000, vmspace=0xffffff00766fe740 estcpu=36, cpticks=0, pctcpu=0.0 user=0, sys=0, intr=0 ddb{1}> ps PID TID PPID UID S FLAGS WAIT COMMAND 89337 382867 14090 65534 2 0x4081090 syz-executor0 *89337 413641 14090 65534 3 0x4003010 suspend syz-executor0 95728 91562 83519 65534 3 0x90 nanosleep syz-executor1 95728 95504 83519 65534 3 0x4000090 piperd syz-executor1 95728 163565 83519 65534 3 0x4000090 fsleep syz-executor1 83519 241231 83801 65534 3 0x90 nanosleep syz-executor1 83801 411500 80200 0 3 0x82 wait syz-executor1 14090 97997 4628 65534 3 0x90 nanosleep syz-executor0 4628 375222 80200 0 3 0x82 wait syz-executor0 27795 496479 0 0 3 0x14200 bored sosplice 80200 505208 35328 0 3 0x82 thrsleep syz-fuzzer 80200 275577 35328 0 3 0x4000082 thrsleep syz-fuzzer 80200 271152 35328 0 3 0x4000082 thrsleep syz-fuzzer 80200 314722 35328 0 3 0x4000082 thrsleep syz-fuzzer 80200 470850 35328 0 3 0x4000082 thrsleep syz-fuzzer 80200 35842 35328 0 3 0x4000082 thrsleep syz-fuzzer 80200 246721 35328 0 3 0x4000082 thrsleep syz-fuzzer 80200 424619 35328 0 3 0x4000082 thrsleep syz-fuzzer 80200 358544 35328 0 3 0x4000082 thrsleep syz-fuzzer 80200 402684 35328 0 3 0x4000082 kqread syz-fuzzer 80200 2111 35328 0 3 0x4000082 thrsleep syz-fuzzer 80200 128831 35328 0 3 0x4000082 thrsleep syz-fuzzer 35328 248850 57034 0 3 0x10008a pause ksh 57034 389648 51472 0 3 0x92 select sshd 1346 378166 1 0 3 0x100083 ttyin getty 51472 120161 1 0 3 0x80 select sshd 41192 135756 63344 73 3 0x100090 kqread syslogd 63344 352663 1 0 3 0x100082 netio syslogd 86366 491636 1 77 3 0x100090 poll dhclient 52943 451319 1 0 3 0x80 poll dhclient 36845 508395 0 0 3 0x14200 pgzero zerothread 63510 27650 0 0 3 0x14200 aiodoned aiodoned 26124 500351 0 0 3 0x14200 syncer update 90098 63414 0 0 3 0x14200 cleaner cleaner 75181 403120 0 0 3 0x14200 reaper reaper 21385 406441 0 0 3 0x14200 pgdaemon pagedaemon 67329 403778 0 0 3 0x14200 bored crynlk 66433 360010 0 0 3 0x14200 bored crypto 33081 101527 0 0 3 0x40014200 acpi0 acpi0 38049 222986 0 0 3 0x40014200 idle1 31462 129710 0 0 3 0x14200 bored softnet 51242 357546 0 0 3 0x14200 bored systqmp 88439 492513 0 0 3 0x14200 bored systq 78087 158738 0 0 3 0x40014200 bored softclock 27919 304853 0 0 3 0x40014200 idle0 1 296456 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper