GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — gh-116622: Switch test_stress_delivery_simultaneous from SIGUSR1 to SIGUSR2 by mhsmith · Pull Request #123981 · python/cpython

Conversation

@mhsmith

@mhsmith mhsmith commented Sep 11, 2024 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

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.

  • Issue: Add support for Android as a target platform #116622

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@mhsmith
Switch test_stress_delivery_simultaneous from SIGUSR1 to SIGUSR2
4173a56
@mhsmith mhsmith added skip news needs backport to 3.13 only security fixes labels Sep 11, 2024
@bedevere-app bedevere-app Bot added the awaiting review label Sep 11, 2024
@bedevere-app bedevere-app Bot mentioned this pull request Sep 11, 2024
Add support for Android as a target platform #116622
Closed
@mhsmith mhsmith added the tests Tests in the Lib/test dir label Sep 11, 2024
@mhsmith mhsmith mentioned this pull request Sep 11, 2024
gh-116622: Kill Android Signal Catcher thread before running tests #123982
Closed
@mhsmith
Improve comment
07175ad
@mhsmith
mhsmith requested a review from freakboy3742 September 11, 2024 22:27
@freakboy3742

freakboy3742 commented Sep 12, 2024

Copy link
Copy Markdown
Contributor

!buildbot iOS

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-bot

bedevere-bot commented Sep 12, 2024

Copy link
Copy Markdown

🤖 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
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@freakboy3742
freakboy3742 merged commit 43303e3 into python:main Sep 12, 2024
@bedevere-app bedevere-app Bot removed the awaiting review label Sep 12, 2024
@miss-islington-app

miss-islington-app Bot commented Sep 12, 2024

Copy link
Copy Markdown

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Sep 12, 2024
@mhsmith @miss-islington
pythongh-116622: Switch test_stress_delivery_simultaneous from SIGUSR…
d05782c
…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

bedevere-app Bot commented Sep 12, 2024

Copy link
Copy Markdown

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app bedevere-app Bot removed the needs backport to 3.13 only security fixes label Sep 12, 2024
Yhg1s pushed a commit that referenced this pull request Sep 24, 2024
@miss-islington @mhsmith
[3.13] gh-116622: Switch test_stress_delivery_simultaneous from SIGUS…
7c9bbaa
…R1 to SIGUSR2 (GH-123981) (#123988)

gh-116622: Switch test_stress_delivery_simultaneous from SIGUSR1 to SIGUSR2 (GH-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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@freakboy3742 freakboy3742 Awaiting requested review from freakboy3742

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

skip news tests Tests in the Lib/test dir

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@mhsmith @freakboy3742 @bedevere-bot
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.