Skip to content

3.13.0b1 freethreading-debug build: flaky test_signal.test_stress_modifying_handlers on s390x (RecursionError) #118989

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
befeleme opened this issue May 13, 2024 · 2 comments
Labels
topic-free-threading type-bug An unexpected behavior, bug, or error

Comments

@befeleme
Copy link
Contributor

befeleme commented May 13, 2024

Bug report

Bug description:

When building freethreading-debug Python 3.13.0b1 on s390x, test_signal.test_stress_modifying_handlers sometimes fails with RecursionError.

0:24:26 load avg: 1.90 [1/1/1] test_signal failed (1 error)
Re-running test_signal in verbose mode (matching: test_stress_modifying_handlers)
test_stress_modifying_handlers (test.test_signal.StressTest.test_stress_modifying_handlers) ... ERROR
======================================================================
ERROR: test_stress_modifying_handlers (test.test_signal.StressTest.test_stress_modifying_handlers)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/Python-3.13.0b1/Lib/test/test_signal.py", line 1384, in test_stress_modifying_handlers
    cycle_handlers()
    ~~~~~~~~~~~~~~^^
  File "/builddir/build/BUILD/Python-3.13.0b1/Lib/test/test_signal.py", line 1374, in cycle_handlers
    signal.signal(signum, handler)
    ~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
  File "/builddir/build/BUILD/Python-3.13.0b1/Lib/signal.py", line 59, in signal
    return _int_to_enum(handler, Handlers)
  File "/builddir/build/BUILD/Python-3.13.0b1/Lib/signal.py", line 31, in _int_to_enum
    return enum_klass(value)
  File "/builddir/build/BUILD/Python-3.13.0b1/Lib/enum.py", line 722, in __call__
    return cls.__new__(cls, value)
           ~~~~~~~~~~~^^^^^^^^^^^^
  File "/builddir/build/BUILD/Python-3.13.0b1/Lib/enum.py", line 1145, in __new__
    def __new__(cls, value):
    
  File "/builddir/build/BUILD/Python-3.13.0b1/Lib/test/test_signal.py", line 1359, in custom_handler
    def custom_handler(signum, frame):
    
  File "/builddir/build/BUILD/Python-3.13.0b1/Lib/test/test_signal.py", line 1359, in custom_handler
    def custom_handler(signum, frame):
    
  File "/builddir/build/BUILD/Python-3.13.0b1/Lib/test/test_signal.py", line 1359, in custom_handler
    def custom_handler(signum, frame):
    
  [Previous line repeated 236 more times]
RecursionError: maximum recursion depth exceeded
----------------------------------------------------------------------
Ran 1 test in 0.515s
FAILED (errors=1)

CPython versions tested on:

3.13

Operating systems tested on:

Linux

@befeleme befeleme added the type-bug An unexpected behavior, bug, or error label May 13, 2024
@corona10
Copy link
Member

corona10 commented Jun 4, 2024

x86 also happened

0:01:20 load avg: 3.50 [10/22/1] test_signal failed (1 error) (32.6 sec) -- running (2): test_logging (59.6 sec), test_queue (57.4 sec)
test test_signal failed -- Traceback (most recent call last):
  File "/home/dongheena/oss/cpython/Lib/test/test_signal.py", line 1384, in test_stress_modifying_handlers
    cycle_handlers()
    ~~~~~~~~~~~~~~^^
  File "/home/dongheena/oss/cpython/Lib/test/test_signal.py", line 1374, in cycle_handlers
    signal.signal(signum, handler)
    ~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
  File "/home/dongheena/oss/cpython/Lib/signal.py", line 59, in signal
    return _int_to_enum(handler, Handlers)
  File "/home/dongheena/oss/cpython/Lib/signal.py", line 24, in _int_to_enum
    def _int_to_enum(value, enum_klass):

  File "/home/dongheena/oss/cpython/Lib/test/test_signal.py", line 1359, in custom_handler
    def custom_handler(signum, frame):

  File "/home/dongheena/oss/cpython/Lib/test/test_signal.py", line 1359, in custom_handler
    def custom_handler(signum, frame):

  File "/home/dongheena/oss/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

@hroncok
Copy link
Contributor

hroncok commented Oct 8, 2024

Also happens semi-often at ppc64le.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic-free-threading type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

5 participants