os.link() issues with Windows + ReFS

Bug #1478790 reported by waxhell
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
pylockfile
Won't Fix
Undecided
Unassigned

Bug Description

linklockfile.py does not detect potential issues when working with ReFS volumes (Storage Spaces) in Windows 8.1 / Windows Server 2008 R2. ReFS does not support hard links.

Without a timeout passed to acquire(), the script will get stuck repeatedly retrying an operation that can never succeed on a ReFS volume.

Discovered when trying to troubleshoot issues with pip hanging in this specific environment.

https://github.com/pypa/pip/issues/2993

I:\>pip list

Ctrl-C

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\\[[USER NAME REMOVED]]\\AppData\
\Local\\pip\\Cache\\[[COMPUTER NAME REMOVED]]-1d14.781968199621979134564595' -> 'I:\\Users\
\[[USER NAME REMOVED]]\\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

Revision history for this message
Ben Nemec (bnemec) wrote :

pylockfile has been retired. We won't be making any more updates to it. See the fasteners library for a supported alternative.

Changed in pylockfile:
status: New → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.