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,ffff8000211d8e70,ffff8000210a39e0,ffff800000038e80) at __assert+0x24 sys/kern/subr_prf.c:155 _kernel_lock(ffff8000210a39e0,ffff8000211d4000) 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,ffff8000034e0000,ffffffffffffffff,0,9,ffff8000210a39e0) at alltraps_kern+0x7b ptsignal(1c58,ffff8000210a39e0,ffff8000210b6340) at ptsignal+0x115 sys/kern/kern_sig.c:944 mi_switch() at mi_switch+0x1fb sys/kern/sched_bsd.c:392 sleep_finish(1,ffff8000211d9100) at sleep_finish+0xd3 sys/kern/kern_synch.c:312 sleep_finish_all(ffff8000211d9100,32) at sleep_finish_all+0x22 sleep_finish_timeout sys/kern/kern_synch.c:336 [inline] sleep_finish_all(ffff8000211d9100,32) at sleep_finish_all+0x22 sys/kern/kern_synch.c:157 tsleep(ffff8000210a39e0,3,0,ffff8000210b6408) at tsleep+0x142 single_thread_set(ffff8000210a39e0,ffff8000210a39e0,0) at single_thread_set+0x28b single_thread_wait sys/kern/kern_sig.c:2051 [inline] single_thread_set(ffff8000210a39e0,ffff8000210a39e0,0) at single_thread_set+0x28b sys/kern/kern_sig.c:2042 exit1(ffff8000210a39e0,9,0) at exit1+0x84 sys/kern/kern_exit.c:137 end trace frame: 0xffff8000211d92d0, 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,ffff8000211d8e70,ffff8000210a39e0,ffff800000038e80) at __assert+0x24 sys/kern/subr_prf.c:155 _kernel_lock(ffff8000210a39e0,ffff8000211d4000) 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,ffff8000034e0000,ffffffffffffffff,0,9,ffff8000210a39e0) at alltraps_kern+0x7b ptsignal(1c58,ffff8000210a39e0,ffff8000210b6340) at ptsignal+0x115 sys/kern/kern_sig.c:944 mi_switch() at mi_switch+0x1fb sys/kern/sched_bsd.c:392 sleep_finish(1,ffff8000211d9100) at sleep_finish+0xd3 sys/kern/kern_synch.c:312 sleep_finish_all(ffff8000211d9100,32) at sleep_finish_all+0x22 sleep_finish_timeout sys/kern/kern_synch.c:336 [inline] sleep_finish_all(ffff8000211d9100,32) at sleep_finish_all+0x22 sys/kern/kern_synch.c:157 tsleep(ffff8000210a39e0,3,0,ffff8000210b6408) at tsleep+0x142 single_thread_set(ffff8000210a39e0,ffff8000210a39e0,0) at single_thread_set+0x28b single_thread_wait sys/kern/kern_sig.c:2051 [inline] single_thread_set(ffff8000210a39e0,ffff8000210a39e0,0) at single_thread_set+0x28b sys/kern/kern_sig.c:2042 exit1(ffff8000210a39e0,9,0) at exit1+0x84 sys/kern/kern_exit.c:137 postsig(100,ffff8000210a39e0) at postsig+0x3ea sigexit sys/kern/kern_sig.c:1500 [inline] postsig(100,ffff8000210a39e0) 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,3621839ce00,53,0,362a6311400) at Xsyscall+0x128 end of kernel end trace frame: 0x36275dc5b10, count: -18 ddb{1}> show registers rdi 0xffffffff81e1a970 kprintf_mutex rsi 0xffffffff81796cb9 db_enter+0x9 rbp 0xffff8000211d8dd0 rbx 0xffff8000211d8e70 rdx 0xffff8000034e0000 rcx 0x3f05 __ALIGN_SIZE+0x2f05 rax 0xffff8000034e0000 r8 0xffff8000211d8da0 r9 0x8080808080808080 r10 0xdab2921d94b42742 r11 0xffffffff811340d0 x86_bus_space_io_read_1 r12 0x3000000008 r13 0xffff8000211d8de0 r14 0x100 r15 0xffffffff81bf1b93 cmd0646_9_tim_udma+0x1a347 rip 0xffffffff81796cba db_enter+0xa cs 0x8 rflags 0x206 rsp 0xffff8000211d8dd0 ss 0x10 db_enter+0xa: popq %rbp ddb{1}> show proc PROC (syz-executor1) pid=239135 stat=sleep flags process=1010 proc=4002000 pri=50, usrpri=86, nice=20 forw=0x0, list=0xffff8000210a2bd0,0xffffffff81ee00e8 process=0xffff8000210b6340 user=0xffff8000211d4000, vmspace=0xffffff0069ad6a60 estcpu=36, cpticks=0, pctcpu=0.0 user=0, sys=0, intr=0 ddb{1}> ps PID TID PPID UID S FLAGS WAIT COMMAND 57284 346390 64922 65534 2 0x4081010 syz-executor1 *57284 239135 64922 65534 3 0x4003010 suspend syz-executor1 64922 84725 93668 65534 3 0x90 nanosleep syz-executor1 93668 158186 90968 0 3 0x82 wait syz-executor1 92341 365001 28216 65534 2 0x10 syz-executor0 92341 323283 28216 65534 3 0x4000090 lockf syz-executor0 92341 478462 28216 65534 3 0x4000090 lockf syz-executor0 28216 373997 29688 65534 3 0x90 nanosleep syz-executor0 29688 490262 90968 0 3 0x82 wait syz-executor0 52368 87249 0 0 3 0x14200 bored sosplice 90968 453012 45002 0 3 0x82 thrsleep syz-fuzzer 90968 13328 45002 0 3 0x4000082 thrsleep syz-fuzzer 90968 271141 45002 0 3 0x4000082 thrsleep syz-fuzzer 90968 112862 45002 0 3 0x4000082 thrsleep syz-fuzzer 90968 260954 45002 0 3 0x4000082 thrsleep syz-fuzzer 90968 495307 45002 0 3 0x4000082 thrsleep syz-fuzzer 90968 221798 45002 0 3 0x4000082 thrsleep syz-fuzzer 90968 106236 45002 0 3 0x4000082 thrsleep syz-fuzzer 90968 169055 45002 0 3 0x4000082 thrsleep syz-fuzzer 90968 487869 45002 0 3 0x4000082 kqread syz-fuzzer 45002 371260 37048 0 3 0x10008a pause ksh 37048 330808 32222 0 3 0x92 select sshd 1176 273889 1 0 3 0x100083 ttyin getty 32222 280543 1 0 3 0x80 select sshd 35137 417623 62623 73 3 0x100090 kqread syslogd 62623 418229 1 0 3 0x100082 netio syslogd 42679 411837 1 77 3 0x100090 poll dhclient 56829 385140 1 0 3 0x80 poll dhclient 24086 444964 0 0 3 0x14200 pgzero zerothread 31670 349082 0 0 3 0x14200 aiodoned aiodoned 58821 11110 0 0 3 0x14200 syncer update 34441 385921 0 0 3 0x14200 cleaner cleaner 6289 458548 0 0 3 0x14200 reaper reaper 47532 88008 0 0 3 0x14200 pgdaemon pagedaemon 90899 371423 0 0 3 0x14200 bored crynlk 37905 22207 0 0 3 0x14200 bored crypto 31780 11711 0 0 3 0x40014200 acpi0 acpi0 29526 412369 0 0 3 0x40014200 idle1 19748 326313 0 0 3 0x14200 bored softnet 74679 19620 0 0 3 0x14200 bored systqmp 8666 482982 0 0 3 0x14200 bored systq 95187 93384 0 0 3 0x40014200 bored softclock 39598 272446 0 0 3 0x40014200 idle0 1 516586 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper