panic: kernel diagnostic assertion "pr->ps_threadcnt == 0" failed: file "/syzkaller/managers/main/kernel/sys/kern/kern_exit.c", line 886 Stopped at db_enter+0x25: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *300185 36858 0 0x14000 0x200 0 reaper db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff833573e1) at panic+0x1cf sys/kern/subr_prf.c:198 __assert(ffffffff83396e6c,ffffffff833bcb9f,376,ffffffff833bcbd4) at __assert+0x29 sys/kern/subr_prf.c:-1 process_zap(ffff80002a794908) at process_zap+0x31d sys/kern/kern_exit.c:887 reaper(ffff80002a73cf90) at reaper+0x270 sys/kern/kern_exit.c:521 end trace frame: 0x0, count: 10 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> ddb> set $lines = 0 ddb> set $maxwidth = 0 ddb> show panic *cpu0: kernel diagnostic assertion "pr->ps_threadcnt == 0" failed: file "/syzkaller/managers/main/kernel/sys/kern/kern_exit.c", line 886 ddb> trace db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff833573e1) at panic+0x1cf sys/kern/subr_prf.c:198 __assert(ffffffff83396e6c,ffffffff833bcb9f,376,ffffffff833bcbd4) at __assert+0x29 sys/kern/subr_prf.c:-1 process_zap(ffff80002a794908) at process_zap+0x31d sys/kern/kern_exit.c:887 reaper(ffff80002a73cf90) at reaper+0x270 sys/kern/kern_exit.c:521 end trace frame: 0x0, count: -5 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff80002a772eb0 rbx 0x40000 acpi_pdirpa+0x2be71 rdx 0 rcx 0 rax 0xffff80002a73cf90 r8 0x101010101010101 r9 0x8080808080808080 r10 0xa46aadc94e38b4c1 r11 0xefea816a0e783291 r12 0 r13 0 r14 0 r15 0x1 rip 0xffffffff81f891b5 db_enter+0x25 cs 0x8 rflags 0x246 rsp 0xffff80002a772ea0 ss 0x10 db_enter+0x25: addq $0x8,%rsp ddb> show proc PROC (reaper) tid=300185 pid=36858 tcnt=1 stat=onproc flags process=14000 proc=200 runpri=32, usrpri=51, slppri=32, nice=20 wchan=0x0, wmesg=, ps_single=0x0 scnt=0 ecnt=0 forw=0xffffffffffffffff, list=0xffff80002a73c7c8,0xffff80002a73d4d0 process=0xffff8000ffffd680 user=0xffff80002a76e000, vmspace=0xffffffff83874608 estcpu=1, cpticks=7, pctcpu=0.1, user=0, sys=0, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 3390 399297 15555 0 2 0 syz-executor 3390 514304 15555 0 2 0x4000000 syz-executor 87011 39586 27874 0 2 0 syz-executor 87011 203707 27874 0 3 0x4000080 fsleep syz-executor 98032 105382 0 0 3 0x14280 nfsidl nfsio 75033 120168 0 0 3 0x14280 nfsidl nfsio 36421 34826 0 0 3 0x14280 nfsidl nfsio 15466 279640 0 0 3 0x14280 nfsidl nfsio 42480 482055 0 0 3 0x14280 nfsidl nfsio 99170 50840 0 0 3 0x14280 nfsidl nfsio 77921 380113 0 0 3 0x14280 nfsidl nfsio 36540 172545 0 0 3 0x14280 nfsidl nfsio 90318 56096 0 0 3 0x14280 nfsidl nfsio 72303 167199 85082 0 2 0 syz-executor 72303 345696 85082 0 3 0x4000080 sysctllk syz-executor 72303 96440 85082 0 2 0x4000000 syz-executor 47786 103541 0 0 3 0x14280 nfsidl nfsio 1607 173968 0 0 3 0x14280 nfsidl nfsio 56054 520392 0 0 3 0x14280 nfsidl nfsio 75663 108119 29837 0 2 0xc80 syz-executor 75663 510790 29837 0 3 0x4000080 sysctllk syz-executor 95648 17745 33120 0 2 0xc80 syz-executor 95648 84277 33120 0 3 0x4000080 nanoslp syz-executor 95648 518701 33120 0 3 0x4000080 fsleep syz-executor 52971 511760 86079 0 3 0x3000 suspend syz-executor 52971 463374 86079 0 2 0x4081000 syz-executor 15555 137324 41689 0 3 0x2 kqpsl syz-executor 50128 212493 1 0 3 0x100083 ttyin getty 38892 100305 0 0 3 0x14200 acct acct 37925 177304 0 0 3 0x14280 nfsidl nfsio 43778 45773 0 0 3 0x14280 nfsidl nfsio 11604 375485 0 0 3 0x14280 nfsidl nfsio 53042 307387 0 0 3 0x14280 nfsidl nfsio 29837 176790 41689 0 3 0x82 nanoslp syz-executor 33120 409668 41689 0 3 0x82 nanoslp syz-executor 85082 95613 41689 0 3 0x82 nanoslp syz-executor 61937 150470 41689 0 2 0x2 syz-executor 27874 193278 41689 0 2 0x2 syz-executor 49773 402342 41689 0 3 0x82 wait syz-executor 86079 418848 41689 0 3 0x82 nanoslp syz-executor 41689 79222 24502 0 2 0x2 syz-executor 24502 465481 58886 0 3 0x10008a sigsusp ksh 58886 261452 29556 0 3 0x98 kqread sshd-session 29556 417639 13196 0 3 0x92 kqread sshd-session 13196 455658 1 0 3 0x88 kqread sshd 9692 78211 29830 73 3 0x1100090 kqread syslogd 29830 489143 1 0 3 0x100082 sbwait syslogd 80889 88991 1 0 3 0x100080 kqread resolvd 26175 185405 41170 77 3 0x100092 kqread dhcpleased 19638 24713 41170 77 3 0x100092 kqread dhcpleased 41170 419862 1 0 3 0x80 kqread dhcpleased 20026 3942 0 0 3 0x14200 bored smr 7773 269134 0 0 2 0x14200 zerothread 65400 28736 0 0 3 0x14200 aiodoned aiodoned 11338 125442 0 0 3 0x14200 syncer update 52886 252790 0 0 3 0x14200 cleaner cleaner *36858 300185 0 0 7 0x14200 reaper 40912 521489 0 0 3 0x14200 pgdaemon pagedaemon 53970 406292 0 0 3 0x14200 bored viomb 89100 340222 0 0 3 0x40014200 acpi0 acpi0 33300 415087 0 0 3 0x14200 bored softnet0 69992 85487 0 0 3 0x14200 bored systqmp 26877 222668 0 0 3 0x14200 bored systq 34166 136463 0 0 3 0x40014200 tmoslp softclock 93552 67943 0 0 3 0x40014200 idle0 1 197577 0 0 3 0x82 wait init 0 0 -1 0 3 0x10010200 scheduler swapper ddb> show all locks No such command ddb> show malloc Type InUse MemUse HighUse Limit Requests Type Lim devbuf 10202 11045K 11365K 166960K 11982 0 pcb 17 14K 16K 166960K 293 0 rtable 222 8K 8K 166960K 479 0 pf 31 13K 18K 166960K 185 0 ifaddr 41 7K 7K 166960K 86 0 ifgroup 50 2K 2K 166960K 131 0 sysctl 4 1K 9K 166960K 8 0 counters 32 17K 18K 166960K 77 0 ioctlops 0 0K 4K 166960K 401 0 iov 0 0K 16K 166960K 44 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1463 92K 92K 166960K 1917 0 UFS quota 1 32K 32K 166960K 1 0 UFS mount 5 36K 36K 166960K 5 0 shm 2 1K 9K 166960K 13 0 VM map 2 1K 1K 166960K 2 0 sem 12 0K 0K 166960K 27 0 dirhash 12 2K 2K 166960K 24 0 ACPI 1692 195K 286K 166960K 12470 0 file desc 17 61K 93K 166960K 799 0 sigio 0 0K 0K 166960K 15 0 proc 60 59K 83K 166960K 611 0 subproc 72 4K 4K 166960K 81 0 NFS srvsock 1 0K 0K 166960K 1 0 NFS daemon 1 16K 16K 166960K 1 0 ip_moptions 0 0K 0K 166960K 72 0 in_multi 100 7K 7K 166960K 141 0 ether_multi 1 0K 0K 166960K 9 0 mrt 1 0K 0K 166960K 8 0 ISOFS mount 1 32K 32K 166960K 1 0 MSDOSFS mount 1 16K 16K 166960K 1 0 ttys 247 1102K 1102K 166960K 247 0 exec 0 0K 1K 166960K 441 0 fusefs mount 1 32K 32K 166960K 1 0 pfkey data 0 0K 0K 166960K 1 0 tdb 3 0K 0K 166960K 3 0 VM swap 8 62K 64K 166960K 10 0 UVM amap 240 144K 157K 166960K 9121 0 UVM aobj 22 2K 4K 166960K 26 0 pinsyscall 38 76K 92K 166960K 1884 0 memdesc 1 4K 4K 166960K 1 0 crypto data 1 1K 1K 166960K 1 0 ip6_options 0 0K 0K 166960K 34 0 NDP 11 0K 1K 166960K 57 0 temp 63 8648K 8723K 166960K 40978 0 kqueue 17 24K 28K 166960K 174 0 SYN cache 2 16K 16K 166960K 2 0 ddb> show all pools Name Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle rtpcb 120 101 0 97 1 0 1 1 0 8 0 rtentry 136 146 0 52 4 0 4 4 0 8 0 unpcb 144 494 0 479 6 5 1 6 0 8 0 syncache 336 4 0 4 1 1 0 1 0 8 0 tcpcb 736 240 0 236 7 6 1 7 0 8 0 arp 96 24 0 8 1 0 1 1 0 8 0 ipq 40 1 0 0 1 0 1 1 0 8 0 ipqe 40 2 0 0 1 0 1 1 0 8 0 inpcb 328 717 0 710 13 6 7 7 0 8 6 ip6q 72 6 0 2 1 0 1 1 0 8 0 ip6af 40 8 0 4 1 0 1 1 0 8 0 nd6 112 28 0 4 1 0 1 1 0 8 0 pkpcb 40 4 0 4 2 1 1 1 0 8 1 kcovpl 48 9 0 1 1 0 1 1 0 8 0 mppekey 1024 1 0 1 1 1 0 1 0 8 0 ppxss 1072 37 0 37 2 1 1 1 0 8 1 pppxif 1384 5 0 5 2 1 1 1 0 8 1 pfstscr 40 1 0 1 1 0 1 1 0 8 1 pfanchor 1288 1 0 0 1 0 1 1 0 8 0 pftag 88 1 0 0 1 0 1 1 0 8 0 pfstkey 128 1 0 1 1 0 1 1 0 8 1 pfstate 384 1 0 1 1 0 1 1 0 8 1 pfrule 1344 4 0 3 2 1 1 1 0 8 0 art_heap8 4096 3 0 0 3 0 3 3 0 8 0 art_heap4 256 605 0 172 30 1 29 30 0 8 1 art_table 40 608 0 172 5 0 5 5 0 8 0 art_node 32 144 0 60 1 0 1 1 0 8 0 sysvmsgpl 40 13 0 9 1 0 1 1 0 8 0 semupl 112 1 0 1 1 1 0 1 0 8 0 semapl 112 24 0 14 1 0 1 1 0 8 0 shmpl 112 23 0 4 1 0 1 1 0 8 0 dirhash 1024 25 0 8 3 0 3 3 0 8 0 dino2pl 256 2861 0 1361 95 0 95 95 0 8 0 ffsino 256 2861 0 1361 95 0 95 95 0 8 0 nchpl 144 4017 0 2327 64 0 64 64 0 8 0 rtmask 32 8 0 8 2 1 1 1 0 8 1 vnodes 216 3234 0 0 180 0 180 180 0 8 0 namei 1024 13779 0 13777 5 2 3 3 0 8 2 kstatmem 264 78 0 56 2 0 2 2 0 8 0 scsiplug 72 4 0 4 2 1 1 1 0 8 1 scxspl 216 12560 0 12560 10 2 8 8 1 8 8 plimitpl 152 263 0 247 1 0 1 1 0 8 0 sigapl 424 1114 0 1055 8 0 8 8 0 8 1 knotepl 120 75965 0 75902 23 13 10 15 0 8 8 kqueuepl 184 245 0 233 1 0 1 1 0 8 0 pipepl 304 306 0 279 10 0 10 10 0 8 7 fdescpl 448 1067 0 1038 5 1 4 5 0 8 0 filepl 120 6668 0 6454 17 4 13 13 0 8 4 lockfpl 104 293 0 291 2 1 1 2 0 8 0 lockfspl 48 129 0 127 1 0 1 1 0 8 0 sessionpl 144 24 0 16 1 0 1 1 0 8 0 pgrppl 48 42 0 25 1 0 1 1 0 8 0 ucredpl 104 932 0 920 1 0 1 1 0 8 0 zombiepl 144 1366 0 1364 1 0 1 1 0 8 0 processpl 1152 1114 0 1055 5 0 5 5 0 8 0 procpl 664 2282 0 2215 9 0 9 9 0 8 1 sosppl 176 2 0 2 1 0 1 1 0 8 1 sockpl 552 1337 0 1311 18 10 8 13 0 8 5 mcl64k 65536 98 0 96 1 0 1 1 0 8 0 mcl12k 12288 1 0 1 1 0 1 1 0 8 1 mcl9k 9216 1 0 1 1 1 0 1 0 8 0 mcl8k 8192 13 0 13 2 1 1 1 0 8 1 mcl4k 4096 3367 0 3317 14 6 8 13 0 8 1 mcl2k 2048 1142 0 1134 4 1 3 3 0 8 2 mtagpl 96 5 0 5 1 0 1 1 0 8 1 mbufpl 256 10919 0 10739 14 0 14 14 0 8 1 bufpl 280 3851 0 118 267 0 267 267 0 8 0 anonpl 24 180778 0 176476 58 20 38 48 0 187 6 amapchunkpl 152 30146 0 29611 35 7 28 28 0 158 5 amappl16 200 3210 0 3148 16 12 4 15 0 8 0 amappl15 192 19 0 19 1 1 0 1 0 8 0 amappl14 184 11 0 11 1 1 0 1 0 8 0 amappl13 176 418 0 416 1 0 1 1 0 8 0 amappl12 168 1419 0 1381 2 0 2 2 0 8 0 amappl11 160 10 0 10 1 1 0 1 0 8 0 amappl10 152 46 0 36 1 0 1 1 0 8 0 amappl9 144 254 0 253 1 0 1 1 0 8 0 amappl8 136 37 0 35 1 0 1 1 0 8 0 amappl7 128 94 0 93 1 0 1 1 0 8 0 amappl6 120 342 0 330 1 0 1 1 0 8 0 amappl5 112 71 0 64 1 0 1 1 0 8 0 amappl4 104 395 0 373 1 0 1 1 0 8 0 amappl3 96 5159 0 5064 3 0 3 3 0 8 0 amappl2 88 1182 0 1112 2 0 2 2 0 8 0 amappl1 80 11475 0 10939 13 1 12 13 0 8 0 amappl 88 8303 0 8132 5 0 5 5 0 92 0 uvmvnodes 80 3233 0 0 66 0 66 66 0 8 0 dma4096 4096 1 0 1 1 1 0 1 0 8 0 dma1024 1024 2 0 1 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 7 0 7 2 1 1 1 0 8 1 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 25 0 4 1 0 1 1 0 8 0 uaddrrnd 24 1067 0 1038 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 1067 0 1038 1 0 1 1 0 8 0 vmmpekpl 168 10679 0 10636 3 0 3 3 0 8 0 vmmpepl 168 73544 0 71709 94 11 83 92 0 357 0 vmsppl 368 1066 0 1038 4 1 3 4 0 8 0 rwobjpl 40 24635 0 20497 42 0 42 42 0 8 0 pdppl 4096 2140 0 2076 102 34 68 80 0 8 4 pvpl 32 476550 0 465815 133 28 105 120 0 265 13 pmappl 216 1066 0 1038 3 0 3 3 0 8 0 extentpl 40 45 0 27 1 0 1 1 0 8 0 phpool 112 389 0 57 10 0 10 10 0 8 0 ddb> machine ddbcpu 0 No such command ddb> trace db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff833573e1) at panic+0x1cf sys/kern/subr_prf.c:198 __assert(ffffffff83396e6c,ffffffff833bcb9f,376,ffffffff833bcbd4) at __assert+0x29 sys/kern/subr_prf.c:-1 process_zap(ffff80002a794908) at process_zap+0x31d sys/kern/kern_exit.c:887 reaper(ffff80002a73cf90) at reaper+0x270 sys/kern/kern_exit.c:521 end trace frame: 0x0, count: -5 ddb> machine ddbcpu 1 No such command ddb> trace db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff833573e1) at panic+0x1cf sys/kern/subr_prf.c:198 __assert(ffffffff83396e6c,ffffffff833bcb9f,376,ffffffff833bcbd4) at __assert+0x29 sys/kern/subr_prf.c:-1 process_zap(ffff80002a794908) at process_zap+0x31d sys/kern/kern_exit.c:887 reaper(ffff80002a73cf90) at reaper+0x270 sys/kern/kern_exit.c:521 end trace frame: 0x0, count: -5