`check_extension_modules.py` hangs build due to SIGTTIN
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- Python
- Star
- 77.2k
- Fork
- 35.9k
- Chỉ số merge pull request
- Chỉ số pull request đang chờ
Mô tả
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
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Bắt đầu với check_extension_modules.py và đường dẫn import readline được mô tả trong báo cáo, bao gồm PyInit_readline và get_tty_settings. Tái hiện bản build macOS với stdin được kết nối với một tty, sau đó kiểm tra PR gh-148279 được liên kết. Hoàn tất có nghĩa là bản build không còn bị treo hoặc tạm dừng tiến trình Python trong kịch bản này.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- python
- Lĩnh vực
- build-system, operating-systems
- Loại issue
- Lỗi
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Cần làm rõ
- Mức phù hợp với người mới
- 25/100