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 *280264 44942 0 0x14000 0x200 0 reaper db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff83376123) at panic+0x1cf sys/kern/subr_prf.c:198 __assert(ffffffff833b73a2,ffffffff833d9a56,376,ffffffff833d9a8b) at __assert+0x29 sys/kern/subr_prf.c:-1 process_zap(ffff8000ffff8d98) at process_zap+0x31d sys/kern/kern_exit.c:887 reaper(ffff80002a72d4c0) 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(ffffffff83376123) at panic+0x1cf sys/kern/subr_prf.c:198 __assert(ffffffff833b73a2,ffffffff833d9a56,376,ffffffff833d9a8b) at __assert+0x29 sys/kern/subr_prf.c:-1 process_zap(ffff8000ffff8d98) at process_zap+0x31d sys/kern/kern_exit.c:887 reaper(ffff80002a72d4c0) at reaper+0x270 sys/kern/kern_exit.c:521 end trace frame: 0x0, count: -5 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff80002a763500 rbx 0x40000 acpi_pdirpa+0x2be71 rdx 0 rcx 0 rax 0xffff80002a72d4c0 r8 0x101010101010101 r9 0x8080808080808080 r10 0xe93dc6d8d3958f4f r11 0xf060ca1d1d53e91a r12 0 r13 0 r14 0 r15 0x1 rip 0xffffffff82fce685 db_enter+0x25 cs 0x8 rflags 0x246 rsp 0xffff80002a7634f0 ss 0x10 db_enter+0x25: addq $0x8,%rsp ddb> show proc PROC (reaper) tid=280264 pid=44942 tcnt=1 stat=onproc flags process=14000 proc=200 runpri=32, usrpri=50, slppri=32, nice=20 wchan=0x0, wmesg=, ps_single=0x0 scnt=0 ecnt=0 forw=0xffffffffffffffff, list=0xffff80002a72d228,0xffff80002a72da00 process=0xffff8000ffffc480 user=0xffff80002a75e000, vmspace=0xffffffff83901d08 estcpu=0, cpticks=16, pctcpu=0.0, user=0, sys=0, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 97362 20021 42958 0 2 0 syz-executor 97362 514492 42958 0 2 0x4000000 syz-executor 88433 466971 65077 0 2 0 syz-executor 88433 215840 65077 0 3 0x4000080 fsleep syz-executor 1510 390210 0 0 3 0x14280 nfsidl nfsio 48202 330287 0 0 3 0x14280 nfsidl nfsio 21815 336901 0 0 3 0x14280 nfsidl nfsio 94766 384946 23080 0 2 0 syz-executor 94766 302562 23080 0 3 0x4000080 fsleep syz-executor 5314 257849 84975 0 2 0 syz-executor 5314 502901 84975 0 3 0x4000080 fifor syz-executor 5314 135084 84975 0 3 0x4000080 sysctllk syz-executor 5314 492980 84975 0 3 0x4000080 fsleep syz-executor 5314 191617 84975 0 2 0x4000000 syz-executor 27328 21122 84199 0 3 0x3000 suspend syz-executor 27328 54917 84199 0 2 0x4081000 syz-executor 53860 412280 56517 0 2 0 syz-executor 53860 71289 56517 0 2 0x4000000 syz-executor 53860 85460 56517 0 3 0x4000080 fsleep syz-executor 61120 198555 1 0 3 0x100083 ttyopn getty 84975 412883 44264 0 3 0x82 nanoslp syz-executor 23080 403275 44264 0 3 0x82 nanoslp syz-executor 42958 254234 44264 0 3 0x2 kqpsl syz-executor 577 422240 44264 0 3 0x82 nanoslp syz-executor 29694 402430 44264 0 2 0x2 syz-executor 65077 11391 44264 0 2 0x2 syz-executor 84199 510778 44264 0 3 0x82 nanoslp syz-executor 56517 268972 44264 0 3 0x82 nanoslp syz-executor 44264 481547 33858 0 3 0x82 kqread syz-executor 33858 305325 5094 0 3 0x10008a sigsusp ksh 5094 446716 96643 0 3 0x98 kqread sshd-session 96643 434037 63992 0 3 0x92 kqread sshd-session 63992 643 1 0 3 0x88 kqread sshd 58690 146040 94114 73 3 0x1100090 kqread syslogd 94114 301824 1 0 3 0x100082 sbwait syslogd 86863 472901 1 0 3 0x100080 kqread resolvd 41410 281774 20144 77 3 0x100092 kqread dhcpleased 15015 399282 20144 77 3 0x100092 kqread dhcpleased 20144 235804 1 0 3 0x80 kqread dhcpleased 94724 451554 0 0 3 0x14200 bored smr 81256 496722 0 0 2 0x14200 zerothread 41612 97025 0 0 3 0x14200 aiodoned aiodoned 27825 16540 0 0 3 0x14200 syncer update 67903 441116 0 0 3 0x14200 cleaner cleaner *44942 280264 0 0 7 0x14200 reaper 42227 346828 0 0 3 0x14200 pgdaemon pagedaemon 79886 514261 0 0 3 0x14200 bored viomb 7147 123587 0 0 3 0x40014200 acpi0 acpi0 99534 159693 0 0 3 0x14200 bored softnet0 52202 109260 0 0 3 0x14200 bored systqmp 34577 329246 0 0 3 0x14200 bored systq 47624 248551 0 0 3 0x40014200 tmoslp softclock 47331 36400 0 0 3 0x40014200 idle0 1 343204 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 10181 11113K 11473K 166960K 13097 0 pcb 17 13K 21K 166960K 398 0 rtable 238 10K 11K 166960K 526 0 pf 31 13K 17K 166960K 207 0 ifaddr 39 7K 8K 166960K 87 0 ifgroup 50 2K 2K 166960K 128 0 sysctl 4 1K 9K 166960K 18 0 counters 33 17K 18K 166960K 87 0 ioctlops 0 0K 4K 166960K 351 0 iov 0 0K 24K 166960K 40 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1450 91K 92K 166960K 2480 0 UFS quota 1 32K 32K 166960K 1 0 UFS mount 5 36K 36K 166960K 5 0 shm 2 1K 9K 166960K 25 0 VM map 2 1K 1K 166960K 2 0 sem 12 0K 0K 166960K 110 0 dirhash 12 2K 2K 166960K 18 0 ACPI 1692 195K 286K 166960K 12470 0 file desc 16 57K 89K 166960K 1101 0 sigio 0 0K 0K 166960K 29 0 proc 61 59K 91K 166960K 572 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 152 0 in_multi 79 5K 7K 166960K 156 0 ether_multi 1 0K 0K 166960K 22 0 mrt 1 0K 0K 166960K 16 0 ISOFS mount 1 32K 32K 166960K 1 0 MSDOSFS mount 1 16K 16K 166960K 1 0 ttys 85 387K 387K 166960K 85 0 exec 0 0K 1K 166960K 512 0 fusefs mount 1 32K 32K 166960K 1 0 pfkey data 0 0K 0K 166960K 2 0 tdb 3 0K 0K 166960K 3 0 VM swap 8 62K 64K 166960K 10 0 UVM amap 222 159K 177K 166960K 11919 0 UVM aobj 75 11K 11K 166960K 81 0 pinsyscall 37 74K 92K 166960K 2204 0 memdesc 1 4K 4K 166960K 1 0 crypto data 1 1K 1K 166960K 1 0 ip6_options 0 0K 1K 166960K 72 0 NDP 11 0K 2K 166960K 60 0 temp 79 8672K 8740K 166960K 49327 0 kqueue 16 22K 30K 166960K 193 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 286 0 282 3 2 1 3 0 8 0 rtentry 136 146 0 52 5 1 4 5 0 8 0 unpcb 144 651 0 634 4 0 4 4 0 8 3 syncache 336 7 0 7 2 1 1 1 0 8 1 tcpcb 736 595 0 591 16 7 9 10 0 8 8 arp 96 24 0 3 1 0 1 1 0 8 0 ipq 40 2 0 1 1 0 1 1 0 8 0 ipqe 40 5 0 4 1 0 1 1 0 8 0 inpcb 328 1388 0 1378 18 9 9 10 0 8 7 ip6q 72 3 0 1 1 0 1 1 0 8 0 ip6af 40 4 0 2 1 0 1 1 0 8 0 nd6 112 30 0 11 1 0 1 1 0 8 0 pkpcb 40 6 0 6 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 47 0 47 2 1 1 1 0 8 1 pppxif 1384 2 0 2 1 1 0 1 0 8 0 pfstscr 40 1 0 0 1 0 1 1 0 8 0 pfrktable 1344 2 0 2 2 1 1 1 0 8 1 pftag 88 2 0 2 1 0 1 1 0 8 1 pfstitem 24 2 0 0 1 0 1 1 0 8 0 pfstkey 128 2 0 0 1 0 1 1 0 8 0 pfstate 384 1 0 0 1 0 1 1 0 8 0 pfrule 1344 4 0 4 2 1 1 1 0 8 1 rttmr 136 1 0 1 1 0 1 1 0 8 1 art_heap8 4096 4 0 0 4 0 4 4 0 8 0 art_heap4 256 655 0 270 33 4 29 33 0 8 1 art_table 40 659 0 270 6 0 6 6 0 8 0 art_node 32 144 0 59 1 0 1 1 0 8 0 sysvmsgpl 40 7 0 4 1 0 1 1 0 8 0 semapl 112 105 0 95 1 0 1 1 0 8 0 shmpl 112 74 0 4 2 0 2 2 0 8 0 dirhash 1024 21 0 4 3 0 3 3 0 8 0 dino2pl 256 3455 0 1948 95 0 95 95 0 8 0 ffsino 256 3455 0 1948 95 0 95 95 0 8 0 nchpl 144 5017 0 3319 64 0 64 64 0 8 0 rtmask 32 16 0 16 2 1 1 1 0 8 1 vnodes 216 4234 0 0 236 0 236 236 0 8 0 namei 1024 17386 0 17385 3 2 1 2 0 8 0 vcpupl 3904 2 0 0 1 0 1 1 0 8 0 vmpool 800 4 0 2 1 0 1 1 0 8 0 kstatmem 264 82 0 60 2 0 2 2 0 8 0 acpiwqpl 32 1 0 1 1 0 1 1 1 8 1 scsiplug 72 10 0 10 2 1 1 1 0 8 1 scxspl 216 14991 0 14991 9 1 8 8 1 8 8 plimitpl 152 357 0 341 1 0 1 1 0 8 0 sigapl 424 1412 0 1367 8 0 8 8 0 8 2 knotepl 120 47636 0 47582 17 7 10 10 0 8 8 kqueuepl 184 541 0 499 6 2 4 4 0 8 2 pipepl 304 320 0 293 10 2 8 8 0 8 5 fdescpl 448 1374 0 1346 5 1 4 5 0 8 0 filepl 120 9475 0 9231 19 7 12 16 0 8 4 lockfpl 104 746 0 743 3 1 2 2 0 8 1 lockfspl 48 256 0 253 1 0 1 1 0 8 0 sessionpl 144 24 0 16 1 0 1 1 0 8 0 pgrppl 48 40 0 24 1 0 1 1 0 8 0 ucredpl 104 1363 0 1352 1 0 1 1 0 8 0 zombiepl 144 1786 0 1782 2 1 1 1 0 8 0 processpl 1152 1412 0 1367 5 0 5 5 0 8 1 procpl 664 3025 0 2967 8 0 8 8 0 8 2 sosppl 176 2 0 2 2 1 1 1 0 8 1 sockpl 552 2525 0 2494 18 8 10 12 0 8 7 mcl64k 65536 170 0 169 1 0 1 1 0 8 0 mcl16k 16384 3 0 3 1 0 1 1 0 8 1 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 11 0 11 2 1 1 1 0 8 1 mcl4k 4096 3790 0 3740 15 7 8 14 0 8 1 mcl2k 2048 1586 0 1581 2 0 2 2 0 8 0 mtagpl 96 40 0 12 1 0 1 1 0 8 0 mbufpl 256 17116 0 16949 76 51 25 76 0 8 8 bufpl 280 5310 0 123 371 0 371 371 0 8 0 anonpl 24 208589 0 205086 64 19 45 45 0 187 14 amapchunkpl 152 39955 0 39487 40 11 29 33 0 158 3 amappl16 200 3424 0 3389 27 15 12 15 0 8 8 amappl15 192 72 0 72 1 1 0 1 0 8 0 amappl14 184 13 0 13 2 1 1 1 0 8 1 amappl13 176 418 0 417 1 0 1 1 0 8 0 amappl12 168 1724 0 1687 2 0 2 2 0 8 0 amappl11 160 5 0 5 1 1 0 1 0 8 0 amappl10 152 48 0 38 1 0 1 1 0 8 0 amappl9 144 233 0 232 2 1 1 1 0 8 0 amappl8 136 41 0 40 1 0 1 1 0 8 0 amappl7 128 81 0 79 1 0 1 1 0 8 0 amappl6 120 285 0 274 1 0 1 1 0 8 0 amappl5 112 68 0 60 1 0 1 1 0 8 0 amappl4 104 386 0 361 1 0 1 1 0 8 0 amappl3 96 7904 0 7807 5 1 4 4 0 8 1 amappl2 88 539 0 484 2 0 2 2 0 8 0 amappl1 80 13071 0 12526 13 0 13 13 0 8 1 amappl 88 11020 0 10868 5 0 5 5 0 92 0 uvmvnodes 80 131 0 0 3 0 3 3 0 8 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 7 0 7 2 1 1 1 0 8 1 dma128 128 258 0 258 2 1 1 1 0 8 1 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 19 0 18 1 0 1 1 0 8 0 aobjpl 72 80 0 6 2 0 2 2 0 8 0 uaddrrnd 24 1374 0 1346 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 1374 0 1346 1 0 1 1 0 8 0 vmmpekpl 168 12522 0 12483 3 0 3 3 0 8 0 vmmpepl 168 91740 0 89977 101 9 92 92 0 357 8 vmsppl 368 1373 0 1345 4 1 3 4 0 8 0 rwobjpl 40 25246 0 24193 15 2 13 13 0 8 0 pdppl 4096 2762 0 2696 108 40 68 78 0 8 2 pvpl 32 587094 0 578535 146 40 106 122 0 265 16 pmappl 216 1377 0 1347 2 0 2 2 0 8 0 extentpl 40 45 0 27 1 0 1 1 0 8 0 phpool 112 470 0 118 12 0 12 12 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(ffffffff83376123) at panic+0x1cf sys/kern/subr_prf.c:198 __assert(ffffffff833b73a2,ffffffff833d9a56,376,ffffffff833d9a8b) at __assert+0x29 sys/kern/subr_prf.c:-1 process_zap(ffff8000ffff8d98) at process_zap+0x31d sys/kern/kern_exit.c:887 reaper(ffff80002a72d4c0) 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(ffffffff83376123) at panic+0x1cf sys/kern/subr_prf.c:198 __assert(ffffffff833b73a2,ffffffff833d9a56,376,ffffffff833d9a8b) at __assert+0x29 sys/kern/subr_prf.c:-1 process_zap(ffff8000ffff8d98) at process_zap+0x31d sys/kern/kern_exit.c:887 reaper(ffff80002a72d4c0) at reaper+0x270 sys/kern/kern_exit.c:521 end trace frame: 0x0, count: -5