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

[Bug]: Building wheel for UWSGI intermittently breaks #15303

Open
1 task done
KevinMind opened this issue Jan 23, 2025 · 3 comments · May be fixed by mozilla/addons-server#23020
Open
1 task done

[Bug]: Building wheel for UWSGI intermittently breaks #15303

KevinMind opened this issue Jan 23, 2025 · 3 comments · May be fixed by mozilla/addons-server#23020
Assignees
Labels
needs:info repository:addons-server Issue relating to addons-server

Comments

@KevinMind
Copy link
Contributor

KevinMind commented Jan 23, 2025

What happened?

run "make up DOCKER_TARGET=production"

#22 41.86 Building wheels for collected packages: uWSGI, mysqlclient, filtercascade, sgmllib3k
#22 41.86   Building wheel for uWSGI (pyproject.toml): started
#22 48.15   Building wheel for uWSGI (pyproject.toml): finished with status 'error'
#22 48.16   error: subprocess-exited-with-error
#22 48.16   
#22 48.16   × Building wheel for uWSGI (pyproject.toml) did not run successfully.
#22 48.16   │ exit code: 1
#22 48.16   ╰─> [29 lines of output]
#22 48.16       /tmp/pip-build-env-605_wdj5/overlay/lib/python3.12/site-packages/setuptools/_distutils/dist.py:270: UserWarning: Unknown distribution option: 'descriptions'
#22 48.16         warnings.warn(msg)
#22 48.16       /usr/local/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py:251: _IncompatibleBdistWheel: wheel.bdist_wheel is deprecated, please import it from setuptools
#22 48.16       !!
#22 48.16       
#22 48.16               ********************************************************************************
#22 48.16               Ensure that any custom bdist_wheel implementation is a subclass of
#22 48.16               setuptools.command.bdist_wheel.bdist_wheel.
#22 48.16       
#22 48.16               By 2025-Oct-15, you need to update your project and remove deprecated calls
#22 48.16               or your builds will no longer be supported.
#22 48.16       
#22 48.16               See https://github.com/pypa/wheel/pull/631 for details.
#22 48.16               ********************************************************************************
#22 48.16       
#22 48.16       !!
#22 48.16         return _build_backend().build_wheel(wheel_directory, config_settings,
#22 48.16       /tmp/pip-build-env-605_wdj5/overlay/lib/python3.12/site-packages/setuptools/_distutils/dist.py:270: UserWarning: Unknown distribution option: 'descriptions'
#22 48.16         warnings.warn(msg)
#22 48.16       running bdist_wheel
#22 48.16       running build
#22 48.16       running build_py
#22 48.16       creating build/lib
#22 48.16       copying uwsgidecorators.py -> build/lib
#22 48.16       installing to build/bdist.linux-x86_64/wheel
#22 48.16       running install
#22 48.16       gcc: internal compiler error: Illegal instruction signal terminated program as
#22 48.16       Please submit a full bug report, with preprocessed source (by using -freport-bug).
#22 48.16       See <file:///usr/share/doc/gcc-12/README.Bugs> for instructions.
#22 48.16       [end of output]
#22 48.16   
#22 48.16   note: This error originates from a subprocess, and is likely not a problem with pip.
#22 48.16   ERROR: Failed building wheel for uWSGI
#22 48.17   Building wheel for mysqlclient (pyproject.toml): started
#22 50.44   Building wheel for mysqlclient (pyproject.toml): finished with status 'done'
#22 50.44   Created wheel for mysqlclient: filename=mysqlclient-2.2.6-cp312-cp312-linux_x86_64.whl size=131240 sha256=5984da87d33fca490bb751626326e1b9966c6f06b6c71c2e6c0991643c403c6f
#22 50.44   Stored in directory: /deps/cache/wheels/a7/c2/a6/cb894cfccf154d6aa328e27af7840404452f1ad2259b7d123d
#22 50.45   Building wheel for filtercascade (pyproject.toml): started
#22 51.09   Building wheel for filtercascade (pyproject.toml): finished with status 'done'
#22 51.09   Created wheel for filtercascade: filename=filtercascade-0.4.1-py3-none-any.whl size=10273 sha256=3e700069809ae2f4883bf7bd667f8131927411677e32cc954f3cd1a444a4d928
#22 51.09   Stored in directory: /deps/cache/wheels/df/73/64/6b2968cf62f7d6d7145fe3662c2be390c0a125b00474e2ce5b
#22 51.09   Building wheel for sgmllib3k (pyproject.toml): started
#22 51.75   Building wheel for sgmllib3k (pyproject.toml): finished with status 'done'
#22 51.75   Created wheel for sgmllib3k: filename=sgmllib3k-1.0.0-py3-none-any.whl size=6089 sha256=65bbaa6ffbc4939bc2078117940aa6a0d9a00e553b76135f397ab90c36cd2d82
#22 51.75   Stored in directory: /deps/cache/wheels/03/f5/1a/23761066dac1d0e8e683e5fdb27e12de53209d05a4a37e6246
#22 51.76 Successfully built mysqlclient filtercascade sgmllib3k
#22 51.76 Failed to build uWSGI
#22 52.06 ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (uWSGI)
#22 52.73 Updating deps... 
#22 52.73  targets: pip, prod 
#22 52.73  DOCKER_TAG: local 
#22 52.73  DOCKER_TARGET: production 
#22 52.73  OLYMPIA_DEPS:  
#22 52.73 
#22 52.73 Updating existing deps
#22 52.73 Installing pip dependencies: pip, prod 
#22 52.73 
#22 52.73 Traceback (most recent call last):
#22 52.73   File "/data/olympia/scripts/install_deps.py", line 94, in <module>
#22 52.74     main(sys.argv[1:])
#22 52.74   File "/data/olympia/scripts/install_deps.py", line 85, in main
#22 52.74     subprocess.run(pip_args, check=True)
#22 52.74   File "/usr/local/lib/python3.12/subprocess.py", line 571, in run
#22 52.74     raise CalledProcessError(retcode, process.args,
#22 52.74 subprocess.CalledProcessError: Command '['python3', '-m', 'pip', 'install', '--progress-bar=off', '--no-deps', '--exists-action=w', '-r', 'requirements/pip.txt', '-r', 'requirements/prod.txt']' returned non-zero exit status 1.
#22 52.76 make: *** [Makefile-docker:84: update_deps] Error 1
#22 52.77 Traceback (most recent call last):
#22 52.77   File "/data/olympia/scripts/sync_host_files.py", line 22, in <module>
#22 52.77     main()
#22 52.77   File "/data/olympia/scripts/sync_host_files.py", line 11, in main
#22 52.77     subprocess.run(['make', 'update_deps'], check=True)
#22 52.77   File "/usr/local/lib/python3.12/subprocess.py", line 571, in run
#22 52.77     raise CalledProcessError(retcode, process.args,
#22 52.77 subprocess.CalledProcessError: Command '['make', 'update_deps']' returned non-zero exit status 2.
#22 ERROR: process "/bin/bash -xue -c ${HOME}/scripts/sync_host_files.py" did not complete successfully: exit code: 1
------
 > [production 2/3] RUN /data/olympia/scripts/sync_host_files.py:
