pythonnet / pythonnet/clr-loader
Deadlock calling pythonnet.set_runtime twice
还没有人认领这个 Issue。
- 主要语言
- Python
- 星标
- 42
- 派生
- 32
- 平均合并
- 14 小时 1 分钟
- 30 天内合并 PR
- 1
描述
With the update to delay the load of the runtime from 0.25 to 0.26 a deadlock occurs with following code
import pythonnet
pythonnet.set_runtime("coreclr")
pythonnet.set_runtime("coreclr")
This is explicit a problem of the core clr. We did not see that with .NET FF.
We tracked it down to
https://github.com/pythonnet/clr-loader/blob/a88b6a1a0086278e3518f373487ae8819023cb2e/clr_loader/hostfxr.py#L135
this function deadlocks the second time called if
https://github.com/pythonnet/clr-loader/blob/a88b6a1a0086278e3518f373487ae8819023cb2e/clr_loader/hostfxr.py#L146
was not called before.
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
使用连续两次调用 pythonnet.set_runtime("coreclr") 重现该问题,然后按照报告中的说明检查第 135 行和第 146 行附近的 clr_loader/hostfxr.py。确认第二次调用不再发生死锁,同时保留现有的 .NET Framework 和 CoreCLR runtime 加载行为。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- python
- 领域
- tooling
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100