[Bug] Windows Server 2022 上私有工作集采样返回零并使宿主测试失败

オープン
#1,780 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
48/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
rust

調査の方向性

Start with windows/tauri/src-tauri/src/memory.rs and the named test memory::platform::tests::current_process_private_working_set_is_available; reproduce it on Windows Server 2022 with the command in the report. Compare the private working set result with the ordinary working set and check how the implementation handles an unavailable or zero value. Done when the test passes with a valid positive sample, or unavailable data is reported without being treated as a successful zero.

索引モデルが issue の本文から書いたものです。

説明

area:other bug P2 platform:windows review: high
Platform / 平台

Windows

Area / 模块

Other / 其他

Lithe version / Lithe 版本

源码测试:preview 0d38aca1b008acdb80db677b11435ceab68c67c5 与 PR #1478 的本地合并树;windows/tauri/src-tauri/src/memory.rs 相对该 preview 未修改。未运行已发布的安装包。

Priority / 优先级

P2 / 后续考虑:目前不着急,可安排到后续版本

OS and architecture / 操作系统与架构

Windows Server 2022 Datacenter 21H2,build 20348.859,x86_64;云端 Windows 主机,经 SSH 执行原生测试。

Environment / 环境信息
  • 测试为 Windows 源码 debug 构建,不涉及项目工作区或插件;没有启动产品 GUI。
  • 8 个逻辑处理器,约 16 GiB 内存;Rust 1.99.1、Cargo 1.99.1。
  • 测试时点为 2026-11-07 11:12(UTC+8)附近;未调查其他 Windows 版本或发布包。
Steps to reproduce / 复现步骤
  1. 在上述 Windows 环境编译 Windows Tauri 宿主的测试目标。
  2. 运行 cargo test --manifest-path windows/tauri/src-tauri/Cargo.toml memory::platform::tests::current_process_private_working_set_is_available -- --exact。
  3. 观察当前进程内存采样结果及断言。
Expected behavior / 预期行为

测试进程有实际驻留内存时,私有工作集采样返回可用的正数;若系统不能提供该指标,不应把不可用值当作成功的零字节。

Actual behavior / 实际行为

测试中的 application_memory_usage() 成功返回,但 lithe_bytes 为 0,正数断言失败。未实测产品界面或诊断包;根据当前生产采样代码,这可能让使用该结果的内存数值不准确,影响范围待产品复验。

独立 Win32 调用在同一系统上返回成功、普通工作集约 60 MB,而 PROCESS_MEMORY_COUNTERS_EX2.PrivateWorkingSetSize 为 0。微软文档列出此结构较新的客户端最低支持版本;是否与服务器更新水平有关尚待确认,不能将其当作已证实根因。参考:https://learn.microsoft.com/en-us/windows/win32/api/psapi/ns-psapi-process_memory_counters_ex2

Logs or diagnostic output / 日志或诊断输出
memory::platform::tests::current_process_private_working_set_is_available ... FAILED
assertion failed: usage.lithe_bytes > 0
Independent Win32 probe: success=True, workingSet=60203008, privateWorkingSet=0
Screenshots or recordings / 截图或录屏

未采集:这是命令行测试与独立 Win32 查询,未执行 GUI 工作流。

Checklist / 提交前检查
  • I searched existing issues for duplicates. / 我已搜索现有 Issue,确认没有重复报告。
  • I removed secrets and personal data from the report. / 我已从报告中移除敏感信息和个人数据。
主要言語
TypeScript
スター
1.8k
フォーク
151
平均マージ
11時間 41分
マージ済み PR(30日)
416

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

1lck/Lithe-IDEA のほかの issue

1lck/Lithe-IDEA の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。