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

Wine compatibility; NTSTATUS ERROR_NO_SUCH_DEVICE #15

Open
siltyy opened this issue May 3, 2024 · 3 comments
Open

Wine compatibility; NTSTATUS ERROR_NO_SUCH_DEVICE #15

siltyy opened this issue May 3, 2024 · 3 comments

Comments

@siltyy
Copy link

siltyy commented May 3, 2024

When trying to connect to a pathname UNIX domain socket with a program running on Wine, I receive the following error (ERROR_NO_SUCH_DEVICE):

called `Result::unwrap()` on an `Err` value: Os { code: 10047, kind: Uncategorized, message: "OS Error 10047 (FormatMessageW() returned error 317)" }
stack backtrace:
   0: rust_begin_unwind
             at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library\std\src/panicking.rs:645:5
   1: core::panicking::panic_fmt
             at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library\core\src/panicking.rs:72:14
   2: core::result::unwrap_failed
             at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library\core\src/result.rs:1649:5
   3: core::result::Result<T,E>::unwrap
             at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce\library\core\src\result.rs:1073:23
   4: win_uds_test::main
             at /home/silt/Documents/Programming/Rust/win-uds-test/src/main.rs:3:5
   5: core::ops::function::FnOnce::call_once
             at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce\library\core\src\ops\function.rs:250:5

The test program I'm using is nothing fancy, just

use uds_windows::UnixStream;
fn main() {
    UnixStream::connect(r"Z:\tmp\socket").unwrap();
}

Looking at the output of strace, the path I provide is never even checked, and no socket-related operations are done excepting those from Wine itself.

Any idea what could be going wrong here, or tips on how to proceed with properly debugging this?

Environment info:
  • OS: Artix Linux Rolling
  • Wine: wine-ge-proton8-4 (reproduces on all other Wine versions I've tried)
  • uds_windows: 1.1.0
  • rustc: 1.76.0 (07dca489a 2024-02-04)
  • Build target: i686-pc-windows-gnu
@haraldh
Copy link
Owner

haraldh commented May 3, 2024

no clue.. we were testing with unix like file paths.. not windows drives

@siltyy
Copy link
Author

siltyy commented May 4, 2024

UNIX-like file paths, on Windows? I'm a bit confused about what you mean, since I've also tried stuff like /tmp/socket, /z/tmp/socket, \\?\GlobalRoot\Global??\Z:\tmp\socket, \\?\Global\Z:\tmp\socket, and even just \socket and /socket with the socket being at C:\socket thinking maybe this only supported subdirectories of C:, and all of them had the same issue.

@siltyy
Copy link
Author

siltyy commented May 26, 2024

// Winsock2 expects 'sun_path' to be a Win32 UTF-8 file system path

Z:\tmp\socket, z:\tmp\socket, and (with the socket in C:'s root) \socket are all valid Win32 file paths as defined by https://learn.microsoft.com/en-us/windows/win32/fileio/naming-a-file and should work assuming the comment is correct and the code is working correctly.

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

2 participants