test_rng_lapply_bpredo leaves a MulticoreParam running

未关闭 适合新手
#289 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
1/5
预计耗时
1 小时以内
新手友好度
90/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
r
领域
testing

调研方向

阅读 inst/unitTests/test_rng.R,并比较 .test_rng_lapply_bpredo_impl() 与 .test_rng_iterate_bpredo_impl()。在 result3 后添加相应的 worker 清理,然后运行相关的 RNG 单元测试,并确认 MulticoreParam worker 已停止。

由索引模型根据 Issue 内容生成。

描述

From a human (me)

I was running covr on this package, and it repeatedly crashed. Claude suggested the following

Second bpstart(param) Matching bpstop(param)
iterate (.test_rng_iterate_bpredo_impl) line 355 line 361
lapply (.test_rng_lapply_bpredo_impl) line 284 missing

I've looked at the associated tests, and it seems correct - a missing bpstop.

Thanks


From Claude

.test_rng_lapply_bpredo_impl() in inst/unitTests/test_rng.R calls bpstart(param) a second time (line 284 on devel) and never calls bpstop(param). The three MulticoreParam(3) workers stay up until the R process exits. .test_rng_iterate_bpredo_impl() stops its param (line 361).

We found this running the tests under covr 3.6.5. The leftover workers are still saving their coverage counts when the test process exits, and they are killed partway through. covr then fails reading the truncated trace file ("error reading from connection") and reports no coverage for the package. covr 4.0.0 writes trace files atomically, so newer covr copes, but the workers are still left running.

Suggested fix: add bpstop(param) after result3, as the iterate test does.

Seen with BiocParallel 1.46.0 (R 4.6.1, Ubuntu 24.04). Devel (1.49.0) has the same code.

主要语言
R
星标
69
派生
32
PR 合并指标
30 天内没有已合并 PR

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

Bioconductor/BiocParallel 的其他 Issue

查看 Bioconductor/BiocParallel 的全部 Issue

相似的 Issue

更多 R Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。