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(ffffffff81816b64,ffff80002121b850,ffff8000210a2720,ffff800000038e80) at __assert+0x24 sys/kern/subr_prf.c:155 _kernel_lock(ffff8000210a2720,ffff800021216000) 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,ffff800000cd6000,ffffffffffffffff,0,9,ffff8000210a2720) at alltraps_kern+0x7b ptsignal(1c1d,ffff8000210a2720,ffff8000210b6cb8) at ptsignal+0x115 sys/kern/kern_sig.c:944 mi_switch() at mi_switch+0x1fb sys/kern/sched_bsd.c:392 sleep_finish(1,ffff80002121bae0) at sleep_finish+0xd3 sys/kern/kern_synch.c:312 sleep_finish_all(ffff80002121bae0,32) at sleep_finish_all+0x22 sleep_finish_timeout sys/kern/kern_synch.c:336 [inline] sleep_finish_all(ffff80002121bae0,32) at sleep_finish_all+0x22 sys/kern/kern_synch.c:157 tsleep(ffff8000210a2720,3,0,ffff8000210b6d80) at tsleep+0x142 single_thread_set(ffff8000210a2720,ffff8000210a2720,0) at single_thread_set+0x28b single_thread_wait sys/kern/kern_sig.c:2051 [inline] single_thread_set(ffff8000210a2720,ffff8000210a2720,0) at single_thread_set+0x28b sys/kern/kern_sig.c:2042 exit1(ffff8000210a2720,9,0) at exit1+0x84 sys/kern/kern_exit.c:137 end trace frame: 0xffff80002121bcb0, 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(ffffffff81816b64,ffff80002121b850,ffff8000210a2720,ffff800000038e80) at __assert+0x24 sys/kern/subr_prf.c:155 _kernel_lock(ffff8000210a2720,ffff800021216000) 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,ffff800000cd6000,ffffffffffffffff,0,9,ffff8000210a2720) at alltraps_kern+0x7b ptsignal(1c1d,ffff8000210a2720,ffff8000210b6cb8) at ptsignal+0x115 sys/kern/kern_sig.c:944 mi_switch() at mi_switch+0x1fb sys/kern/sched_bsd.c:392 sleep_finish(1,ffff80002121bae0) at sleep_finish+0xd3 sys/kern/kern_synch.c:312 sleep_finish_all(ffff80002121bae0,32) at sleep_finish_all+0x22 sleep_finish_timeout sys/kern/kern_synch.c:336 [inline] sleep_finish_all(ffff80002121bae0,32) at sleep_finish_all+0x22 sys/kern/kern_synch.c:157 tsleep(ffff8000210a2720,3,0,ffff8000210b6d80) at tsleep+0x142 single_thread_set(ffff8000210a2720,ffff8000210a2720,0) at single_thread_set+0x28b single_thread_wait sys/kern/kern_sig.c:2051 [inline] single_thread_set(ffff8000210a2720,ffff8000210a2720,0) at single_thread_set+0x28b sys/kern/kern_sig.c:2042 exit1(ffff8000210a2720,9,0) at exit1+0x84 sys/kern/kern_exit.c:137 postsig(100,ffff8000210a2720) at postsig+0x3ea sigexit sys/kern/kern_sig.c:1500 [inline] postsig(100,ffff8000210a2720) 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,34e42c76200,53,0,34e42c74560) at Xsyscall+0x128 end of kernel end trace frame: 0x34e3d128ae0, count: -18 ddb{1}> show registers rdi 0xffffffff81e467e0 kprintf_mutex rsi 0xffffffff81224279 db_enter+0x9 rbp 0xffff80002121b7b0 rbx 0xffff80002121b850 rdx 0xffff800000cd6000 rcx 0x46f6 __ALIGN_SIZE+0x36f6 rax 0xffff800000cd6000 r8 0xffff80002121b780 r9 0x8080808080808080 r10 0x370d57467af86360 r11 0xffffffff81a4e5a0 x86_bus_space_io_read_1 r12 0x3000000008 r13 0xffff80002121b7c0 r14 0x100 r15 0xffffffff81bf3dec cmd0646_9_tim_udma+0x205cb rip 0xffffffff8122427a db_enter+0xa cs 0x8 rflags 0x206 rsp 0xffff80002121b7b0 ss 0x10 db_enter+0xa: popq %rbp ddb{1}> show proc PROC (syz-executor1) pid=376194 stat=sleep flags process=1010 proc=4002000 pri=50, usrpri=86, nice=20 forw=0x0, list=0xffff8000210a39e0,0xffffffff81ef1b60 process=0xffff8000210b6cb8 user=0xffff800021216000, vmspace=0xffffff007a53ad78 estcpu=36, cpticks=0, pctcpu=0.0 user=0, sys=0, intr=0 ddb{1}> ps PID TID PPID UID S FLAGS WAIT COMMAND 89980 66509 55412 65534 2 0x4081090 syz-executor1 *89980 376194 55412 65534 3 0x4003010 suspend syz-executor1 19259 173910 32882 0 3 0x82 netio sshd 30495 220433 11611 65534 3 0x90 nanosleep syz-executor0 30495 102463 11611 65534 3 0x4000090 fsleep syz-executor0 30495 468501 11611 65534 3 0x4000090 netio syz-executor0 30495 521020 11611 65534 3 0x4000090 fsleep syz-executor0 55412 165996 79582 65534 3 0x90 nanosleep syz-executor1 79582 89231 966 0 3 0x82 wait syz-executor1 11611 451263 23039 65534 3 0x90 nanosleep syz-executor0 23039 432849 966 0 3 0x82 wait syz-executor0 17370 163685 0 0 3 0x14200 bored sosplice 966 515212 32686 0 3 0x82 thrsleep syz-fuzzer 966 76922 32686 0 3 0x4000082 thrsleep syz-fuzzer 966 11383 32686 0 3 0x4000082 thrsleep syz-fuzzer 966 474633 32686 0 3 0x4000082 thrsleep syz-fuzzer 966 344455 32686 0 3 0x4000082 thrsleep syz-fuzzer 966 165536 32686 0 3 0x4000082 thrsleep syz-fuzzer 966 508261 32686 0 3 0x4000082 thrsleep syz-fuzzer 966 300587 32686 0 3 0x4000082 thrsleep syz-fuzzer 966 59629 32686 0 3 0x4000082 kqread syz-fuzzer 966 277893 32686 0 3 0x4000082 thrsleep syz-fuzzer 966 34316 32686 0 3 0x4000082 thrsleep syz-fuzzer 32686 233317 63062 0 3 0x10008a pause ksh 63062 385970 32882 0 3 0x92 select sshd 37258 460720 1 0 3 0x100083 ttyin getty 32882 462531 1 0 3 0x80 select sshd 13536 215770 71877 73 3 0x100090 kqread syslogd 71877 383927 1 0 3 0x100082 netio syslogd 87285 255161 1 77 3 0x100090 poll dhclient 96327 3370 1 0 3 0x80 poll dhclient 72212 479810 0 0 3 0x14200 pgzero zerothread 44726 69111 0 0 3 0x14200 aiodoned aiodoned 41519 447214 0 0 3 0x14200 syncer update 71556 141871 0 0 3 0x14200 cleaner cleaner 75142 187504 0 0 3 0x14200 reaper reaper 103 248193 0 0 3 0x14200 pgdaemon pagedaemon 59204 364696 0 0 3 0x14200 bored crynlk 53321 431169 0 0 3 0x14200 bored crypto 46749 493821 0 0 3 0x40014200 acpi0 acpi0 35430 308126 0 0 3 0x40014200 idle1 97486 522461 0 0 3 0x14200 bored softnet 70115 37793 0 0 3 0x14200 bored systqmp 2378 256583 0 0 3 0x14200 bored systq 93223 479617 0 0 3 0x40014200 bored softclock 31069 258966 0 0 3 0x40014200 idle0 1 115527 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper