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

gh-116622: Switch test_stress_delivery_simultaneous from SIGUSR1 to SIGUSR2 #123981

Merged
merged 2 commits into from
Sep 12, 2024

Conversation

mhsmith
Copy link
Member

@mhsmith mhsmith commented Sep 11, 2024

On Android, test_stress_delivery_simultaneous was failing intermittently:

  File "/data/user/0/org.python.testbed/files/python/lib/python3.14/test/test_signal.py", line 1340, in test_stress_delivery_simultaneous
    for _ in support.sleeping_retry(support.SHORT_TIMEOUT):
             ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^
  File "/data/user/0/org.python.testbed/files/python/lib/python3.14/test/support/__init__.py", line 2509, in sleeping_retry
    for _ in busy_retry(timeout, err_msg, error=error):
             ~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/data/user/0/org.python.testbed/files/python/lib/python3.14/test/support/__init__.py", line 2479, in busy_retry
    raise AssertionError(msg)
AssertionError: timeout (30.4 seconds)

When it fails, it also produces this log message:

Thread[6,tid=29634,WaitingInMainSignalCatcherLoop,Thread*=0xb400007e782136f0,peer=0x12cc0578,"Signal Catcher"]: reacting to signal 10

The root cause was the same as #116423 – SIGUSR1 being consumed by a pre-existing thread that we have no control over. I looked into killing that thread, but I couldn't find a safe way of doing it (#123982). So the simplest solution is to use a different signal instead.

It looks like this problem only happens when two different signals are sent so close together that one signal arrives while the other signal's C-level handler is still running. The other tests that use SIGUSR1 don't do this, so they don't need to be changed.

@freakboy3742
Copy link
Contributor

!buildbot iOS

@bedevere-bot
Copy link

🤖 New build scheduled with the buildbot fleet by @freakboy3742 for commit 07175ad 🤖

The command will test the builders whose names match following regular expression: iOS

The builders matched are:

  • iOS ARM64 Simulator PR

@freakboy3742 freakboy3742 merged commit 43303e3 into python:main Sep 12, 2024
33 checks passed
@miss-islington-app
Copy link

Thanks @mhsmith for the PR, and @freakboy3742 for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Sep 12, 2024
…1 to SIGUSR2 (pythonGH-123981)

Use SIGUSR1 instead of SIGUSR2 to improve reliability of signal stress test on Android.
(cherry picked from commit 43303e3)

Co-authored-by: Malcolm Smith <[email protected]>
@bedevere-app
Copy link

bedevere-app bot commented Sep 12, 2024

GH-123988 is a backport of this pull request to the 3.13 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.13 bugs and security fixes label Sep 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip news tests Tests in the Lib/test dir
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants