[Bug] Windows Server 2022 上私有工作集采样返回零并使宿主测试失败
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 48/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- rust
- Domain
- backend, observability-sre, testing-qa
Research direction
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.
Written by the indexing model from the issue text.
Description
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 / 复现步骤
- 在上述 Windows 环境编译 Windows Tauri 宿主的测试目标。
- 运行
cargo test --manifest-path windows/tauri/src-tauri/Cargo.toml memory::platform::tests::current_process_private_working_set_is_available -- --exact。 - 观察当前进程内存采样结果及断言。
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. / 我已从报告中移除敏感信息和个人数据。
- Dominant language
- TypeScript
- Stars
- 1.8k
- Forks
- 151
- Avg merge
- 11h 41m
- Merged PRs (30d)
- 416
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from 1lck/Lithe-IDEA
-
review: medium
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
1lck/Lithe-IDEA#1670 ·
Maintainers usually reply within 1 day
-
area:editor bug P0 platform:macos review: low
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
1lck/Lithe-IDEA#1118 · 2 comments ·
Maintainers usually reply within 1 day
-
area:extensions bug P2 platform:macos review: high
Difficulty 4/5 3-5 days Newbie friendliness 35/100
1lck/Lithe-IDEA#1781 ·
Maintainers usually reply within 1 day
-
enhancement issue-form:feature review: low
Difficulty 5/5 Over a week Newbie friendliness 40/100
1lck/Lithe-IDEA#1779 · 1 comment ·
Maintainers usually reply within 1 day
-
enhancement issue-form:feature review: low
Difficulty 5/5 Over a week Newbie friendliness 25/100
1lck/Lithe-IDEA#1778 ·
Maintainers usually reply within 1 day
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
documentation easy good first issue help wanted
Difficulty 1/5 1-3 hours Newbie friendliness 83/100
Maintainers usually reply within 1 day
-
Billion-context documentation addendum: nudge is independent of window occupancy. | billion-context 文档补充:nudge 与窗口占用无关Possibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 1/5 1-3 hours Newbie friendliness 86/100
ranxianglei/billion-context#5893 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 79/100
microsoft/monaco-editor#5575 ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100