Open indygreg opened 1 year ago
CC @ayermolo
To clarify it doesn't crash in trunk? Just on version 16 and 17 of llvm?
I didn’t try trunk.
Hi, I ran into some error when building cpython when using the command ./build-linux.py --optimizations pgo --python cpython-3.12 --break-on-failure --serial
.
/home/zhoujiapeng/python-build-standalone/build/downloads/pip-23.2.1-py3-none-any.whl exists and passes integrity checks
cpython-3.12> disabling extension module _gdbm because disabled for this target triple
cpython-3.12> ignoring extension module _peg_parser because Python version incompatible
cpython-3.12> disabling extension module _scproxy because disabled for this target triple
cpython-3.12> ignoring extension module _sha256 because Python version incompatible
cpython-3.12> ignoring extension module _sha512 because Python version incompatible
cpython-3.12> disabling extension module _testcapi because disabled for this target triple
cpython-3.12> disabling extension module nis because disabled for this target triple
cpython-3.12> ignoring extension module parser because Python version incompatible
cpython-3.12> disabling extension module xx because disabled for this target triple
cpython-3.12> disabling extension module xxlimited because disabled for this target triple
cpython-3.12> disabling extension module xxlimited_35 because disabled for this target triple
Traceback (most recent call last):
File "/home/zhoujiapeng/python-build-standalone/cpython-unix/build.py", line 1189, in <module>
sys.exit(main())
File "/home/zhoujiapeng/python-build-standalone/cpython-unix/build.py", line 1172, in main
build_cpython(
File "/home/zhoujiapeng/python-build-standalone/cpython-unix/build.py", line 699, in build_cpython
setup = derive_setup_local(
File "/home/zhoujiapeng/python-build-standalone/pythonbuild/cpython.py", line 288, in derive_setup_local
with tarfile.open(str(cpython_source_archive)) as tf:
File "/usr/local/lib/python3.8/tarfile.py", line 1788, in open
raise ReadError("file could not be opened successfully")
tarfile.ReadError: file could not be opened successfully
make: *** [Makefile:311: /home/zhoujiapeng/python-build-standalone/build/cpython-3.12.0rc3-x86_64-unknown-linux-gnu-pgo.tar] Error 1
I'm not sure whether it is the build result of cpython-host("cpython-3.12-3.12.0rc3-linux64.tar"), so I renamed it to "cpython-3.12.0rc3-x86_64-unknown-linux-gnu-pgo.tar" and got some make errors.
[notice] A new release of pip is available: 23.0.1 -> 23.2.1
[notice] To update, run: /home/zhoujiapeng/python-build-standalone/build/venv.linux/bin/python3 -m pip install --upgrade pip
make: Nothing to be done for 'default'.
compressing Python archive to /home/zhoujiapeng/python-build-standalone/dist/cpython-3.12.0rc3-x86_64-unknown-linux-gnu-pgo-20231002T1838.tar.zst
btw, according to the failed log of CI, the object file should be "libpython3.12.so.1.0".
What's more, both pgo and bolt instrumentation failed some tests, which should be fixed.
PGO
cpython-3.12> 0:00:24 load avg: 1.58 [23/44] test_int
cpython-3.12> test test_int failed
cpython-3.12> 0:00:25 load avg: 1.58 [24/44] test_itertools -- test_int failed (2 errors)
BOLT
cpython-3.12> 0:00:41 load avg: 1.44 [16/44] test_embed
cpython-3.12> Fatal Python error: Segmentation fault
I didn’t try trunk.
Can you try it?
Hi, I ran into some error when building cpython when using the command
./build-linux.py --optimizations pgo --python cpython-3.12 --break-on-failure --serial
./home/zhoujiapeng/python-build-standalone/build/downloads/pip-23.2.1-py3-none-any.whl exists and passes integrity checks cpython-3.12> disabling extension module _gdbm because disabled for this target triple cpython-3.12> ignoring extension module _peg_parser because Python version incompatible cpython-3.12> disabling extension module _scproxy because disabled for this target triple cpython-3.12> ignoring extension module _sha256 because Python version incompatible cpython-3.12> ignoring extension module _sha512 because Python version incompatible cpython-3.12> disabling extension module _testcapi because disabled for this target triple cpython-3.12> disabling extension module nis because disabled for this target triple cpython-3.12> ignoring extension module parser because Python version incompatible cpython-3.12> disabling extension module xx because disabled for this target triple cpython-3.12> disabling extension module xxlimited because disabled for this target triple cpython-3.12> disabling extension module xxlimited_35 because disabled for this target triple Traceback (most recent call last): File "/home/zhoujiapeng/python-build-standalone/cpython-unix/build.py", line 1189, in <module> sys.exit(main()) File "/home/zhoujiapeng/python-build-standalone/cpython-unix/build.py", line 1172, in main build_cpython( File "/home/zhoujiapeng/python-build-standalone/cpython-unix/build.py", line 699, in build_cpython setup = derive_setup_local( File "/home/zhoujiapeng/python-build-standalone/pythonbuild/cpython.py", line 288, in derive_setup_local with tarfile.open(str(cpython_source_archive)) as tf: File "/usr/local/lib/python3.8/tarfile.py", line 1788, in open raise ReadError("file could not be opened successfully") tarfile.ReadError: file could not be opened successfully make: *** [Makefile:311: /home/zhoujiapeng/python-build-standalone/build/cpython-3.12.0rc3-x86_64-unknown-linux-gnu-pgo.tar] Error 1
I'm not sure whether it is the build result of cpython-host("cpython-3.12-3.12.0rc3-linux64.tar"), so I renamed it to "cpython-3.12.0rc3-x86_64-unknown-linux-gnu-pgo.tar" and got some make errors.
[notice] A new release of pip is available: 23.0.1 -> 23.2.1 [notice] To update, run: /home/zhoujiapeng/python-build-standalone/build/venv.linux/bin/python3 -m pip install --upgrade pip make: Nothing to be done for 'default'. compressing Python archive to /home/zhoujiapeng/python-build-standalone/dist/cpython-3.12.0rc3-x86_64-unknown-linux-gnu-pgo-20231002T1838.tar.zst
btw, according to the failed log of CI, the object file should be "libpython3.12.so.1.0".
What's more, both pgo and bolt instrumentation failed some tests, which should be fixed.
PGO
cpython-3.12> 0:00:24 load avg: 1.58 [23/44] test_int cpython-3.12> test test_int failed cpython-3.12> 0:00:25 load avg: 1.58 [24/44] test_itertools -- test_int failed (2 errors)
BOLT
cpython-3.12> 0:00:41 load avg: 1.44 [16/44] test_embed cpython-3.12> Fatal Python error: Segmentation fault
This looks like a different issue. Please file a new issue.
I'm not sure why you are seeing that tarfile.ReadError: file could not be opened successfully
error. That appears to be a bug in my python-build-standalone project. Please consider filing it against indygreg/python-build-standalone. I suspect it may magically go away if you run with Python 3.10 or 3.11.
The manual copying of the .tar file likely contributed to the additional errors you saw.
I recommend deleting all files with python
in them from build/
and build/downloads/
and then try running the original build-linux.py
command again.
I can reliably elicit a crash out of BOLT when optimizing an x86-64 ELF binary with DWARF v5. The crash appears identical to #56277:
I can crash at least 16.0.3 and 17.0.1.
The crash goes away if I compile all inputs with
-fdebug-default-version=4
. So it appears it has something to do with updating DWARF v5 debug symbols.Steps to reproduce (sorry for not being minimal):
git clone https://github.com/indygreg/python-build-standalone
git checkout fa5d1fcebdde07aa04b6c661a55c77c85f414508
(https://github.com/indygreg/python-build-standalone/commit/fa5d1fcebdde07aa04b6c661a55c77c85f414508 from thebolt-crash
branch)./build-linux.py --optimizations pgo --python cpython-3.12 --break-on-failure
This builds CPython and its dependencies from source inside highly deterministic Docker containers. After a few minutes it should eventually get to BOLT optimizations and crash. That
--break-on-failure
keeps the container from exiting on failure, giving you the opportunity todocker exec
into it to debug.CI logs showing the crash should appear at https://github.com/indygreg/python-build-standalone/actions/runs/6379047670 within a few hours.
If you tell me how to figure out which object file / symbol it is crashing on, I can dump DWARF of the offending file / symbol if you aren't able to reproduce.