Skip to content
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

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

Closed
vstinner opened this issue Sep 29, 2023 · 3 comments
Labels
OS-mac tests Tests in the Lib/test dir

Comments

@vstinner
Copy link
Member

vstinner commented Sep 29, 2023

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

@vstinner vstinner added the tests Tests in the Lib/test dir label Sep 29, 2023
@vstinner
Copy link
Member Author

vstinner commented Sep 29, 2023

See also issue gh-110017: Random crash of test_signal on macos sonoma.

@vstinner
Copy link
Member Author

See also issue gh-75032: test_stress_delivery_dependent() fails randomly since 2017 on AMD64 Debian root 3.x.

@ronaldoussoren
Copy link
Contributor

The fix for #110772 disabled test_stress_modifying_handlers on macOS due to a platform bug. That also fixes this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OS-mac tests Tests in the Lib/test dir
Projects
None yet
Development

No branches or pull requests

3 participants