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(ffffffff81866be4,ffff8000211d7410,ffff8000210b6e28,ffff80000002f180) at __assert+0x24 sys/kern/subr_prf.c:155 _kernel_lock(ffff8000210b6e28,ffff8000211d2000) 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,ffff8000018d6000,ffffffffffffffff,0,9,ffff8000210b6e28) at alltraps_kern+0x7b ptsignal(1693,ffff8000210b6e28,ffff8000210a2018) at ptsignal+0x115 sys/kern/kern_sig.c:944 mi_switch() at mi_switch+0x1fb sys/kern/sched_bsd.c:392 sleep_finish(1,ffff8000211d76a0) at sleep_finish+0xd3 sys/kern/kern_synch.c:312 sleep_finish_all(ffff8000211d76a0,32) at sleep_finish_all+0x22 sleep_finish_timeout sys/kern/kern_synch.c:336 [inline] sleep_finish_all(ffff8000211d76a0,32) at sleep_finish_all+0x22 sys/kern/kern_synch.c:157 tsleep(ffff8000210b6e28,3,0,ffff8000210a20e0) at tsleep+0x142 single_thread_set(ffff8000210b6e28,ffff8000210b6e28,0) at single_thread_set+0x28b single_thread_wait sys/kern/kern_sig.c:2051 [inline] single_thread_set(ffff8000210b6e28,ffff8000210b6e28,0) at single_thread_set+0x28b sys/kern/kern_sig.c:2042 exit1(ffff8000210b6e28,9,0) at exit1+0x84 sys/kern/kern_exit.c:137 end trace frame: 0xffff8000211d7870, 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(ffffffff81866be4,ffff8000211d7410,ffff8000210b6e28,ffff80000002f180) at __assert+0x24 sys/kern/subr_prf.c:155 _kernel_lock(ffff8000210b6e28,ffff8000211d2000) 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,ffff8000018d6000,ffffffffffffffff,0,9,ffff8000210b6e28) at alltraps_kern+0x7b ptsignal(1693,ffff8000210b6e28,ffff8000210a2018) at ptsignal+0x115 sys/kern/kern_sig.c:944 mi_switch() at mi_switch+0x1fb sys/kern/sched_bsd.c:392 sleep_finish(1,ffff8000211d76a0) at sleep_finish+0xd3 sys/kern/kern_synch.c:312 sleep_finish_all(ffff8000211d76a0,32) at sleep_finish_all+0x22 sleep_finish_timeout sys/kern/kern_synch.c:336 [inline] sleep_finish_all(ffff8000211d76a0,32) at sleep_finish_all+0x22 sys/kern/kern_synch.c:157 tsleep(ffff8000210b6e28,3,0,ffff8000210a20e0) at tsleep+0x142 single_thread_set(ffff8000210b6e28,ffff8000210b6e28,0) at single_thread_set+0x28b single_thread_wait sys/kern/kern_sig.c:2051 [inline] single_thread_set(ffff8000210b6e28,ffff8000210b6e28,0) at single_thread_set+0x28b sys/kern/kern_sig.c:2042 exit1(ffff8000210b6e28,9,0) at exit1+0x84 sys/kern/kern_exit.c:137 postsig(100,ffff8000210b6e28) at postsig+0x3ea sigexit sys/kern/kern_sig.c:1500 [inline] postsig(100,ffff8000210b6e28) 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,45b532bde00,53,0,45acdc4fbe0) at Xsyscall+0x128 end of kernel end trace frame: 0x45b412cab90, count: -18 ddb{0}> show registers rdi 0xffffffff81e46760 kprintf_mutex rsi 0xffffffff81aee3b9 db_enter+0x9 rbp 0xffff8000211d7370 rbx 0xffff8000211d7410 rdx 0xffff8000018d6000 rcx 0x2010 __ALIGN_SIZE+0x1010 rax 0xffff8000018d6000 r8 0xffff8000211d7340 r9 0x8080808080808080 r10 0xc94eec8ceff21219 r11 0xffffffff81112fe0 x86_bus_space_io_read_1 r12 0x3000000008 r13 0xffff8000211d7380 r14 0x100 r15 0xffffffff81bf55e1 cmd0646_9_tim_udma+0x1dacc rip 0xffffffff81aee3ba db_enter+0xa cs 0x8 rflags 0x212 rsp 0xffff8000211d7370 ss 0x10 db_enter+0xa: popq %rbp ddb{0}> show proc PROC (syz-executor0) pid=385015 stat=sleep flags process=1010 proc=4002000 pri=50, usrpri=70, nice=20 forw=0x0, list=0xffff8000210b7c38,0xffffffff81efcad8 process=0xffff8000210a2018 user=0xffff8000211d2000, vmspace=0xffffff007ed50110 estcpu=20, cpticks=0, pctcpu=0.0 user=0, sys=0, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND 32815 384993 18744 65534 2 0x10 syz-executor1 32815 494661 18744 65534 2 0x4000010 syz-executor1 4394 258430 3695 65534 2 0x4081090 syz-executor0 * 4394 385015 3695 65534 3 0x4003010 suspend syz-executor0 3695 17399 7067 65534 3 0x90 nanosleep syz-executor0 7067 165245 17618 0 3 0x82 wait syz-executor0 18744 14991 41247 65534 3 0x90 nanosleep syz-executor1 41247 336967 17618 0 3 0x82 wait syz-executor1 48232 327333 0 0 3 0x14200 bored sosplice 17618 117885 35342 0 3 0x82 thrsleep syz-fuzzer 17618 364658 35342 0 3 0x4000082 nanosleep syz-fuzzer 17618 419571 35342 0 3 0x4000082 thrsleep syz-fuzzer 17618 368857 35342 0 3 0x4000082 thrsleep syz-fuzzer 17618 202166 35342 0 3 0x4000082 thrsleep syz-fuzzer 17618 477191 35342 0 3 0x4000082 thrsleep syz-fuzzer 17618 284673 35342 0 3 0x4000082 thrsleep syz-fuzzer 17618 105093 35342 0 3 0x4000082 thrsleep syz-fuzzer 17618 454905 35342 0 3 0x4000082 thrsleep syz-fuzzer 17618 516839 35342 0 3 0x4000082 kqread syz-fuzzer 17618 361225 35342 0 3 0x4000082 thrsleep syz-fuzzer 35342 388927 92375 0 3 0x10008a pause ksh 92375 36954 86048 0 3 0x92 select sshd 48691 474000 1 0 3 0x100083 ttyin getty 86048 363895 1 0 3 0x80 select sshd 5594 280735 54530 73 3 0x100090 kqread syslogd 54530 281328 1 0 3 0x100082 netio syslogd 83109 399870 1 77 3 0x100090 poll dhclient 14360 307357 1 0 3 0x80 poll dhclient 6985 510347 0 0 3 0x14200 pgzero zerothread 41497 327239 0 0 3 0x14200 aiodoned aiodoned 11604 194488 0 0 3 0x14200 syncer update 75885 228084 0 0 3 0x14200 cleaner cleaner 15265 398361 0 0 3 0x14200 reaper reaper 84011 431662 0 0 3 0x14200 pgdaemon pagedaemon 66087 229671 0 0 3 0x14200 bored crynlk 84020 143683 0 0 3 0x14200 bored crypto 87530 53138 0 0 3 0x40014200 acpi0 acpi0 88105 256358 0 0 3 0x40014200 idle1 24812 355779 0 0 3 0x14200 bored softnet 65800 54637 0 0 3 0x14200 bored systqmp 18483 393692 0 0 3 0x14200 bored systq 65508 46160 0 0 3 0x40014200 bored softclock 93073 509974 0 0 3 0x40014200 idle0 1 418789 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper