Improving the memory leak test that fails randomly in CI.
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
调研方向
Start with find_memleak in comtypes.test.test_comserver and read how the test measures Working Set across repeated process runs. Separate ordinary COM behavior checks from memory checks, then investigate ownership and release at the COM boundary for BSTR, VARIANT, and SAFEARRAY. Done means normal CI has fewer memory-related random failures while the test can detect actual leaks in those types.
由索引模型根据 Issue 内容生成。
描述
Problems
find_memleak in comtypes.test.test_comserver fails randomly in the CI environment.
- The current test checks the difference in the Working Set before and after running the process many times.
- An increase in the Working Set does not always mean an actual memory leak.
- On the other hand, even if the Working Set does not grow, we cannot always find a leak.
- In Local Server tests, measuring memory on the client side cannot directly find leaks on the COM server side running in another process.
Because of this, the test not only fails randomly, but we might also miss real memory leaks.
Technical Solution Candidates: Detect Actual Memory Leaks
- Separate feature tests from memory checks
- Verify COM return values and types in normal feature tests.
- Rethink judgments based only on the difference in the Working Set.
- Directly check the release rules
- Check the transfer of ownership and the matching release process for BSTR, VARIANT, and SAFEARRAY.
- Check not only calls like
VariantClear, but also resource management at the actual COM boundary.
- Look into native memory leaks separately
- Check memory managed by Python using tools like
tracemallocfrom the Python standard library. - If needed, measure both the client and COM server processes, and check for native memory leaks using Windows diagnostic tools.
Completion Condition
Set up a test that reduces random failures caused by memory usage changes in normal CI, while being able to detect actual memory leaks in BSTR, VARIANT, and SAFEARRAY.
- 主要语言
- Python
- 星标
- 346
- 派生
- 107
- 平均合并
- 1 天 1 小时
- 30 天内合并 PR
- 23
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
enthought/comtypes 的其他 Issue
-
good first issue
难度 2/5 1-3 小时 新手友好度 62/100
维护者通常 1 天内回复
-
Fix the `tlbparser` ctypes mapping for `VT_I1`.可能已有人在做 @junkmd 于 11 天前认领。 未关闭debt npsupport tests
难度 4/5 3-5 天 新手友好度 25/100
enthought/comtypes#969 · 5 条评论 · 已指派 2 人 ·
维护者通常 1 天内回复
-
typing
难度 4/5 3-5 天 新手友好度 35/100
维护者通常 1 天内回复
-
question
难度 3/5 1-2 天 新手友好度 58/100
enthought/comtypes#935 · 10 条评论 ·
维护者通常 1 天内回复
-
ci tests
难度 3/5 1-2 天 新手友好度 62/100
enthought/comtypes#925 · 11 条评论 · 1 个 reaction ·
维护者通常 1 天内回复
查看 enthought/comtypes 的全部 Issue
相似的 Issue
-
area/profiles comp/cli P3 type/feature
难度 2/5 1-3 小时 新手友好度 74/100
NousResearch/hermes-agent#146372 ·
维护者通常 1 天内回复
-
[BUG] OpenAI-compatible embedding model alias breaks embedder construction可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 2/5 1-3 小时 新手友好度 65/100
维护者通常 1 天内回复
-
[oblt-aw][autodoc] Document obs-aw-automerge contract and fix automerge doc inconsistencies可能已有人在做 @github-actions 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 1 天内回复
-
GeoSeries scale and skew tests fail with pytest 9.2.0可能已有人在做 @jiayuasu 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复
-
admission-deferred priority: medium status: ready work-class: scoped
难度 2/5 1-3 小时 新手友好度 70/100
melodic-software/claude-code-plugins#10887 · 4 条评论 ·
维护者通常 1 天内回复