Skip to content

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

Closed

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

Activity

  1. vstinner commented on Sep 29, 2023

    @vstinner
    MemberAuthor

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

  2. vstinner commented on Sep 29, 2023

    @vstinner
    MemberAuthor

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

  3. ronaldoussoren commented on Dec 8, 2023

    @ronaldoussoren
    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

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