Skip to content

pip hangs, lockfile can't acquire a lock, forward-slash in hostname #6938

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

Closed
cjdelisle opened this issue Aug 27, 2019 · 2 comments
Closed

pip hangs, lockfile can't acquire a lock, forward-slash in hostname #6938

cjdelisle opened this issue Aug 27, 2019 · 2 comments
Labels
auto-locked Outdated issues that have been locked by automation C: cache Dealing with cache and files in it

Comments

@cjdelisle
Copy link

Environment

  • pip version: 19.1.1
  • Python version: 3.7
  • OS: OSX 10.10.5

My machine's hostname is ¯\_(ツ)_/¯

Description

Pip hangs on doing any action, removing the cache makes some commands (e.g. list) work once, but after the first time, it hangs again.

80e11c05d836c05103f (from https://pypi.org/simple/pip/) (requires-python:>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*), version: 19.2.3
  Found link https://files.pythonhosted.org/packages/00/9e/4c83a0950d8bdec0b4ca72afd2f9cea92d08eb7c1a768363f2ea458d08b4/pip-19.2.3.tar.gz#sha256=e7a31f147974362e6c82d84b91c7f2bdf57e4d3163d3d454e6c3e71944d
67135 (from https://pypi.org/simple/pip/) (requires-python:>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*), version: 19.2.3
There was an error checking the latest version of pip
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/pip/_vendor/lockfile/linklockfile.py", line 19, in acquire
    open(self.unique_name, "wb").close()
FileNotFoundError: [Errno 2] No such file or directory: '/Users/user/Library/Caches/pip/¯\\_(ツ)_/¯-714d9300.40509451801170741664861'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/pip/_internal/utils/outdated.py", line 138, in pip_version_check
    state.save(pypi_version, current_time)
  File "/usr/local/lib/python3.7/site-packages/pip/_internal/utils/outdated.py", line 62, in save
    with lockfile.LockFile(self.statefile_path):
  File "/usr/local/lib/python3.7/site-packages/pip/_vendor/lockfile/__init__.py", line 197, in __enter__
    self.acquire()
  File "/usr/local/lib/python3.7/site-packages/pip/_vendor/lockfile/linklockfile.py", line 21, in acquire
    raise LockFailed("failed to create %s" % self.unique_name)
pip._vendor.lockfile.LockFailed: failed to create /Users/user/Library/Caches/pip/¯\_(ツ)_/¯-714d9300.40509451801170741664861
¯\_(ツ)_/¯:~ user$

Expected behavior

How to Reproduce

Set your machine's hostname to ¯\_(ツ)_/¯

  1. Get package from '...'
  2. Then run '...'
  3. An error occurs.

Output

Paste the output of the steps above, including the commands themselves and
pip's output/traceback etc.
@ghost ghost added the S: needs triage Issues/PRs that need to be triaged label Aug 27, 2019
@cjdelisle
Copy link
Author

FYI this is fixed by changing to a more normal hostname.

@chrahunt chrahunt added the C: cache Dealing with cache and files in it label Aug 31, 2019
@ghost ghost removed the S: needs triage Issues/PRs that need to be triaged label Aug 31, 2019
@chrahunt
Copy link
Member

Hello! This will be fixed by #6954, since we will no longer use lockfile (or otherwise use the hostname) in this code path.

@lock lock bot added the auto-locked Outdated issues that have been locked by automation label Sep 30, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Sep 30, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
auto-locked Outdated issues that have been locked by automation C: cache Dealing with cache and files in it
Projects
None yet
Development

No branches or pull requests

2 participants