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(ffffffff818b5b94,ffff800021166ae0,ffff8000210a32d8,ffff80000002f180) at __assert+0x24 sys/kern/subr_prf.c:155 _kernel_lock(ffff8000210a32d8,ffff800021162000) 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,ffff800000ad7000,ffffffffffffffff,0,9,ffff8000210a32d8) at alltraps_kern+0x7b ptsignal(2035,ffff8000210a32d8,ffff8000210b6990) at ptsignal+0x115 sys/kern/kern_sig.c:932 mi_switch() at mi_switch+0x1fb sys/kern/sched_bsd.c:392 sleep_finish(1,ffff800021166d70) at sleep_finish+0xd3 sys/kern/kern_synch.c:312 sleep_finish_all(ffff800021166d70,32) at sleep_finish_all+0x22 sleep_finish_timeout sys/kern/kern_synch.c:336 [inline] sleep_finish_all(ffff800021166d70,32) at sleep_finish_all+0x22 sys/kern/kern_synch.c:157 tsleep(ffff8000210a32d8,3,0,ffff8000210b6a58) at tsleep+0x142 single_thread_set(ffff8000210a32d8,ffff8000210a32d8,0) at single_thread_set+0x28b single_thread_wait sys/kern/kern_sig.c:2039 [inline] single_thread_set(ffff8000210a32d8,ffff8000210a32d8,0) at single_thread_set+0x28b sys/kern/kern_sig.c:2030 exit1(ffff8000210a32d8,9,0) at exit1+0x84 sys/kern/kern_exit.c:137 end trace frame: 0xffff800021166f40, 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(ffffffff818b5b94,ffff800021166ae0,ffff8000210a32d8,ffff80000002f180) at __assert+0x24 sys/kern/subr_prf.c:155 _kernel_lock(ffff8000210a32d8,ffff800021162000) 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,ffff800000ad7000,ffffffffffffffff,0,9,ffff8000210a32d8) at alltraps_kern+0x7b ptsignal(2035,ffff8000210a32d8,ffff8000210b6990) at ptsignal+0x115 sys/kern/kern_sig.c:932 mi_switch() at mi_switch+0x1fb sys/kern/sched_bsd.c:392 sleep_finish(1,ffff800021166d70) at sleep_finish+0xd3 sys/kern/kern_synch.c:312 sleep_finish_all(ffff800021166d70,32) at sleep_finish_all+0x22 sleep_finish_timeout sys/kern/kern_synch.c:336 [inline] sleep_finish_all(ffff800021166d70,32) at sleep_finish_all+0x22 sys/kern/kern_synch.c:157 tsleep(ffff8000210a32d8,3,0,ffff8000210b6a58) at tsleep+0x142 single_thread_set(ffff8000210a32d8,ffff8000210a32d8,0) at single_thread_set+0x28b single_thread_wait sys/kern/kern_sig.c:2039 [inline] single_thread_set(ffff8000210a32d8,ffff8000210a32d8,0) at single_thread_set+0x28b sys/kern/kern_sig.c:2030 exit1(ffff8000210a32d8,9,0) at exit1+0x84 sys/kern/kern_exit.c:137 postsig(100,ffff8000210a32d8) at postsig+0x3ea sigexit sys/kern/kern_sig.c:1488 [inline] postsig(100,ffff8000210a32d8) 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,11d8df5200,53,0,11aae18460) at Xsyscall+0x128 end of kernel end trace frame: 0x11d68296e0, count: -18 ddb{0}> show registers rdi 0xffffffff81e4d558 kprintf_mutex rsi 0xffffffff8170a829 db_enter+0x9 rbp 0xffff800021166a40 rbx 0xffff800021166ae0 rdx 0xffff800000ad7000 rcx 0x433e __ALIGN_SIZE+0x333e rax 0xffff800000ad7000 r8 0xffff800021166a10 r9 0x8080808080808080 r10 0x3f43d27185495ef3 r11 0xffffffff818834b0 x86_bus_space_io_read_1 r12 0x3000000008 r13 0xffff800021166a50 r14 0x100 r15 0xffffffff81bf7f00 cmd0646_9_tim_udma+0x1e9fa rip 0xffffffff8170a82a db_enter+0xa cs 0x8 rflags 0x202 rsp 0xffff800021166a40 ss 0x10 db_enter+0xa: popq %rbp ddb{0}> show proc PROC (syz-executor0) pid=306984 stat=sleep flags process=1010 proc=4002000 pri=50, usrpri=73, nice=20 forw=0x0, list=0xffff8000210a39e0,0xffff8000210a2730 process=0xffff8000210b6990 user=0xffff800021162000, vmspace=0xffffff00657b5110 estcpu=36, cpticks=0, pctcpu=0.0 user=0, sys=0, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND *39496 306984 71840 65534 3 0x4003010 suspend syz-executor0 39496 290587 71840 65534 2 0x4081090 syz-executor0 71840 82186 36513 65534 3 0x90 nanosleep syz-executor0 36513 384003 9506 0 3 0x82 wait syz-executor0 40859 375001 85274 65534 3 0x10 biowait syz-executor1 85274 109544 9506 0 3 0x82 wait syz-executor1 29201 458297 0 0 3 0x14200 bored sosplice 9506 132618 35789 0 3 0x82 thrsleep syz-fuzzer 9506 315678 35789 0 3 0x4000082 nanosleep syz-fuzzer 9506 500418 35789 0 3 0x4000082 thrsleep syz-fuzzer 9506 182084 35789 0 3 0x4000082 thrsleep syz-fuzzer 9506 265859 35789 0 3 0x4000082 thrsleep syz-fuzzer 9506 241993 35789 0 3 0x4000082 thrsleep syz-fuzzer 9506 518201 35789 0 3 0x4000082 thrsleep syz-fuzzer 9506 235359 35789 0 3 0x4000082 kqread syz-fuzzer 9506 436239 35789 0 3 0x4000082 thrsleep syz-fuzzer 9506 192722 35789 0 3 0x4000082 thrsleep syz-fuzzer 35789 181282 16265 0 3 0x10008a pause ksh 16265 323892 84976 0 3 0x92 select sshd 93354 131828 1 0 3 0x100083 ttyin getty 84976 258225 1 0 3 0x80 select sshd 89294 108858 34909 73 3 0x100090 kqread syslogd 34909 509415 1 0 3 0x100082 netio syslogd 30819 455096 1 77 3 0x100090 poll dhclient 80111 470772 1 0 3 0x80 poll dhclient 30077 227787 0 0 3 0x14200 pgzero zerothread 93235 178892 0 0 3 0x14200 aiodoned aiodoned 30458 520941 0 0 3 0x14200 syncer update 4931 205891 0 0 3 0x14200 cleaner cleaner 47504 93125 0 0 3 0x14200 reaper reaper 91520 11544 0 0 3 0x14200 pgdaemon pagedaemon 56706 428793 0 0 3 0x14200 bored crynlk 82311 101260 0 0 3 0x14200 bored crypto 94333 36659 0 0 3 0x40014200 acpi0 acpi0 69391 41103 0 0 3 0x40014200 idle1 42906 103415 0 0 3 0x14200 bored softnet 9994 139339 0 0 3 0x14200 bored systqmp 99116 99126 0 0 3 0x14200 bored systq 62666 505471 0 0 3 0x40014200 bored softclock 31029 192585 0 0 3 0x40014200 idle0 1 231508 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper