This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients davin, pablogsal, pitrou, serhiy.storchaka, taleinat, vstinner
Date 2018-09-04.09:16:36
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
> Please only skip those tests on buildbots.

There is no easy wait to only skip a test on buildbots.

> They work fine otherwise.

The race condition impacts everyone. It's just less likely if your computer is fast enough. The bug is much more likely if you "force" the bad path:

diff --git a/Lib/multiprocessing/ b/Lib/multiprocessing/
index 3b50a46ddc..7261b43725 100644
--- a/Lib/multiprocessing/
+++ b/Lib/multiprocessing/
@@ -107,6 +107,8 @@ getfd = _semaphore_tracker.getfd
 def main(fd):
     '''Run semaphore tracker.'''
     # protect the process from ^C and "killall python" etc
+    import time
+    time.sleep(0.5)
     signal.signal(signal.SIGINT, signal.SIG_IGN)
     signal.signal(signal.SIGTERM, signal.SIG_IGN)
diff --git a/Lib/test/ b/Lib/test/
index 5c625dd495..6f9f7583e2 100644
--- a/Lib/test/
+++ b/Lib/test/
@@ -4193,7 +4193,6 @@ class TestSemaphoreTracker(unittest.TestCase):
-        time.sleep(2.0)
         with self.assertRaises(OSError) as ctx:
         # docs say it should be ENOENT, but OSX seems to give EINVAL
Date User Action Args
2018-09-04 09:16:36vstinnersetrecipients: + vstinner, pitrou, taleinat, serhiy.storchaka, davin, pablogsal
2018-09-04 09:16:36vstinnersetmessageid: <>
2018-09-04 09:16:36vstinnerlinkissue33613 messages
2018-09-04 09:16:36vstinnercreate