pythonnet / pythonnet/clr-loader

Deadlock calling pythonnet.set_runtime twice

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

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

主要言語
Python
スター
42
フォーク
32
平均マージ
14時間 1分
マージ済み PR(30日)
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.

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

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

調査の方向性

2 回連続した pythonnet.set_runtime("coreclr") 呼び出しで問題を再現し、その後、報告で特定されているとおり、135 行目と 146 行目付近の clr_loader/hostfxr.py を調査します。2 回目の呼び出しでデッドロックが発生しなくなっていることを確認し、.NET Framework と CoreCLR のランタイム読み込みに関する既存の動作を維持します。

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

評価

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

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

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