| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
Add a new internal _Py_strerror() function to Python/fileutils.c. It uses strerror_r() if available, or use strerror() otherwise. Replace all strerror(code) calls with _Py_strerror(code).
|
On FreeBSD 14, I can reproduce the issue by running test_concurrent_initialization_subinterpreter() of test_datetime in a loop. For example, it crashed at the 4th run: vstinner@freebsd14$ ./python -m test test_datetime -v -m test_concurrent_initialization_subinterpreter -F
(...)
0:00:05 load avg: 1.85 mem: 37.5 MiB [ 4] test_datetime
test_concurrent_initialization_subinterpreter (test.datetimetester.ExtensionModuleTests_Pure.test_concurrent_initialization_subinterpreter) ... skipped 'Not relevant in pure Python'
test_concurrent_initialization_subinterpreter (test.datetimetester.ExtensionModuleTests_Fast.test_concurrent_initialization_subinterpreter) ... FAIL
======================================================================
FAIL: test_concurrent_initialization_subinterpreter (test.datetimetester.ExtensionModuleTests_Fast.test_concurrent_initialization_subinterpreter)
(...)
AssertionError: Process return code is -6 (SIGABRT)
command line: ['/home/vstinner/python/main/python', '-X', 'faulthandler', '-I', '-c', "if True:\n from concurrent.futures import InterpreterPoolExecutor\n\n def func():\n import _datetime\n print('a', end='')\n\n with InterpreterPoolExecutor() as executor:\n for _ in range(8):\n executor.submit(func)\n "]
(...)
stderr:
---
Assertion failed: (strlen(arg) == arglen), function _Py_DecodeLocale, file Python/fileutils.c, line 733.
Fatal Python error: Aborted
Current thread 0x000014c00b026010 [InterpreterPoolExec] (most recent call first):
File "<frozen importlib._bootstrap_external>", line 155 in _path_stat
File "<frozen importlib._bootstrap_external>", line 161 in _path_is_mode_type
File "<frozen importlib._bootstrap_external>", line 169 in _path_isfile
File "<frozen importlib._bootstrap_external>", line 1386 in find_spec
File "<frozen importlib._bootstrap_external>", line 1251 in _get_spec
File "<frozen importlib._bootstrap_external>", line 1277 in find_spec
File "<frozen importlib._bootstrap>", line 1216 in _find_spec
File "<frozen importlib._bootstrap>", line 1292 in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 1344 in _find_and_load
File "/home/vstinner/python/main/Lib/concurrent/futures/_base.py", line 7 in <module>
(...)
With the fix, the test no longer crash. I ran the test 188 times in 6 minutes. |
Sorry, something went wrong.
|
Oh, CIFuzz jobs failed with networking issue. Example: #6 416.3 E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/f/file/libmagic-mgc_5.38-4_amd64.deb Connection failed [IP: 91.189.91.81 80] |
Sorry, something went wrong.
* gh-157695: Parse also _Py_HAVE_xxx variables in sysconfig (#158926) Add parse_config_h() tests to test_sysconfig. (cherry picked from commit 978a8be) * gh-158893: Make os.strerror() thread-safe (#158927) Make os.strerror() thread-safe: use the reentrant strerror_r() function if available. * The configure script now checks if strerror_r() is supported. * Add a stress test to test_free_threading.test_os (new module). * Add a comment on decode_current_locale() assertion which fails if the input string is mutated. * Add an assertion to _Py_DecodeLocale() to detect if the input string was mutated during the function call. * gh-158893: Add internal _Py_strerror() function (#158982) Add a new internal _Py_strerror() function to Python/fileutils.c. It uses strerror_r() if available, or use strerror() otherwise. Replace all strerror(code) calls with _Py_strerror(code). (cherry picked from commit 15dd735)
* pythongh-157695: Parse also _Py_HAVE_xxx variables in sysconfig (python#158926) Add parse_config_h() tests to test_sysconfig. (cherry picked from commit 978a8be) * pythongh-158893: Make os.strerror() thread-safe (python#158927) Make os.strerror() thread-safe: use the reentrant strerror_r() function if available. * The configure script now checks if strerror_r() is supported. * Add a stress test to test_free_threading.test_os (new module). * Add a comment on decode_current_locale() assertion which fails if the input string is mutated. * Add an assertion to _Py_DecodeLocale() to detect if the input string was mutated during the function call. * pythongh-158893: Add internal _Py_strerror() function (python#158982) Add a new internal _Py_strerror() function to Python/fileutils.c. It uses strerror_r() if available, or use strerror() otherwise. Replace all strerror(code) calls with _Py_strerror(code). (cherry picked from commit 15dd735) (cherry picked from commit c774d15)
[3.15] gh-158893: Make os.strerror() thread-safe (#159120) * gh-157695: Parse also _Py_HAVE_xxx variables in sysconfig (#158926) Add parse_config_h() tests to test_sysconfig. (cherry picked from commit 978a8be) * gh-158893: Make os.strerror() thread-safe (#158927) Make os.strerror() thread-safe: use the reentrant strerror_r() function if available. * The configure script now checks if strerror_r() is supported. * Add a stress test to test_free_threading.test_os (new module). * Add a comment on decode_current_locale() assertion which fails if the input string is mutated. * Add an assertion to _Py_DecodeLocale() to detect if the input string was mutated during the function call. * gh-158893: Add internal _Py_strerror() function (#158982) Add a new internal _Py_strerror() function to Python/fileutils.c. It uses strerror_r() if available, or use strerror() otherwise. Replace all strerror(code) calls with _Py_strerror(code). (cherry picked from commit 15dd735) (cherry picked from commit c774d15)
| Back | FazBrowse Home | New Git URL |
Add a new internal _Py_strerror() function to Python/fileutils.c. It uses strerror_r() if available, or use strerror() otherwise.
Replace all strerror(code) calls with _Py_strerror(code).