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

Pip Issues on Windows + ReFS #2993

Closed
waxhell opened this issue Jul 28, 2015 · 3 comments
Closed

Pip Issues on Windows + ReFS #2993

waxhell opened this issue Jul 28, 2015 · 3 comments
Labels
auto-locked Outdated issues that have been locked by automation kind: crash For situations where pip crashes project: vendored dependency Related to a vendored dependency type: bug A confirmed bug or unintended behavior

Comments

@waxhell
Copy link

waxhell commented Jul 28, 2015

Also posted to the python bug tracker: https://bugs.python.org/issue24738

Storage Spaces (RAID volumes) under Windows 8.1 / Server 2012 R2 use ReFS which does not support hard links.

If the Users directory has been moved to a ReFS volume, it causes pip to hang while calling os.link as it gets suck in the OSError exception since no timeout has been called to the initial call to acquire().

As a side effect -- this also makes it so that Python can not be uninstalled if pip is installed. The script must be terminated with a ctrl-c.

Tested under 3.5.0b3 as well as 3.4.3 (x64 as well as x32).

Traceback from ctrl-c on 'pip list':

I:\>pip list
Traceback (most recent call last):
  File "C:\Program Files\Python 3.5\lib\site-packages\pip\_vendor\lockfile\linkl
ockfile.py", line 30, in acquire
    os.link(self.unique_name, self.lock_file)
OSError: [WinError 50] The request is not supported: 'I:\\Users\\Harry\\AppData\
\Local\\pip\\Cache\\omgwtfdarkgoon-1d14.781968199621979134564595' -> 'I:\\Users\
\Harry\\AppData\\Local\\pip\\Cache\\selfcheck.json.lock'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Program Files\Python 3.5\lib\runpy.py", line 170, in _run_module_as_m
ain
    "__main__", mod_spec)
  File "C:\Program Files\Python 3.5\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Program Files\Python 3.5\Scripts\pip.exe\__main__.py", line 9, in <mo
dule>
  File "C:\Program Files\Python 3.5\lib\site-packages\pip\__init__.py", line 217
, in main
    return command.main(cmd_args)
  File "C:\Program Files\Python 3.5\lib\site-packages\pip\basecommand.py", line
220, in main
    pip_version_check(session)
  File "C:\Program Files\Python 3.5\lib\site-packages\pip\utils\outdated.py", li
ne 134, in pip_version_check
    state.save(pypi_version, current_time)
  File "C:\Program Files\Python 3.5\lib\site-packages\pip\utils\outdated.py", li
ne 71, in save
    with lockfile.LockFile(self.statefile_path):
  File "C:\Program Files\Python 3.5\lib\site-packages\pip\_vendor\lockfile\__ini
t__.py", line 238, in __enter__
    self.acquire()
  File "C:\Program Files\Python 3.5\lib\site-packages\pip\_vendor\lockfile\linkl
ockfile.py", line 49, in acquire
    time.sleep(timeout is not None and timeout/10 or 0.1)
KeyboardInterrupt
@pfmoore
Copy link
Member

pfmoore commented Jul 28, 2015

Can you raise an issue with the lockfile project for this? The bug is caused by that project not allowing for the possibility that os.link() could fail because links aren't supported, rather than because we're waiting for the lock. The issue is in linklockfile.py in acquire() at around line 49, as noted in the traceback.

As a workaround, pip could add a timeout, but (a) that could cause potential failures if the timeout is too short, and (b) it would make pip extremely slow when links aren't supported (we'd wait for the timeout, then try the proper method).

@waxhell
Copy link
Author

waxhell commented Jul 28, 2015

Already done.

https://bugs.launchpad.net/pylockfile/+bug/1478790

Also as a fyi, the following lockfile bug is related but not due to the same issue:

https://bugs.launchpad.net/pylockfile/+bug/1472101

@pradyunsg pradyunsg added project: vendored dependency Related to a vendored dependency and removed dependency/lockfile labels Jun 26, 2017
@pradyunsg pradyunsg added the kind: crash For situations where pip crashes label Oct 17, 2017
@pradyunsg pradyunsg added S: needs triage Issues/PRs that need to be triaged type: bug A confirmed bug or unintended behavior and removed type: bug A confirmed bug or unintended behavior S: needs triage Issues/PRs that need to be triaged labels May 11, 2018
@chrahunt
Copy link
Member

Let's track this with #6954, which will remove hardlinks.

@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 kind: crash For situations where pip crashes project: vendored dependency Related to a vendored dependency type: bug A confirmed bug or unintended behavior
Projects
None yet
Development

No branches or pull requests

5 participants