Thread sanitizer (free-threading) tests fail: test_signal raises RecursionError
Đang mở
Chưa có ai nhận issue này.
tests
topic-free-threading
type-bug
- 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 report
0:02:53 load avg: 5.00 [ 9/22/1] test_signal failed (1 error) (1 min 1 sec) -- running (3): test_logging (2 min 13 sec), test_io (2 min 17 sec), test_queue (1 min 52 sec)
test test_signal failed -- Traceback (most recent call last):
File "/home/runner/work/cpython/cpython/Lib/test/test_signal.py", line 1384, in test_stress_modifying_handlers
cycle_handlers()
~~~~~~~~~~~~~~^^
File "/home/runner/work/cpython/cpython/Lib/test/test_signal.py", line 1374, in cycle_handlers
signal.signal(signum, handler)
~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
File "/home/runner/work/cpython/cpython/Lib/signal.py", line 58, in signal
handler = _signal.signal(_enum_to_int(signalnum), _enum_to_int(handler))
~~~~~~~~~~~~^^^^^^^^^^^
File "/home/runner/work/cpython/cpython/Lib/signal.py", line 41, in _enum_to_int
return int(value)
File "/home/runner/work/cpython/cpython/Lib/test/test_signal.py", line 1359, in custom_handler
def custom_handler(signum, frame):
File "/home/runner/work/cpython/cpython/Lib/test/test_signal.py", line 1359, in custom_handler
def custom_handler(signum, frame):
File "/home/runner/work/cpython/cpython/Lib/test/test_signal.py", line 1359, in custom_handler
def custom_handler(signum, frame):
[Previous line repeated 237 more times]
RecursionError: maximum recursion depth exceeded
Link: https://github.com/python/cpython/actions/runs/9686054998/job/26727620578
Linked PRs
- gh-121100
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 Lib/test/test_signal.py, đặc biệt là test_stress_modifying_handlers, cycle_handlers và custom_handler, sau đó kiểm tra Lib/signal.py quanh _enum_to_int. Xem công việc gh-121100 được liên kết để nắm ngữ cảnh hiện tại. Hoàn thành khi test_signal test không còn phát sinh RecursionError trong lần chạy Free-Threading với Thread Sanitizer.
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
- backend, testing-qa
- Loại issue
- Lỗi
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 25/100