52.74 subprocess.CalledProcessError: Command '['python3', '-m', 'pip', 'install', '--progress-bar=off', '--no-deps', '--exists-action=w', '-r', 'requirements/pip.txt', '-r', 'requirements/prod.txt']' returned non-zero exit status 1.
52.76 make: *** [Makefile-docker:84: update_deps] Error 1
52.77 Traceback (most recent call last):
52.77   File "/data/olympia/scripts/sync_host_files.py", line 22, in <module>
52.77     main()
52.77   File "/data/olympia/scripts/sync_host_files.py", line 11, in main
52.77     subprocess.run(['make', 'update_deps'], check=True)
52.77   File "/usr/local/lib/python3.12/subprocess.py", line 571, in run
52.77     raise CalledProcessError(retcode, process.args,
52.77 subprocess.CalledProcessError: Command '['make', 'update_deps']' returned non-zero exit status 2.
------
Dockerfile:139
--------------------
 137 |     
 138 |     # This command will install production dependencies and compile locales and static assets
 139 | >>> RUN ${HOME}/scripts/sync_host_files.py
 140 |     
 141 |     RUN ${HOME}/scripts/hash_directory.py site-static --exclude 'staticfiles.json'
--------------------
ERROR: failed to solve: process "/bin/bash -xue -c ${HOME}/scripts/sync_host_files.py" did not complete successfully: exit code: 1

What did you expect to happen?

Should not fail

Is there an existing issue for this?

  • I have searched the existing issues

┆Issue is synchronized with this Jira Task

@KevinMind KevinMind added needs:info repository:addons-server Issue relating to addons-server labels Jan 23, 2025
@diox
Copy link
Member

diox commented Jan 23, 2025

We have considered switching to https://pypi.org/project/pyuwsgi/ in the past, which provides wheels for uwsgi, saving us from having to build them ourselves (which would speed up the build, on top of making it more reliable). It's maintained by Lincolnloop (https://github.com/lincolnloop/pyuwsgi-wheels) which are trusted members of the Python community.

@KevinMind
Copy link
Contributor Author

I wonder if this surfaced after python 3.12 upgrade?

@diox
Copy link
Member

diox commented Jan 23, 2025

Not sure, it seems to be caused by gcc: internal compiler error: Illegal instruction signal terminated program ... weird that it's intermittent.

I'd rather switch to pyuwsgi than try to debug this obscure build error, but we need to make sure it would be compatible.

@KevinMind KevinMind linked a pull request Jan 23, 2025 that will close this issue
5 tasks
@KevinMind KevinMind self-assigned this Jan 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs:info repository:addons-server Issue relating to addons-server
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants