[Bug 59671] New: Inconsistent FILE_ATTRIBUTE_REPARSE_POINT on container bind-mounts
http://bugs.winehq.org/show_bug.cgi?id=59671 Bug ID: 59671 Summary: Inconsistent FILE_ATTRIBUTE_REPARSE_POINT on container bind-mounts Product: Wine Version: 11.0 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs@list.winehq.org Reporter: me@a2va.dev Distribution: --- Created attachment 80762 --> http://bugs.winehq.org/attachment.cgi?id=80762 Rust executable When running Wine inside a container where the working directory is a Linux mount point (bind-mounted), Wine identifies the directory as a symlink/reparse point, but fails to satisfy a DeviceIoControl request for FSCTL_GET_REPARSE_POINT. This causes Rust's std::fs::read_link to fail with ERROR_NOT_A_REPARSE_POINT (4390). ``` use std::env; use std::path::PathBuf; fn main() { let target = env::args().nth(1).unwrap_or_else(|| ".".to_string()); let path = PathBuf::from(&target); if path.is_symlink() { println!("Is symlink: {}", path.display()); path.read_link().unwrap(); } } ``` Output of the program: ``` Z:\home\a2va\Documents\temp\wine-readlink>wine-readlink.exe Is symlink: . thread 'main' (104) panicked at src\main.rs:10:26: called `Result::unwrap()` on an `Err` value: Os { code: 4390, kind: Uncategorized, message: "OS Error 4390 (FormatMess ageW() returned error 317)" } note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace ``` Here is the Dockerfile, with the command to reproduce for both podman and docker. ```FROM fedora:43 RUN dnf install -y \ wine \ wine-core \ wine-common ENV WINEPREFIX=/opt/wineprefix RUN mkdir -p "$WINEPREFIX" RUN wineboot --init RUN wineserver -w # ENV WINEDEBUG=+relay,+file,+ioctl CMD ["wine", "cmd"] # podman build -f Dockerfile -t wine-repro:latest # podman run -it -w "$(pwd)" -v "$(pwd):$(pwd):rbind,z" wine-repro:latest # podman run -it -w "$(pwd)" -v "$(pwd):$(pwd):rbind,z" wine-repro:latest wine read-link.exe > wine.log 2>&1 # docker build -f Dockerfile -t wine-repro:latest . # docker run -it -w "$(pwd)" -v "$(pwd):$(pwd)" wine-repro:latest # docker run -it -w "$(pwd)" -v "$(pwd):$(pwd)" wine-repro:latest wine read-link.exe > wine.log 2>&1 ``` It's also reproducible in C, with CreateFile and DeviceIoControl. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=59671 --- Comment #1 from me@a2va.dev --- Created attachment 80763 --> http://bugs.winehq.org/attachment.cgi?id=80763 Wine log -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=59671 Zeb Figura <z.figura12@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |z.figura12@gmail.com Component|-unknown |ntdll --- Comment #2 from Zeb Figura <z.figura12@gmail.com> --- Is there anything depending on this in practice? -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=59671 --- Comment #3 from me@a2va.dev --- Yes, this breaks cargo.exe when run under Wine in a containerized environment. Any Rust project with a build.rs script will crash when attempting to compile it. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=59671 Zeb Figura <z.figura12@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Inconsistent |Rust's cargo.exe crashes |FILE_ATTRIBUTE_REPARSE_POIN |when building inside a Unix |T on container bind-mounts |mount point (needs | |FSCTL_GET_REPARSE_POINT) -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
participants (1)
-
WineHQ Bugzilla