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-149879: Fix multiprocessing resource tracker tests on Cygwin by vstinner · Pull Request #150440 · python/cpython

Conversation

@vstinner

@vstinner vstinner commented May 26, 2026 •
edited by bedevere-app Bot
Loading

Uh oh!

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

Copy link
Copy Markdown
Member

Skip test_resource_tracker_sigterm() if signal.pthread_sigmask() is missing.

  • Issue: Enhance Cygwin support #149879

Sorry, something went wrong.

Uh oh!

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

All reactions
@vstinner
pythongh-149879: Fix multiprocessing resource tracker tests on Cygwin
37e51f2
Skip test_resource_tracker_sigterm() if signal.pthread_sigmask() is
missing.
@vstinner
vstinner requested a review from gpshead as a code owner May 26, 2026 00:44
@vstinner vstinner added the skip news label May 26, 2026
@bedevere-app bedevere-app Bot added tests Tests in the Lib/test dir awaiting core review labels May 26, 2026
@bedevere-app bedevere-app Bot mentioned this pull request May 26, 2026
Enhance Cygwin support #149879
Closed
@vstinner

vstinner commented May 26, 2026

Copy link
Copy Markdown
Member Author

The test fails also on Linux if signal.pthread_sigmask() is missing. Apply the patch:

diff --git a/Lib/multiprocessing/resource_tracker.py b/Lib/multiprocessing/resource_tracker.py
index d3328a8c617..a2cfcb550a8 100644
--- a/Lib/multiprocessing/resource_tracker.py
+++ b/Lib/multiprocessing/resource_tracker.py
@@ -31,7 +31,7 @@
 
 __all__ = ['ensure_running', 'register', 'unregister']
 
-_HAVE_SIGMASK = hasattr(signal, 'pthread_sigmask')
+_HAVE_SIGMASK = False
 _IGNORED_SIGNALS = (signal.SIGINT, signal.SIGTERM)
 
 def cleanup_noop(name):

Run the test:

$ ./python -m test test_multiprocessing_spawn.test_misc -m test_resource_tracker_sigterm -v
...
Traceback (most recent call last):
  File "/home/vstinner/python/main/Lib/multiprocessing/resource_tracker.py", line 453, in main
    cache[rtype].remove(name)
    ~~~~~~~~~~~~~~~~~~~^^^^^^
KeyError: '/mp-1zhvb0mv'

======================================================================
FAIL: test_resource_tracker_sigterm (test.test_multiprocessing_spawn.test_misc.TestResourceTracker.test_resource_tracker_sigterm)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/vstinner/python/main/Lib/test/_test_multiprocessing.py", line 6315, in test_resource_tracker_sigterm
    self.check_resource_tracker_death(signal.SIGTERM, False)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/vstinner/python/main/Lib/test/_test_multiprocessing.py", line 6307, in check_resource_tracker_death
    self.assertEqual(len(all_warn), 0)
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^
AssertionError: 1 != 0
...
All reactions

Sorry, something went wrong.

Uh oh!

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

@vstinner
vstinner merged commit bc67dad into python:main May 26, 2026
95 of 97 checks passed

Uh oh!

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

@vstinner
vstinner deleted the mp_sigterm branch May 26, 2026 02:23
@bedevere-app bedevere-app Bot removed the awaiting core review label May 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@gpshead gpshead Awaiting requested review from gpshead gpshead is a code owner

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.

1 participant

@vstinner
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.