-
-
Notifications
You must be signed in to change notification settings - Fork 31.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test_tools: test_freeze_simple_script() times out after 15 min: --with-lto --enable-optimizations (s390x LTO buildbots) #103053
Comments
CC @kumaraditya303 as freeze expert |
Let's first increase the timeout to unblock the CI and then think about improving the test. @sobolevn Can you send a PR for it? |
One moment, I think I found something interesting. Right now it has this decorator: @support.skip_if_buildbot('not all buildbots have enough space')
class TestFreeze(unittest.TestCase):
def test_freeze_simple_script(self): ... It was introduced in #29222 by @ericsnowcurrently I think that it should not be tested in buildbots at all!
But, since we only skip a test case, not all file - it won't be reported anyway. So, my guess is: maybe I will try to run this test explicitly with module-level skip and I hope I will be able to find the problem. |
First failure that I was able to find: c3a1783 |
I would be able to check next week, I have a conference to make right now :( |
No worries; enjoy the conference :) |
I don’t see much difference (Python 3.11.3 on openSUSE/Tumbleweed):
|
Isn’t the solution to extend cpython/Lib/test/support/__init__.py Line 396 in 5b05b01
to cover other build environments? For me (at openSUSE with our build environment) it was enough just to add this patch: --- a/Lib/test/support/__init__.py
+++ b/Lib/test/support/__init__.py
@@ -388,7 +388,7 @@ def skip_if_buildbot(reason=None):
if not reason:
reason = 'not suitable for buildbots'
try:
- isbuildbot = getpass.getuser().lower() == 'buildbot'
+ isbuildbot = getpass.getuser().lower() in ['buildbot', 'abuild']
except (KeyError, EnvironmentError) as err:
warnings.warn(f'getpass.getuser() failed {err}.', RuntimeWarning)
isbuildbot = False If those tests are problematic in the buildbot here, why to expect they won’t fail in other limited build environments, so extending the list of those seems legitimate. |
Some recent logs suggest that the test is running out of disk space on |
+1 Either ramdisk or something limited in the virtual machine where we do builds. Also, really, building complete CPython as part of tests? Are you …? (I am told by my supervisor, that I should be very polite in my ticket comments). |
The test suit covers the whole interpreter, its library, and built-in modules so yeah, we need to build everything. Actually, any idea allowing to somehow perform partial compilation would be welcomed allowing to reduce current ~30min GitHub workflow runs. |
https://build.opensuse.org/request/show/1084262 by user mcepl + dimstar_suse - Why in the world we download from HTTP? - Add 103213-fetch-CONFIG_ARGS.patch (gh#python/cpython#103053). - Add skip_if_buildbot-extend.patch to avoid the bug altogether (extending what skip_if_buildbot covers). - Add CVE-2007-4559-filter-tarfile_extractall.patch to fix bsc#1203750 (CVE-2007-4559) and implementing "PEP 706 – Filter for tarfile.extractall". - Update to 3.11.3: - Security - gh-101727: Updated the OpenSSL version used in Windows and macOS binary release builds to 1.1.1t to address CVE-2023-0286, CVE-2022-4303, and CVE-2022-4303 per the OpenSSL 2023-02-07 security advisory. - Core and Builtins - gh-101975: Fixed stacktop value on tracing entries to avoid corruption on garbage collection. - gh-102701: Fix overflow when creating very
test.test_tools.test_freeze.TestFreeze.test_freeze_simple_script
fails with --with-lto --enable-optimizations
Skip test_freeze_simple_script() of test_tools.test_freeze if Python is built with Profile Guided Optimization: it makes the test too slow. The freeze tool is tested by many other CIs with other compiler flags. test.pythoninfo now gets also get_build_info() of test.libregrtests.utils.
Skip test_freeze_simple_script() of test_tools.test_freeze if Python is built with Profile Guided Optimization (PGO): it just makes the test too slow. The freeze tool is tested by many other CIs with other (faster) compiler flags. test.pythoninfo now gets also get_build_info() of test.libregrtests.utils.
Skip test_freeze_simple_script() of test_tools.test_freeze if Python is built with Profile Guided Optimization (PGO): it just makes the test too slow. The freeze tool is tested by many other CIs with other (faster) compiler flags. test.pythoninfo now also gets get_build_info() of test.libregrtests.utils.
Skip test_freeze_simple_script() of test_tools.test_freeze if Python is built with Profile Guided Optimization (PGO): it just makes the test too slow. The freeze tool is tested by many other CIs with other (faster) compiler flags. test.pythoninfo now gets also get_build_info() of test.libregrtests.utils.
Skip test_freeze_simple_script() of test_tools.test_freeze if Python is built with "./configure --enable-optimizations", which means with Profile Guided Optimization (PGO): it just makes the test too slow. The freeze tool is tested by many other CIs with other (faster) compiler flags. test.pythoninfo now gets also get_build_info() of test.libregrtests.utils.
Skip test_freeze_simple_script() of test_tools.test_freeze if Python is built with "./configure --enable-optimizations", which means with Profile Guided Optimization (PGO): it just makes the test too slow. The freeze tool is tested by many other CIs with other (faster) compiler flags. test.pythoninfo now gets also get_build_info() of test.libregrtests.utils.
Skip test_freeze_simple_script() of test_tools.test_freeze if Python is built with "./configure --enable-optimizations", which means with Profile Guided Optimization (PGO): it just makes the test too slow. The freeze tool is tested by many other CIs with other (faster) compiler flags. test.pythoninfo now gets also get_build_info() of test.libregrtests.utils.
I fixed this issue by skipping the test if Python is built with PGO: 81cd1bd test_tools was failing for a few weeks on s390x Fedora LTO + PGO 3.x and it started to pass at build 4500 with this change: https://buildbot.python.org/all/#/builders/545/builds/4500 Well, just because test_tools.test_freeze is now skipped :-) If test_tools.test_freeze still fails on other buildbots, we can consider to skip the test in more cases (ex: LTO optimization). |
On FreeBSD when Python is built out of tree, the "python" program was created in the source directory instead of build directory. Fix the Makefile to write the "python" program in the build directory.
"make check-clean-src" now also checks if the "python" program is found in the source directory: fail with an error if it does exist.
"make check-clean-src" now also checks if the "python" program is found in the source directory: fail with an error if it does exist.
test_freeze now uses "make distclean" instead of "make clean" to remove also the "python" program. Other test_freeze changes: * Log executed commands and directories, and the current directory. * No longer uses make -C option to change the directory, instead use subprocess cwd parameter.
Fix test_tools.test_freeze on FreeBSD: run "make distclean" instead of "make clean" in the copied source directory to remove also the "python" program. Other test_freeze changes: * Log executed commands and directories, and the current directory. * No longer uses make -C option to change the directory, instead use subprocess cwd parameter.
Fix test_tools.test_freeze on FreeBSD: run "make distclean" instead of "make clean" in the copied source directory to remove also the "python" program. Other test_freeze changes: * Log executed commands and directories, and the current directory. * No longer uses make -C option to change the directory, instead use subprocess cwd parameter.
"make check-clean-src" now also checks if the "python" program is found in the source directory: fail with an error if it does exist.
…thonGH-110449) "make check-clean-src" now also checks if the "python" program is found in the source directory: fail with an error if it does exist. (cherry picked from commit a155f9f) Co-authored-by: Victor Stinner <[email protected]>
…thonGH-110449) "make check-clean-src" now also checks if the "python" program is found in the source directory: fail with an error if it does exist. (cherry picked from commit a155f9f) Co-authored-by: Victor Stinner <[email protected]>
Fix test_tools.test_freeze on FreeBSD: run "make distclean" instead of "make clean" in the copied source directory to remove also the "python" program. Other test_freeze changes: * Log executed commands and directories, and the current directory. * No longer uses make -C option to change the directory, instead use subprocess cwd parameter.
Fix test_tools.test_freeze on FreeBSD: run "make distclean" instead of "make clean" in the copied source directory to remove also the "python" program. Other test_freeze changes: * Log executed commands and directories, and the current directory. * No longer uses make -C option to change the directory, instead use subprocess cwd parameter. (cherry picked from commit a4baa9e) Co-authored-by: Victor Stinner <[email protected]>
Fix test_tools.test_freeze on FreeBSD: run "make distclean" instead of "make clean" in the copied source directory to remove also the "python" program. Other test_freeze changes: * Log executed commands and directories, and the current directory. * No longer uses make -C option to change the directory, instead use subprocess cwd parameter. (cherry picked from commit a4baa9e) Co-authored-by: Victor Stinner <[email protected]>
No longer skip test_tools.test_freeze on buildbots.
…H-110449) (#110454) gh-103053: Fix make check-clean-src: check "python" program (GH-110449) "make check-clean-src" now also checks if the "python" program is found in the source directory: fail with an error if it does exist. (cherry picked from commit a155f9f) Co-authored-by: Victor Stinner <[email protected]>
No longer skip test_tools.test_freeze on buildbots. The skip was added when freeze tests were added in commit 13d9205.
No longer skip test_tools.test_freeze on buildbots. Remove test.support.skip_if_buildbot() function. The skip was added when freeze tests were added in commit 13d9205.
…H-110449) (#110453) gh-103053: Fix make check-clean-src: check "python" program (GH-110449) "make check-clean-src" now also checks if the "python" program is found in the source directory: fail with an error if it does exist. (cherry picked from commit a155f9f) Co-authored-by: Victor Stinner <[email protected]>
…110456) gh-103053: Fix test_tools.test_freeze on FreeBSD (GH-110451) Fix test_tools.test_freeze on FreeBSD: run "make distclean" instead of "make clean" in the copied source directory to remove also the "python" program. Other test_freeze changes: * Log executed commands and directories, and the current directory. * No longer uses make -C option to change the directory, instead use subprocess cwd parameter. (cherry picked from commit a4baa9e) Co-authored-by: Victor Stinner <[email protected]>
…110457) gh-103053: Fix test_tools.test_freeze on FreeBSD (GH-110451) Fix test_tools.test_freeze on FreeBSD: run "make distclean" instead of "make clean" in the copied source directory to remove also the "python" program. Other test_freeze changes: * Log executed commands and directories, and the current directory. * No longer uses make -C option to change the directory, instead use subprocess cwd parameter. (cherry picked from commit a4baa9e) Co-authored-by: Victor Stinner <[email protected]>
…n#109591) Skip test_freeze_simple_script() of test_tools.test_freeze if Python is built with "./configure --enable-optimizations", which means with Profile Guided Optimization (PGO): it just makes the test too slow. The freeze tool is tested by many other CIs with other (faster) compiler flags. test.pythoninfo now gets also get_build_info() of test.libregrtests.utils.
…thon#110449) "make check-clean-src" now also checks if the "python" program is found in the source directory: fail with an error if it does exist.
Fix test_tools.test_freeze on FreeBSD: run "make distclean" instead of "make clean" in the copied source directory to remove also the "python" program. Other test_freeze changes: * Log executed commands and directories, and the current directory. * No longer uses make -C option to change the directory, instead use subprocess cwd parameter.
Reproduction:
make clean && ./configure --with-lto --enable-optimizations && make
./python.exe -E ./Tools/scripts/run_tests.py -j 1 -u all -W --slowest --fail-env-changed --timeout=900 -j2 --junit-xml test-results.xml -j6 -v test_tools -m test.test_tools.test_freeze.TestFreeze.test_freeze_simple_script
Env:
Traceback:
Looks like timeout is killing this test. I tried to increase it, it helped:
So, should be increase this timeout in CI? Or should we try optimizing this test somehow?
Linked PRs
test_freeze
module in tests ons390x
withPGO
#103170The text was updated successfully, but these errors were encountered: