`check_extension_modules.py` hangs build due to SIGTTIN
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Python
- Sterne
- 77.2k
- Forks
- 35.9k
- PR-Merge-Kennzahlen
- PR-Kennzahlen ausstehend
Beschreibung
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
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne mit check_extension_modules.py und dem im Bericht beschriebenen readline-Importpfad, einschließlich PyInit_readline und get_tty_settings. Reproduziere den macOS-Build mit an ein tty angeschlossenem stdin und prüfe anschließend den verknüpften PR gh-148279. Erledigt bedeutet, dass der Build in diesem Szenario nicht mehr hängen bleibt oder den Python-Prozess anhält.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- python
- Bereich
- build-system, operating-systems
- Issue-Typ
- Bug
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Muss geklärt werden
- Anfängerfreundlichkeit
- 25/100