panic: kernel diagnostic assertion "!ISSET(p->p_flag, P_WSLEEP) || p->p_stat == SSTOP" failed: file "/syzkaller/managers/setuid/kernel/sys/kern/kern_sched.c", line 265 Stopped at db_enter+0x1c: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *419803 4075 32767 0x10 0 0K syz-executor.4 202443 25354 32767 0x10 0 1 syz-executor.3 db_enter() at db_enter+0x1c sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff8279cca0) at panic+0x17b sys/kern/subr_prf.c:198 __assert(ffffffff8281786b,ffffffff8276b015,109,ffffffff82846c87) at __assert+0x29 sys/kern/subr_prf.c:157 setrunqueue(ffff800020d58ff0,ffff8000212765a0,50) at setrunqueue+0x2e5 sys/kern/kern_sched.c:263 schedcpu(ffffffff82c9d758) at schedcpu+0x28b sys/kern/sched_bsd.c:236 timeout_run(ffffffff82c9d758) at timeout_run+0xd0 sys/kern/kern_timeout.c:640 softclock_process_tick_timeout(ffffffff82c9d758,0) at softclock_process_tick_timeout+0x1b0 sys/kern/kern_timeout.c:687 softclock(0) at softclock+0x130 sys/kern/kern_timeout.c:710 softintr_dispatch(0) at softintr_dispatch+0xfb sys/arch/amd64/amd64/softintr.c:90 Xsoftclock() at Xsoftclock+0x27 end of kernel end trace frame: 0x759378275cc0, count: 5 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}> set $maxwidth = 0 ddb{0}> show panic *cpu0: kernel diagnostic assertion "!ISSET(p->p_flag, P_WSLEEP) || p->p_stat == SSTOP" failed: file "/syzkaller/managers/setuid/kernel/sys/kern/kern_sched.c", line 265 ddb{0}> trace db_enter() at db_enter+0x1c sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff8279cca0) at panic+0x17b sys/kern/subr_prf.c:198 __assert(ffffffff8281786b,ffffffff8276b015,109,ffffffff82846c87) at __assert+0x29 sys/kern/subr_prf.c:157 setrunqueue(ffff800020d58ff0,ffff8000212765a0,50) at setrunqueue+0x2e5 sys/kern/kern_sched.c:263 schedcpu(ffffffff82c9d758) at schedcpu+0x28b sys/kern/sched_bsd.c:236 timeout_run(ffffffff82c9d758) at timeout_run+0xd0 sys/kern/kern_timeout.c:640 softclock_process_tick_timeout(ffffffff82c9d758,0) at softclock_process_tick_timeout+0x1b0 sys/kern/kern_timeout.c:687 softclock(0) at softclock+0x130 sys/kern/kern_timeout.c:710 softintr_dispatch(0) at softintr_dispatch+0xfb sys/arch/amd64/amd64/softintr.c:90 Xsoftclock() at Xsoftclock+0x27 end of kernel end trace frame: 0x759378275cc0, count: -10 ddb{0}> show registers rdi 0 rsi 0x1 rbp 0xffff80002e25afd0 rbx 0xffffffff82b8bb8f cpu_info_full_primary+0x2b8f rdx 0 rcx 0xffff800021277b60 rax 0xffffffff82b8aff0 cpu_info_full_primary+0x1ff0 r8 0x101010101010101 r9 0x8080808080808080 r10 0x369f4846d07747a9 r11 0x6bfce1fdf508a255 r12 0xffffffff82b8b990 cpu_info_full_primary+0x2990 r13 0 r14 0 r15 0x1 rip 0xffffffff81984ecc db_enter+0x1c cs 0x8 rflags 0x246 rsp 0xffff80002e25afc0 ss 0 db_enter+0x1c: addq $0x8,%rsp ddb{0}> show proc PROC (syz-executor.4) pid=419803 stat=onproc flags process=10 proc=0 pri=67, usrpri=67, nice=20 forw=0xffffffffffffffff, list=0xffff8000212762e8,0xffff8000212765b0 process=0xffff8000ffffb678 user=0xffff80002e256000, vmspace=0xfffffd8069c56930 estcpu=34, cpticks=0, pctcpu=0.0 user=0, sys=0, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND 71408 89152 63943 32767 2 0x10 syz-executor.5 * 4075 419803 91378 32767 7 0x10 syz-executor.4 25354 202443 42562 32767 7 0x10 syz-executor.3 25354 412941 42562 32767 2 0x4000010 syz-executor.3 53656 49159 23651 32767 3 0x3810 suspend syz-executor.2 53656 329651 23651 32767 2 0x40818b0 syz-executor.2 59987 20230 9045 32767 3 0x90 nanoslp syz-executor.7 59987 59537 9045 32767 3 0x4000090 fsleep syz-executor.7 59987 363244 9045 32767 3 0x4000090 fsleep syz-executor.7 4684 515211 15959 32767 2 0x10 syz-executor.1 15959 314541 6697 32767 2 0x10 syz-executor.1 6697 246982 81901 0 3 0x82 wait syz-executor.1 91378 332224 62358 32767 3 0x90 nanoslp syz-executor.4 62358 142959 81901 0 3 0x82 wait syz-executor.4 42562 14524 81517 32767 3 0x90 nanoslp syz-executor.3 81517 236464 81901 0 3 0x82 wait syz-executor.3 63943 434163 84913 32767 3 0x90 nanoslp syz-executor.5 84913 190469 81901 0 3 0x82 wait syz-executor.5 23651 117385 78795 32767 3 0x90 nanoslp syz-executor.2 78795 384377 81901 0 3 0x82 wait syz-executor.2 9045 510066 16006 32767 3 0x90 nanoslp syz-executor.7 16006 296134 81901 0 3 0x82 wait syz-executor.7 86968 383868 56909 32767 3 0x90 nanoslp syz-executor.0 56909 406928 81901 0 3 0x82 wait syz-executor.0 63712 449148 0 0 3 0x14200 bored sosplice 81901 491076 32160 0 3 0x82 kqread syz-fuzzer 81901 265258 32160 0 3 0x4000082 nanoslp syz-fuzzer 81901 98933 32160 0 3 0x4000082 wait syz-fuzzer 81901 185759 32160 0 3 0x4000082 wait syz-fuzzer 81901 110690 32160 0 3 0x4000082 thrsleep syz-fuzzer 81901 172281 32160 0 3 0x4000082 wait syz-fuzzer 81901 517702 32160 0 3 0x4000082 thrsleep syz-fuzzer 81901 13632 32160 0 3 0x4000082 wait syz-fuzzer 81901 147892 32160 0 3 0x4000082 thrsleep syz-fuzzer 81901 448513 32160 0 3 0x4000082 wait syz-fuzzer 81901 370869 32160 0 3 0x4000082 thrsleep syz-fuzzer 81901 136535 32160 0 2 0x4000002 syz-fuzzer 81901 194180 32160 0 3 0x4000082 wait syz-fuzzer 81901 136956 32160 0 3 0x4000082 thrsleep syz-fuzzer 81901 19740 32160 0 3 0x4000082 wait syz-fuzzer 81901 287952 32160 0 3 0x4000082 thrsleep syz-fuzzer 32160 198249 76731 0 3 0x10008a sigsusp ksh 76731 494049 37354 0 3 0x9a kqread sshd 81363 202300 1 0 3 0x100083 ttyin getty 37354 410960 1 0 3 0x88 kqread sshd 12083 213275 88143 73 3 0x1100090 kqread syslogd 88143 232800 1 0 3 0x100082 netio syslogd 35151 455250 1 0 3 0x100080 kqread resolvd 54514 94879 935 77 3 0x100092 kqread dhcpleased 92187 372947 935 77 3 0x100092 kqread dhcpleased 935 398061 1 0 3 0x80 kqread dhcpleased 25241 89581 0 0 3 0x14200 bored smr 14392 310400 0 0 2 0x14200 zerothread 51907 228718 0 0 3 0x14200 aiodoned aiodoned 64590 199594 0 0 3 0x14200 syncer update 21400 124098 0 0 3 0x14200 cleaner cleaner 4775 356974 0 0 3 0x14200 reaper reaper 79576 281279 0 0 3 0x14200 pgdaemon pagedaemon 12229 289298 0 0 3 0x14200 bored viomb 22533 454686 0 0 3 0x40014200 acpi0 acpi0 28049 30113 0 0 3 0x40014200 idle1 13182 266538 0 0 3 0x14200 bored softnet3 81685 157981 0 0 3 0x14200 bored softnet2 94902 258351 0 0 3 0x14200 bored softnet1 53451 344822 0 0 3 0x14200 bored softnet0 68677 440410 0 0 3 0x14200 bored systqmp 73145 389427 0 0 3 0x14200 bored systq 19968 339990 0 0 3 0x40014200 bored softclock 52736 302946 0 0 3 0x40014200 idle0 1 431208 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{0}> show all locks CPU 0: exclusive sched_lock &sched_lock r = 0 (0xffffffff82c9d710) #0 witness_lock+0x447 #1 schedcpu+0x119 sys/kern/sched_bsd.c:219 #2 timeout_run+0xd0 sys/kern/kern_timeout.c:640 #3 softclock_process_tick_timeout+0x1b0 sys/kern/kern_timeout.c:687 #4 softclock+0x130 sys/kern/kern_timeout.c:710 #5 softintr_dispatch+0xfb sys/arch/amd64/amd64/softintr.c:90 #6 Xsoftclock+0x27 shared mutex timeout r = 0 (0xffffffff82b6d830) #0 witness_lock+0x447 #1 timeout_run+0xbb sys/kern/kern_timeout.c:636 #2 softclock_process_tick_timeout+0x1b0 sys/kern/kern_timeout.c:687 #3 softclock+0x130 sys/kern/kern_timeout.c:710 #4 softintr_dispatch+0xfb sys/arch/amd64/amd64/softintr.c:90 #5 Xsoftclock+0x27 Process 4075 (syz-executor.4) thread 0xffff800021277b60 (419803) exclusive kernel_lock &kernel_lock r = 0 (0xffffffff82ce6170) #0 witness_lock+0x447 #1 softintr_dispatch+0x52 sys/arch/amd64/amd64/softintr.c:88 #2 Xsoftclock+0x27 exclusive sched_lock &sched_lock r = 0 (0xffffffff82c9d710) #0 witness_lock+0x447 #1 schedcpu+0x119 sys/kern/sched_bsd.c:219 #2 timeout_run+0xd0 sys/kern/kern_timeout.c:640 #3 softclock_process_tick_timeout+0x1b0 sys/kern/kern_timeout.c:687 #4 softclock+0x130 sys/kern/kern_timeout.c:710 #5 softintr_dispatch+0xfb sys/arch/amd64/amd64/softintr.c:90 #6 Xsoftclock+0x27 shared mutex timeout r = 0 (0xffffffff82b6d830) #0 witness_lock+0x447 #1 timeout_run+0xbb sys/kern/kern_timeout.c:636 #2 softclock_process_tick_timeout+0x1b0 sys/kern/kern_timeout.c:687 #3 softclock+0x130 sys/kern/kern_timeout.c:710 #4 softintr_dispatch+0xfb sys/arch/amd64/amd64/softintr.c:90 #5 Xsoftclock+0x27 ddb{0}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim devbuf 10197 6408K 6419K 78643K 11588 0 pcb 13 12K 14K 78643K 17 0 rtable 216 6K 7K 78643K 3588 0 pf 27 8K 8K 78643K 235 0 ifaddr 40 15K 16K 78643K 464 0 ifgroup 46 2K 2K 78643K 462 0 sysctl 3 1K 2K 78643K 5 0 counters 58 35K 35K 78643K 266 0 ioctlops 0 0K 2K 78643K 306 0 iov 0 0K 28K 78643K 2049 0 mount 1 1K 1K 78643K 1 0 log 0 0K 0K 78643K 4 0 vnodes 1279 80K 80K 78643K 6905 0 UFS quota 1 32K 32K 78643K 1 0 UFS mount 5 36K 36K 78643K 5 0 shm 2 1K 9K 78643K 293 0 VM map 2 1K 1K 78643K 2 0 sem 12 0K 1K 78643K 1141 0 dirhash 12 2K 2K 78643K 12 0 ACPI 1697 195K 286K 78643K 12548 0 file desc 22 81K 113K 78643K 19731 0 sigio 0 0K 0K 78643K 1994 0 proc 56 78K 103K 78643K 4376 0 subproc 91 5K 6K 78643K 1443 0 NFS srvsock 1 0K 0K 78643K 1 0 NFS daemon 1 16K 16K 78643K 1 0 ip_moptions 0 0K 0K 78643K 651 0 in_multi 88 6K 7K 78643K 1399 0 ether_multi 1 0K 0K 78643K 27 0 mrt 1 0K 0K 78643K 1 0 ISOFS mount 1 32K 32K 78643K 1 0 MSDOSFS mount 1 16K 16K 78643K 1 0 ttys 181 811K 811K 78643K 181 0 exec 0 0K 1K 78643K 4057 0 tdb 3 0K 0K 78643K 3 0 pagedep 1 8K 8K 78643K 1 0 inodedep 1 32K 32K 78643K 1 0 newblk 1 0K 0K 78643K 1 0 VM swap 8 62K 64K 78643K 10 0 UVM amap 438 84K 107K 78643K 189574 0 UVM aobj 131 8K 8K 78643K 140 0 memdesc 1 4K 4K 78643K 1 0 crypto data 1 1K 1K 78643K 1 0 ip6_options 0 0K 0K 78643K 327 0 NDP 10 0K 2K 78643K 336 0 temp 70 5871K 5956K 78643K 58171 0 kqueue 12 18K 28K 78643K 2021 0 SYN cache 2 16K 16K 78643K 2 0 ddb{0}> show all pools Name Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle plcache 128 22 0 0 1 0 1 1 0 8 0 rtpcb 120 425 0 422 2 1 1 2 0 8 0 rtentry 112 1272 0 1171 4 0 4 4 0 8 0 unpcb 144 16047 0 16034 127 121 6 8 0 8 5 syncache 296 121 0 121 27 26 1 1 0 8 1 tcpqe 32 173 0 173 16 16 0 1 0 8 0 tcpcb 808 5385 0 5381 190 182 8 14 0 8 7 arp 120 224 0 208 1 0 1 1 0 8 0 ipq 40 60 0 58 11 10 1 1 0 8 0 ipqe 40 149 0 147 11 10 1 1 0 8 0 inpcb 368 26198 0 26191 288 279 9 18 0 8 8 nd6 136 361 0 338 1 0 1 1 0 8 0 kcovpl 48 111 0 104 1 0 1 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 5143 0 4721 36 6 30 31 0 8 1 art_table 32 5144 0 4721 4 0 4 4 0 8 0 art_node 16 1271 0 1179 1 0 1 1 0 8 0 sysvmsgpl 40 3 0 0 1 0 1 1 0 8 0 semapl 112 1137 0 1127 1 0 1 1 0 8 0 shmpl 112 137 0 9 4 0 4 4 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 26866 0 25418 92 0 92 92 0 8 0 ffsino 272 26866 0 25418 98 0 98 98 0 8 0 nchpl 144 53173 0 51539 63 0 63 63 0 8 0 uvmvnodes 80 5926 0 0 121 0 121 121 0 8 0 vnodes 216 5926 0 0 330 0 330 330 0 8 0 namei 1024 183563 0 183563 6 5 1 3 0 8 1 percpumem 16 146 0 104 1 0 1 1 0 8 0 kstatmem 264 228 0 208 2 0 2 2 0 8 0 scxspl 216 153342 0 153342 60 59 1 8 0 8 1 plimitpl 152 3204 0 3182 33 32 1 2 0 8 0 sigapl 424 19820 0 19768 7 0 7 7 0 8 0 futexpl 64 139949 0 139946 1 0 1 1 0 8 0 knotepl 120 1024 0 0 15 2 13 15 0 8 0 kqueuepl 216 3991 0 3983 48 47 1 8 0 8 0 pipepl 320 6505 0 6480 144 139 5 14 0 8 2 fdescpl 496 19802 0 19769 7 2 5 6 0 8 0 filepl 152 136487 0 136274 246 229 17 26 0 8 8 lockfpl 104 3411 0 3409 2 1 1 2 0 8 0 lockfspl 48 1172 0 1170 1 0 1 1 0 8 0 sessionpl 144 126 0 111 1 0 1 1 0 8 0 pgrppl 48 594 0 579 1 0 1 1 0 8 0 ucredpl 104 22875 0 22858 1 0 1 1 0 8 0 zombiepl 144 19769 0 19768 1 0 1 1 0 8 0 processpl 1072 19820 0 19768 4 0 4 4 0 8 0 procpl 696 52668 0 52597 25 17 8 9 0 8 0 sosppl 168 247 0 247 26 26 0 1 0 8 0 sockpl 488 43273 0 43241 770 755 15 34 0 8 8 mcl64k 65536 34 0 0 4 0 4 4 0 8 0 mcl16k 16384 25 0 0 4 1 3 3 0 8 0 mcl12k 12288 25 0 0 2 0 2 2 0 8 0 mcl9k 9216 17 0 0 2 0 2 2 0 8 0 mcl8k 8192 17 0 0 3 0 3 3 0 8 0 mcl4k 4096 80 0 0 5 2 3 4 0 8 0 mcl2k2 2112 13 0 0 1 0 1 1 0 8 0 mcl2k 2048 394 0 0 32 19 13 32 0 8 0 mtagpl 96 4 0 0 1 0 1 1 0 8 0 mbufpl 256 1795 0 0 76 0 76 76 0 8 0 bufpl 288 32370 0 26055 452 0 452 452 0 8 0 anonpl 24 1910378 0 1900915 190 99 91 97 0 186 3 amapchunkpl 152 601456 0 600653 149 112 37 51 0 158 2 amappl16 200 36060 0 35797 196 172 24 28 0 8 8 amappl15 192 14 0 13 1 0 1 1 0 8 0 amappl14 184 515 0 499 2 1 1 2 0 8 0 amappl13 176 34 0 33 9 8 1 1 0 8 0 amappl12 168 22068 0 22030 3 0 3 3 0 8 0 amappl11 160 72 0 60 1 0 1 1 0 8 0 amappl10 152 159 0 144 1 0 1 1 0 8 0 amappl9 144 318 0 318 24 24 0 2 0 8 0 amappl8 136 1297 0 1096 9 1 8 8 0 8 0 amappl7 128 287 0 267 1 0 1 1 0 8 0 amappl6 120 1083 0 1053 2 1 1 2 0 8 0 amappl5 112 911 0 905 1 0 1 1 0 8 0 amappl4 104 2312 0 2260 2 0 2 2 0 8 0 amappl3 96 116219 0 116132 15 12 3 4 0 8 0 amappl2 88 20630 0 20555 4 2 2 3 0 8 0 amappl1 80 84368 0 83846 22 10 12 22 0 8 0 amappl 88 187588 0 187353 7 0 7 7 0 92 0 dma4096 4096 1 0 1 1 1 0 1 0 8 0 dma1024 1024 1 0 0 1 0 1 1 0 8 0 dma256 256 6 0 6 1 1 0 1 0 8 0 dma128 128 253 0 253 1 1 0 1 0 8 0 dma64 64 6 0 6 1 1 0 1 0 8 0 dma32 32 7 0 7 1 1 0 1 0 8 0 dma16 16 18 0 17 1 0 1 1 0 8 0 aobjpl 72 139 0 9 3 0 3 3 0 8 0 uaddrrnd 24 19803 0 19770 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 19803 0 19770 1 0 1 1 0 8 0 vmmpekpl 168 159893 0 159830 4 0 4 4 0 8 0 vmmpepl 168 1186238 0 1183821 259 130 129 129 0 357 4 vmsppl 464 19802 0 19770 7 2 5 6 0 8 0 rwobjpl 56 283834 0 276373 124 14 110 110 0 8 0 pdppl 4096 39614 0 39540 1037 963 74 90 0 8 0 pvpl 32 5535456 0 5519765 522 343 179 360 0 265 15 pmappl 248 19802 0 19770 4 1 3 3 0 8 0 extentpl 40 56 0 38 1 0 1 1 0 8 0 phpool 112 2330 0 1459 26 0 26 26 0 8 0 ddb{0}> machine ddbcpu 0 Invalid cpu 0 ddb{0}> trace db_enter() at db_enter+0x1c sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff8279cca0) at panic+0x17b sys/kern/subr_prf.c:198 __assert(ffffffff8281786b,ffffffff8276b015,109,ffffffff82846c87) at __assert+0x29 sys/kern/subr_prf.c:157 setrunqueue(ffff800020d58ff0,ffff8000212765a0,50) at setrunqueue+0x2e5 sys/kern/kern_sched.c:263 schedcpu(ffffffff82c9d758) at schedcpu+0x28b sys/kern/sched_bsd.c:236 timeout_run(ffffffff82c9d758) at timeout_run+0xd0 sys/kern/kern_timeout.c:640 softclock_process_tick_timeout(ffffffff82c9d758,0) at softclock_process_tick_timeout+0x1b0 sys/kern/kern_timeout.c:687 softclock(0) at softclock+0x130 sys/kern/kern_timeout.c:710 softintr_dispatch(0) at softintr_dispatch+0xfb sys/arch/amd64/amd64/softintr.c:90 Xsoftclock() at Xsoftclock+0x27 end of kernel end trace frame: 0x759378275cc0, count: -10 ddb{0}> machine ddbcpu 1 Stopped at x86_ipi_db+0x1e: addq $0x8,%rsp x86_ipi_db(ffff800020d58ff0) at x86_ipi_db+0x1e sys/arch/amd64/amd64/db_interface.c:393 x86_ipi_handler() at x86_ipi_handler+0xb7 sys/arch/amd64/amd64/ipi.c:106 Xresume_lapic_ipi() at Xresume_lapic_ipi+0x27 __mp_lock(ffffffff82c9d508) at __mp_lock+0x122 __mp_lock_spin sys/kern/kern_lock.c:116 [inline] __mp_lock(ffffffff82c9d508) at __mp_lock+0x122 sys/kern/kern_lock.c:147 preempt() at preempt+0x37 sys/kern/sched_bsd.c:297 ast(ffff80002e255e20) at ast+0x109 mi_ast sys/sys/syscall_mi.h:192 [inline] ast(ffff80002e255e20) at ast+0x109 sys/arch/amd64/amd64/trap.c:541 intr_user_exit() at intr_user_exit+0x3c end of kernel end trace frame: 0x7260be6cd080, count: 8 ddb{1}> trace x86_ipi_db(ffff800020d58ff0) at x86_ipi_db+0x1e sys/arch/amd64/amd64/db_interface.c:393 x86_ipi_handler() at x86_ipi_handler+0xb7 sys/arch/amd64/amd64/ipi.c:106 Xresume_lapic_ipi() at Xresume_lapic_ipi+0x27 __mp_lock(ffffffff82c9d508) at __mp_lock+0x122 __mp_lock_spin sys/kern/kern_lock.c:116 [inline] __mp_lock(ffffffff82c9d508) at __mp_lock+0x122 sys/kern/kern_lock.c:147 preempt() at preempt+0x37 sys/kern/sched_bsd.c:297 ast(ffff80002e255e20) at ast+0x109 mi_ast sys/sys/syscall_mi.h:192 [inline] ast(ffff80002e255e20) at ast+0x109 sys/arch/amd64/amd64/trap.c:541 intr_user_exit() at intr_user_exit+0x3c end of kernel end trace frame: 0x7260be6cd080, count: -7