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

Read/write issues #426

Open
Zylvo opened this issue Dec 30, 2024 · 6 comments
Open

Read/write issues #426

Zylvo opened this issue Dec 30, 2024 · 6 comments

Comments

@Zylvo
Copy link

Zylvo commented Dec 30, 2024

Windows 11 23H2 - 22631.4602
Windows: zfswin-2.2.6rc11
Linux: AUR zfs-dkms 2.2.7-1

There might be a problem with read/write handling on ZFS disk in windows driver, I've faced it in 3 games so far:

  • Cyberpunk 2077: game not launching with error about missing or corrupted archives
  • Skyrim: when trying to download creation club content in game it complains that it has no permissions to write to a folder
  • Dawn Of War Soulstorm: Skirmish option in game GUI is loading for a long time and after it loads and shows map selection screen, maps that are added by mods and stored in game folder as individual files are doubled. Vanilla maps that are stored in compressed game file are not affected by this issue and showed correctly. + Ultimate Apocalypse Mod installer randomly deleted files when installed directly to ZFS drive, I think this is also behavior of the same issue

I've also tried Helldivers 2, Baldurs Gate 3, Path of Exile 2 and those seem to be running fine. I will also mention that on Linux using the same pool everything is fine, no issues in mentioned games, when transferring files to NTFS and executing it there, also no issues, so It's strictly windows zfs issue.

ZFS pool was created on Linux with options:
zpool create -O casesensitivity=insensitive -O compression=zstd -O atime=off -o ashift=12 -o autotrim=on -O dedup=off -O xattr=sa -O acltype=posixacl -O sync=standard
After that I've recreated pool on Windows with options:
zpool create -O casesensitivity=insensitive -O compression=zstd -O atime=off -o ashift=12 -o autotrim=on -O dedup=off -O xattr=sa -O acltype=nfsv4 -O sync=standard -O normalization=formD -O utf8only=on -O aclinherit=passthrough

Issue remains.
I can provide logs/process monitoring/x64dbg/filespy if that will help. So far after I've browsed those I don't see where the issue is, so I guess it's low level (but I'm no expert in debugging filesystem).

//update
rewrote all, including other games findings and a better story

@Zylvo Zylvo changed the title Permission problem (?) or read/write issues Read/write issues Dec 30, 2024
@n0xena
Copy link

n0xena commented Dec 31, 2024

can you provide anything else than games?
also: please provide proper logs and errors - "game X throws an error about Y" isn't really helpful in debugging
also also: although I tried to find a solution for sharing a steam game lib between windows and linux - just don't - use ntfs (or refs if on storage spaces) on windows - and any posix FS like ext4,xfs,btrfs,zst,... on linux - and to exchange data between them exfat
the key problem is that both worlds windows and linux are so extremely different that it's just not possible to use one partition, no matter which FS, to share a game lib between them
I do have high hopes that ZFS one day might be able to overcome this issue - but as this here is just a wrapper of some windows glue logic around the upstream zfs code which is intented for unix (linux/bsd) it's just not at a point to proper perform what you try to use it for
and trust me - I was on that hunt for several years back when zfs was still in 0.8 and win10 just released in mit 2010s - unfrotunately the world hasn't changed that much in the past 10 years
don't blame zfs to not meet what its not designed for

@lundman
Copy link

lundman commented Dec 31, 2024

"no permissions to write to folder" is interesting, I wonder if Windows can pass along AUTH when doing some operations. I believe we handle one case of that in IRP_MJ_CREATE - assuming it is bug free - but maybe there are more. Has anyone checked what ACLs the folder gets afterwards, with something like icacls?

@n0xena
Copy link

n0xena commented Dec 31, 2024

crosspost openzfs#16911

@Zylvo
Copy link
Author

Zylvo commented Jan 4, 2025

can you provide anything else than games? also: please provide proper logs and errors - "game X throws an error about Y" isn't really helpful in debugging

That was my use case for ZFS so I tested it on games, but I also noticed wrong behaviour with Nullsoft Install System, I will attach screenshot at the end of this comment.
Also, I know that error without log is not really helpful, but that's why I asked to tell me what I should share to help with debugging this issue, as I'm not an expert with file systems :(

also also: although I tried to find a solution for sharing a steam game lib between windows and linux - just don't - use ntfs (or refs if on storage spaces) on windows - and any posix FS like ext4,xfs,btrfs,zst,... on linux - and to exchange data between them exfat the key problem is that both worlds windows and linux are so extremely different that it's just not possible to use one partition, no matter which FS, to share a game lib between them I do have high hopes that ZFS one day might be able to overcome this issue - but as this here is just a wrapper of some windows glue logic around the upstream zfs code which is intented for unix (linux/bsd) it's just not at a point to proper perform what you try to use it for and trust me - I was on that hunt for several years back when zfs was still in 0.8 and win10 just released in mit 2010s - unfrotunately the world hasn't changed that much in the past 10 years don't blame ZFS to not meet what its not designed for

Agree, but... I've tried first with winbtrfs, it looked good, but destroyed itself after 1 day, but ZFS is looking really stable and it's impressive cause windows doesn't like anything else than microsoft stuff.
About, shared game library I have to disagree, if games are using proton, they're basically using the same files, only linux need to create additional folder that will store compatibility layer files, which windows won't need to touch. So unless it's native OS game, which will need to redownload binaries every switch between OS, files can be used on both OS. For me that means if issue is resolved ZFS looks like a solid choice for shared game library

Here's what I've noticed with Nullsoft Install System used to create installer for modification to soulstorm (ignore wh40k and mod author additions):

  1. Game installed on NTFS, installation went smooth, no strange behavior and it was quick
    e1
    e2
    e3

  2. Game installed on ZFS, installation was sluggish, it was stopping progress constantly when unpacking 7z files and it removed files it shouldn't touch, as expected behavior is to only delete .7z files
    s1
    s2
    s3
    s4

@lundman
Copy link

lundman commented Jan 4, 2025

Thanks for the input, I'm back in the office next week.

What you should look at as well, is writing out the cbuf as-quickly-to-the-problem as you can. As in, make it fail, and immediately save cbuf. It gets noisy in there, but it will give better ideas to what ZFS is doing at the time.
https://openzfsonosx.org/wiki/Windows_cbuf

you can also run FileSpy.exe, point it to the ZFS driveletter and capture the error that way. Also gets noisy, but this one you can compare a working run, vs a non-working run.

@Zylvo
Copy link
Author

Zylvo commented Jan 15, 2025

Sorry for taking so long, but job, life, no time :(
But here it's:
filespy 1,44GB file log compressed with 7z to 21,4MB (it's inside zip so github will accept it), I'm looking if there's anything there, but I'm also posting all of it, hope it will help
FileSpy.zip

I've done second installation and saved cbuf as soon as installer completed:
cbuf.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants