Skip to content

test_signal: test_stress_modifying_handlers() crash with SIGSEGV on GHA macOS (macOS-12.7) #110083

Closed
@vstinner

Description

@vstinner

test_signal crashed when run at the 325th test under a system load of 9.87: on a machine with 3 CPUs, that means that the machine was very busy (stressed) by other tests running in parallel.

GHA macOS:

0:07:31 load avg: 9.87 [325/467/1] test_signal process crashed (Exit code -11)
Kill <WorkerThread #3 running test=test_threading pid=12551 time=13.4 sec> process group
Fatal Python error: Segmentation fault
Kill <WorkerThread #4 running test=test_urllib2net pid=12609 time=16 ms> process group

Kill <WorkerThread #5 running test=test.test_multiprocessing_forkserver.test_processes pid=12584 time=4.7 sec> process group
Current thread 0x0000700011095000 (most recent call first):
  File "/Users/runner/work/cpython/cpython/Lib/test/test_signal.py", line 1338 in set_interrupts
  File "/Users/runner/work/cpython/cpython/Lib/threading.py", line 1003 in run
  File "/Users/runner/work/cpython/cpython/Lib/threading.py", line 1066 in _bootstrap_inner
  File "/Users/runner/work/cpython/cpython/Lib/threading.py", line 1023 in _bootstrap

Thread 0x0000000101b86600 (most recent call first):
  File "/Users/runner/work/cpython/cpython/Lib/enum.py", line 1155 in __new__
  File "/Users/runner/work/cpython/cpython/Lib/enum.py", line 729 in __call__
  File "/Users/runner/work/cpython/cpython/Lib/signal.py", line 39 in _int_to_enum
  File "/Users/runner/work/cpython/cpython/Lib/signal.py", line 57 in signal
  File "/Users/runner/work/cpython/cpython/Lib/test/test_signal.py", line 1346 in cycle_handlers
  File "/Users/runner/work/cpython/cpython/Lib/test/test_signal.py", line 1356 in test_stress_modifying_handlers

The test passed when re-run again alone in a fresh process in verbose mode:

0:07:31 load avg: 9.87 Re-running 1 failed tests in verbose mode in subprocesses
0:07:31 load avg: 9.87 Run 1 test in parallel using 1 worker process (timeout: 10 min, worker timeout: 15 min)
(...)
0:10:31 load avg: 1.82 running (1): test_signal (3 min)
0:10:35 load avg: 1.91 [1/1] test_signal passed (3 min 4 sec)
(...)
test_stress_modifying_handlers (test.test_signal.StressTest.test_stress_modifying_handlers) ... ok
(...)
Result: FAILURE then SUCCESS

test.pythoninfo:

os.cpu_count: 3

os.uname: posix.uname_result(sysname='Darwin', nodename='Mac-1695973693273.local', release='21.6.0', version='Darwin Kernel Version 21.6.0: Fri Sep 15 16:17:23 PDT 2023; root:xnu-8020.240.18.703.5~1/RELEASE_X86_64', machine='x86_64')

platform.platform: macOS-12.7-x86_64-i386-64bit

build: https://github.com/python/cpython/actions/runs/6348572958/job/17245469911?pr=110078

Metadata

Metadata

Assignees

No one assigned

    Labels

    OS-mactestsTests in the Lib/test dir

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions