@kisak-valve yes, it's duplicate.
Also, I got the flags the wrong way around. It's failing because it's LOCK_SH and the files are opened write-only O_WRONLY.
On NFSv4:
LOCK_SH only works if the file is opened for readingLOCK_EX only works if the file is opened for writingIn both cases, the "other" direction is irrelevant, i.e. O_RDWR works in all cases.
Thanks for confirming it's a duplicate. ~I've transferred this issue to https://github.com/ValveSoftware/steam-for-linux/issues/5788#issuecomment-511219079 so we can keep the discussion together.~ Removed in favor of https://github.com/ValveSoftware/steam-for-linux/issues/5788#issuecomment-511219089.
Closing in favor of the existing issue report.
Your system information
Please describe your issue in as much detail as possible:
The Steam downloader (for client updates, game downloads as well as workshop downloads) seems to be locking files using ~
flock(LOCK_EX)~flock(LOCK_SH). However, the files seem to be opened using ~open(O_RDONLY)~open(O_WRONLY), which does not work on NFS(v4) file systems. Files must be opened asopen(O_RDWR)to take a ~LOCK_EX~LOCK_SHlock.Steps for reproducing this issue:
The problem occurs with these directories:
...steam/steamapps/downloading...steam/steamapps/workshop/downloads~/.local/share/SteamSteps for fixing this issue:
LOCK_EX~LOCK_SHflock()calls are opened for read-write access (O_RDWR), not ~read~ write-only access (~O_RDONLY~O_WRONLY).