bpo-41710: PyThread_acquire_lock_timed() clamps the timout#28643
Conversation
PyThread_acquire_lock_timed() now clamps the timeout into the [_PyTime_MIN; _PyTime_MAX] range (_PyTime_t type) if it is too large, rather than calling Py_FatalError() which aborts the process. PyThread_acquire_lock_timed() no longer uses MICROSECONDS_TO_TIMESPEC() to compute sem_timedwait() argument, but _PyTime_GetSystemClock() and _PyTime_AsTimespec_truncate().
Fix _thread.TIMEOUT_MAX value on Windows: the maximum timeout is 0x7FFFFFFF milliseconds (around 24.9 days), not 0xFFFFFFFF milliseconds (around 49.7 days). Set PY_TIMEOUT_MAX to 0x7FFFFFFF milliseconds, rather than 0xFFFFFFFF milliseconds. Fix PY_TIMEOUT_MAX overflow test: replace (us >= PY_TIMEOUT_MAX) with (us > PY_TIMEOUT_MAX).
⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️Hi! The buildbot PPC64LE RHEL8 LTO 3.x has failed when building commit 37b8294. What do you need to do:
You can take a look at the buildbot page here: https://buildbot.python.org/all/#builders/361/builds/762 Failed tests:
Failed subtests:
Summary of the results of the build (if available): == Tests result: FAILURE then FAILURE == 413 tests OK. 10 slowest tests:
1 test failed: 12 tests skipped: 2 re-run tests: 1 test run no tests: Total duration: 18 min 30 sec Click to see traceback logsTraceback (most recent call last):
File "/home/buildbot/buildarea/3.x.cstratak-RHEL8-ppc64le.lto/build/Lib/multiprocessing/resource_tracker.py", line 209, in main
cache[rtype].remove(name)
^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: '/psm_ccac20f8'
Traceback (most recent call last):
File "/home/buildbot/buildarea/3.x.cstratak-RHEL8-ppc64le.lto/build/Lib/multiprocessing/resource_tracker.py", line 209, in main
cache[rtype].remove(name)
^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: '/psm_4830bf8b'
Traceback (most recent call last):
File "/home/buildbot/buildarea/3.x.cstratak-RHEL8-ppc64le.lto/build/Lib/test/test_unicodedata.py", line 342, in test_normalization
self.fail(f"Could not retrieve {TESTDATAURL}")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: Could not retrieve http://www.pythontest.net/unicode/14.0.0/NormalizationTest.txt
Traceback (most recent call last):
File "/home/buildbot/buildarea/3.x.cstratak-RHEL8-ppc64le.lto/build/Lib/test/test_unicodedata.py", line 336, in test_normalization
testdata = open_urlresource(TESTDATAURL, encoding="utf-8",
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TimeoutError: timed out
Traceback (most recent call last):
File "/home/buildbot/buildarea/3.x.cstratak-RHEL8-ppc64le.lto/build/Lib/multiprocessing/resource_tracker.py", line 209, in main
cache[rtype].remove(name)
^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: '/psm_6a94ca42'
|
Sorry, something went wrong.
⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️Hi! The buildbot PPC64LE RHEL7 3.x has failed when building commit 37b8294. What do you need to do:
You can take a look at the buildbot page here: https://buildbot.python.org/all/#builders/446/builds/748 Failed tests:
Failed subtests:
Summary of the results of the build (if available): == Tests result: FAILURE then FAILURE == 412 tests OK. 10 slowest tests:
1 test failed: 14 tests skipped: 1 re-run test: Total duration: 10 min 34 sec Click to see traceback logsTraceback (most recent call last):
File "/home/buildbot/buildarea/3.x.cstratak-RHEL7-ppc64le/build/Lib/test/test_unicodedata.py", line 342, in test_normalization
self.fail(f"Could not retrieve {TESTDATAURL}")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: Could not retrieve http://www.pythontest.net/unicode/14.0.0/NormalizationTest.txt
Traceback (most recent call last):
File "/home/buildbot/buildarea/3.x.cstratak-RHEL7-ppc64le/build/Lib/test/test_unicodedata.py", line 336, in test_normalization
testdata = open_urlresource(TESTDATAURL, encoding="utf-8",
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TimeoutError: timed out
|
Sorry, something went wrong.
⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️Hi! The buildbot PPC64LE Fedora Stable LTO + PGO 3.x has failed when building commit 37b8294. What do you need to do:
You can take a look at the buildbot page here: https://buildbot.python.org/all/#builders/101/builds/672 Failed tests:
Failed subtests:
Summary of the results of the build (if available): == Tests result: FAILURE then FAILURE == 413 tests OK. 10 slowest tests:
1 test failed: 13 tests skipped: 1 re-run test: Total duration: 12 min 29 sec Click to see traceback logsTraceback (most recent call last):
File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-ppc64le.lto-pgo/build/Lib/multiprocessing/resource_tracker.py", line 209, in main
cache[rtype].remove(name)
^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: '/psm_97df2eec'
Traceback (most recent call last):
File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-ppc64le.lto-pgo/build/Lib/test/test_unicodedata.py", line 342, in test_normalization
self.fail(f"Could not retrieve {TESTDATAURL}")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: Could not retrieve http://www.pythontest.net/unicode/14.0.0/NormalizationTest.txt
Traceback (most recent call last):
File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-ppc64le.lto-pgo/build/Lib/multiprocessing/resource_tracker.py", line 209, in main
cache[rtype].remove(name)
^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: '/psm_82320373'
Traceback (most recent call last):
File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-ppc64le.lto-pgo/build/Lib/test/test_unicodedata.py", line 336, in test_normalization
testdata = open_urlresource(TESTDATAURL, encoding="utf-8",
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TimeoutError: timed out
Traceback (most recent call last):
File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-ppc64le.lto-pgo/build/Lib/multiprocessing/resource_tracker.py", line 209, in main
cache[rtype].remove(name)
^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: '/psm_be034f7b'
|
Sorry, something went wrong.
⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️Hi! The buildbot PPC64LE Fedora Stable LTO 3.x has failed when building commit 37b8294. What do you need to do:
You can take a look at the buildbot page here: https://buildbot.python.org/all/#builders/541/builds/637 Failed tests:
Failed subtests:
Summary of the results of the build (if available): == Tests result: FAILURE then FAILURE == 414 tests OK. 10 slowest tests:
1 test failed: 12 tests skipped: 1 re-run test: Total duration: 10 min 11 sec Click to see traceback logsTraceback (most recent call last):
File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-ppc64le.lto/build/Lib/test/test_unicodedata.py", line 336, in test_normalization
testdata = open_urlresource(TESTDATAURL, encoding="utf-8",
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
http.client.IncompleteRead: IncompleteRead(0 bytes read)
Traceback (most recent call last):
File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-ppc64le.lto/build/Lib/test/test_unicodedata.py", line 342, in test_normalization
self.fail(f"Could not retrieve {TESTDATAURL}")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: Could not retrieve http://www.pythontest.net/unicode/14.0.0/NormalizationTest.txt
Traceback (most recent call last):
File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-ppc64le.lto/build/Lib/http/client.py", line 586, in _read_chunked
value.append(self._safe_read(amt))
^^^^^^^^^^^^^^^^^^^^
http.client.IncompleteRead: IncompleteRead(3263 bytes read, 4929 more expected)
Traceback (most recent call last):
File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-ppc64le.lto/build/Lib/multiprocessing/resource_tracker.py", line 209, in main
cache[rtype].remove(name)
^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: '/psm_4d4def68'
Traceback (most recent call last):
File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-ppc64le.lto/build/Lib/multiprocessing/resource_tracker.py", line 209, in main
cache[rtype].remove(name)
^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: '/psm_9f619789'
Traceback (most recent call last):
File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-ppc64le.lto/build/Lib/multiprocessing/resource_tracker.py", line 209, in main
cache[rtype].remove(name)
^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: '/psm_be848612'
Traceback (most recent call last):
File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-ppc64le.lto/build/Lib/test/test_unicodedata.py", line 336, in test_normalization
testdata = open_urlresource(TESTDATAURL, encoding="utf-8",
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TimeoutError: timed out
|
Sorry, something went wrong.
The pthread implementation of PyThread_acquire_lock_timed() using
semaphore now clamps the timeout if it is too large, rather than
calling Py_FatalError() which aborts the process.
PyThread_acquire_lock_timed() no longer uses
MICROSECONDS_TO_TIMESPEC() to compute sem_timedwait() argument, but
_PyTime_GetSystemClock() and _PyTime_AsTimespec_truncate().
https://bugs.python.org/issue41710