`check_extension_modules.py` hangs build due to SIGTTIN
まだ誰も着手していません。
- 主要言語
- Python
- スター
- 77.2k
- フォーク
- 35.9k
- PR マージ指標
- PR 指標を取得中
説明
Bug description:
When building Python on macOS with stdin a tty and linking against GNU readline, the build hangs indefinitely.
This is because during the build, python.exe -E check_extension_modules.py is run, which attempts to import the readline module.
At import time of the readline module
- it runs
PyInit_readline - which calls
get_tty_settingsfromlibreadline.dylib, - which ultimately runs an
ioctlsyscall - which immediately suspends the Python process thanks to a SIGTTIN signal.
The Python process isn't supposed to run ioctl syscalls from the background.
I don't know where the fix should go, but I would say it's two separate issues:
- importing modules during the build sounds like a bad idea due to possible side-effects
- the readline module running an
ioctlcall during import risking the process to be suspended when backgrounded sounds bad too.
CPython versions tested on:
3.14, main branch at commit 2c8f26cf5c6ff2398f1e1ed8bfe18e9938bbdebd
Operating systems tested on:
macOS
Linked PRs
- gh-148279
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
check_extension_modules.py と、レポートで説明されている readline のインポートパス(PyInit_readline と get_tty_settings を含む)から始めます。stdin を tty に接続した状態で macOS のビルドを再現し、その後、関連付けられた PR gh-148279 を調査します。このシナリオでビルドがハングしたり Python プロセスを停止したりしなくなれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- python
- 領域
- build-system, operating-systems
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 25/100