`check_extension_modules.py` hangs build due to SIGTTIN
Ninguém assumiu esta issue ainda.
- Linguagem predominante
- Python
- Estrelas
- 77.2k
- Forks
- 35.9k
- Métricas de merge de PRs
- Métricas de PR pendentes
Descrição
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
Guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Direção de pesquisa
Comece com check_extension_modules.py e o caminho de importação de readline descrito no relatório, incluindo PyInit_readline e get_tty_settings. Reproduza o build do macOS com stdin conectado a um tty e, em seguida, inspecione o PR vinculado gh-148279. Está concluído quando o build não trava nem suspende mais o processo Python nesse cenário.
Escrita pelo modelo de indexação a partir do texto da issue.
Avaliação
- Stack de tecnologia
- python
- Domínio
- build-system, operating-systems
- Tipo de issue
- Bug
- Dificuldade
- 4/5
- Tempo estimado
- 3-5 dias
- Status de atividade
- Estagnada
- Clareza
- Precisa de esclarecimento
- Facilidade para iniciantes
- 25/100