Skip to content
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

gh-102151: Correctly fetch CONFIG_ARGS in Tools/freeze/test/freeze.py #102152

Merged
merged 1 commit into from
Feb 23, 2023

Conversation

erlend-aasland
Copy link
Contributor

@erlend-aasland erlend-aasland commented Feb 22, 2023

Copy link
Member

@corona10 corona10 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome LGTM!

@erlend-aasland
Copy link
Contributor Author

Thanks for the review, Dong-hee! I'll wait a day or two for one of the freeze experts to chime in, just in case.

@erlend-aasland erlend-aasland merged commit c3a1783 into python:main Feb 23, 2023
@miss-islington
Copy link
Contributor

Thanks @erlend-aasland for the PR 🌮🎉.. I'm working now to backport this PR to: 3.11.
🐍🍒⛏🤖 I'm not a witch! I'm not a witch!

@erlend-aasland erlend-aasland deleted the fix-test-tools branch February 23, 2023 14:09
@bedevere-bot
Copy link

GH-102176 is a backport of this pull request to the 3.11 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Feb 23, 2023
…eze.py (pythonGH-102152)

(cherry picked from commit c3a1783)

Co-authored-by: Erlend E. Aasland <[email protected]>
@bedevere-bot bedevere-bot removed the needs backport to 3.11 only security fixes label Feb 23, 2023
miss-islington added a commit that referenced this pull request Feb 23, 2023
@thesamesam
Copy link
Contributor

This commit has caused https://bugs.gentoo.org/900429 (and https://bugs.gentoo.org/903890 because of the backport to Python 3.11) but it's unclear to me why yet.

It leads to a PGO build hanging in test_tools (or running very very slowly) until disk is filled and then it'll move on.

@shr-project
Copy link

From my understanding which I've reported in https://bugs.gentoo.org/900429#c19 this change didn't directly cause the test_tools to hang.

It just fixed another error which was preventing test_tools from starting properly.

Before this it quickly failed with:

In file included from config.c:18:
/tmp/tmpfs/portage/dev-lang/python-3.12.0_alpha5/temp/test_python_6mu7qr8z/tmp8l4okaqw/cpython/Include/Python.h:12:10: fatal error: pyconfig.h: No such file or directory
   12 | #include "pyconfig.h"
      |          ^~~~~~~~~~~~

while with this fix it shows different error and then continues for hours and hours (until killed or runs out of disk space or something):

while alpha6 shows an error and then continues for 100+ minutes even with using -j42 (from 64 on my builder):

1:44:19 load avg: 1.61 [427/427] test_tools failed (1 error)
creating the script to be frozen at /tmp/tmpfs/portage/dev-lang/python-3.12.0_alpha6/temp/test_python_fx7r8c03/tmplr4kzl3i/app.py
copying the source tree into /tmp/tmpfs/portage/dev-lang/python-3.12.0_alpha6/temp/test_python_fx7r8c03/tmplr4kzl3i/cpython...
configuring python in /tmp/tmpfs/portage/dev-lang/python-3.12.0_alpha6/temp/test_python_fx7r8c03/tmplr4kzl3i/python-build...
CalledProcessError: Command '['/tmp/tmpfs/portage/dev-lang/python-3.12.0_alpha6/temp/test_python_fx7r8c03/tmplr4kzl3i/cpython/python', '-c', 'import sysconfig; print(sysconfig.get_config_var("CONFIG_ARGS"))']' returned non-zero exit status 1.
--- STDOUT ---

--- STDERR ---
Traceback (most recent call last):
File "", line 1, in
File "/tmp/tmpfs/portage/dev-lang/python-3.12.0_alpha6/temp/test_python_fx7r8c03/tmplr4kzl3i/cpython/Lib/sysconfig.py", line 740, in get_config_var
return get_config_vars().get(name)
^^^^^^^^^^^^^^^^^
File "/tmp/tmpfs/portage/dev-lang/python-3.12.0_alpha6/temp/test_python_fx7r8c03/tmplr4kzl3i/cpython/Lib/sysconfig.py", line 723, in get_config_vars
_init_config_vars()
File "/tmp/tmpfs/portage/dev-lang/python-3.12.0_alpha6/temp/test_python_fx7r8c03/tmplr4kzl3i/cpython/Lib/sysconfig.py", line 670, in _init_config_vars
_init_posix(_CONFIG_VARS)
File "/tmp/tmpfs/portage/dev-lang/python-3.12.0_alpha6/temp/test_python_fx7r8c03/tmplr4kzl3i/cpython/Lib/sysconfig.py", line 536, in _init_posix
_temp = import(name, globals(), locals(), ['build_time_vars'], 0)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ModuleNotFoundError: No module named '_sysconfigdata__linux_x86_64-linux-gnu'

---- END ----
building python parallel='-j42' in /tmp/tmpfs/portage/dev-lang/python-3.12.0_alpha6/temp/test_python_fx7r8c03/tmplr4kzl3i/python-build...
installing python into /tmp/tmpfs/portage/dev-lang/python-3.12.0_alpha6/temp/test_python_fx7r8c03/tmplr4kzl3i/python-installation...
CalledProcessError: Command '['/usr/bin/make', '-C', '/tmp/tmpfs/portage/dev-lang/python-3.12.0_alpha6/temp/test_python_fx7r8c03/tmplr4kzl3i/python-build', 'install']' returned non-zero exit status 2.
--- STDOUT ---
make[2]: Entering directory '/tmp/tmpfs/portage/dev-lang/python-3.12.0_alpha6/temp/test_python_fx7r8c03/tmplr4kzl3i/python-build'
Creating directory /tmp/tmpfs/portage/dev-lang/python-3.12.0_alpha6/temp/test_python_fx7r8c03/tmplr4kzl3i/python-installation/bin
Rebuilding with profile guided optimizations:
Creating directory /tmp/tmpfs/portage/dev-lang/python-3.12.0_alpha6/temp/test_python_fx7r8c03/tmplr4kzl3i/python-installation/include
rm -f profile-clean-stamp
make[2]: Leaving directory '/tmp/tmpfs/portage/dev-lang/python-3.12.0_alpha6/temp/test_python_fx7r8c03/tmplr4kzl3i/python-build'
test test_tools failed

--- STDERR ---
/usr/bin/install: cannot remove '/usr/lib64/libpython3.12.so.1.0': Permission denied
make[2]: *** [Makefile:2031: altbininstall] Error 1
make[2]: *** Waiting for unfinished jobs....

---- END ----

Total duration: 1 hour 44 min
Tests result: FAILURE

@thesamesam
Copy link
Contributor

Thanks Martin. I'm sorry for the noise - I think there is an issue here, but it might be on our end, and it wasn't introduced by this commit (it just exposed some pre-existing issue).

JelleZijlstra pushed a commit to JelleZijlstra/cpython that referenced this pull request Sep 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants