protonscr

Calling EXT2_IOC_SETFLAGS fails because it gets IOError instead of OSError

protonclosed
ValveSoftware/Proton#4249 · opened 2020-10-09 by GerbilSoft · updated 2020-11-16 · 4 comments · github
GGerbilSoft 2020-10-09 github

Proton 5.0-9, Linux kernel 5.8.13, glibc 2.32

I recently upgraded my system to python-3.9. I'm not sure if that's the direct cause of this issue, since the Python codebase doesn't seem to reflect this, but the proton launch script is failing when trying to use the EXT2_IOC_SETFLAGS ioctl:

Proton: Upgrading prefix from None to 5.0-1 (/mnt/games/Steam/steamapps/compatdata/945360//)
Traceback (most recent call last):
  File "/mnt/games/Steam/steamapps/common/Proton 5.0/proton", line 697, in <module>
    g_session.init_session()
  File "/mnt/games/Steam/steamapps/common/Proton 5.0/proton", line 538, in init_session
    g_compatdata.setup_prefix()
  File "/mnt/games/Steam/steamapps/common/Proton 5.0/proton", line 311, in setup_prefix
    set_dir_casefold_bit(self.prefix_dir + "/drive_c")
  File "/mnt/games/Steam/steamapps/common/Proton 5.0/proton", line 86, in set_dir_casefold_bit
    fcntl.ioctl(dr, EXT2_IOC_SETFLAGS, dat, False)
IOError: [Errno 95] Operation not supported

It should be getting OSError in this case, since the /mnt/games filesystem didn't have casefold enabled at the time. (I just reformatted it with casefold enabled and this problem went away, but it shows up again when using a non-casefold fs.)

GGerbilSoft 2020-10-09 github

Sidenote: Checking lsattr on the compatdata directories after running proton on a filesystem with casefold, the 'F' attribute doesn't seem to be set.

Aaeikum 2020-10-13 github

The python fcntl docs say Changed in version 3.3: Operations in this module used to raise an IOError where they now raise an OSError. So it's weird that you're getting an IOError on python 3.9. But whatever, I'll change it to catch both types. Thanks for reporting.

Aaeikum 2020-10-15 github

A fix for this is in the 5.13 release: 7493508dc88dc91f2d9f431c20ea63cd42f2e342 . I'm planning to backport it to 5.0 as well.

Aaeikum 2020-11-05 github

This is now in the 5.0 branch as well. OK to close this?

Proton versions