yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #89268
[Bug 1975711] Re: tox hangs due to pip backtracking during virtualenv generation
Now that hacking has had its falke8 requirement relaxed[1] this is
fixed. 'tox -e pep8' resolves all dependencies, installs them and runs
without issue.
No change needed in nova.
[1] https://review.opendev.org/c/openstack/hacking/+/816676/
** Changed in: nova
Status: In Progress => Invalid
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1975711
Title:
tox hangs due to pip backtracking during virtualenv generation
Status in OpenStack Compute (nova):
Invalid
Bug description:
Description
===========
On a fresh checkout of nova, running tox -e pep8 results in the process maxing out a CPU core and seemingly getting stuck (I terminated it after 30 minutes of no progress).
I believe this is due to pip trying to find a set of packages that
exactly satisfy cross-requirements of all dependencies, checking
multiple progressively older versions of each package until the tree
becomes too complex to handle at all.
Steps to reproduce
==================
* Make a fresh checkout of nova, a shallow one works since we only need master:
git clone --depth 1 https://opendev.org/openstack/nova.git nova
This makes sure the tox virtualenv from an existing checkout isn't reused.
* From within the repo, run tox pep8 with verbosity to see pip output:
$ tox -vvv -e pep8
Expected result
===============
Tox successfully sets up its virtualenv and runs pep8.
Actual result
=============
pip downloads several versions of packages, outputting a large amount of messages like these for a few packages along the way:
INFO: pip is looking at multiple versions of certifi to determine which version is compatible with other requirements. This could take a while.
Downloading certifi-2020.4.5-py2.py3-none-any.whl (156 kB)
|████████████████████████████████| 156 kB 81.6 MB/s
Downloading certifi-2019.11.28-py2.py3-none-any.whl (156 kB)
|████████████████████████████████| 156 kB 86.8 MB/s
Downloading certifi-2019.9.11-py2.py3-none-any.whl (154 kB)
|████████████████████████████████| 154 kB 79.5 MB/s
Downloading certifi-2019.6.16-py2.py3-none-any.whl (157 kB)
|████████████████████████████████| 157 kB 71.6 MB/s
Downloading certifi-2019.3.9-py2.py3-none-any.whl (158 kB)
|████████████████████████████████| 158 kB 84.7 MB/s
INFO: This is taking longer than usual. You might need to provide the dependency resolver with stricter constraints to reduce runtime. If you want to abort this run, you can press Ctrl + C to do so. To improve how pip performs, tell us what happened here: https://pip.pypa.io/surveys/backtracking
Eventually it seems to get completely stuck after one of those
downloads, maxing out a CPU core and seemingly making no more progress
until terminated.
Environment
===========
This happens in dev environments no in Openstack deployments. We've reproduced it on Fedora 35 and 36, I would expect others to be similarly impacted. Some system python env info:
$ python -V
Python 3.10.4
$ pip show pip
Name: pip
Version: 21.3.1
$ pip show tox
Name: tox
Version: 3.24.5
Logs & Configs
==============
Reproduced on a fresh checkout with no altered configs.
To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1975711/+subscriptions
References