demikernel icon indicating copy to clipboard operation
demikernel copied to clipboard

[catnap] ambiguous use of Fail::errno for Windows

Open kyleholohan opened this issue 2 years ago • 0 comments

Description

The catnap runtime for Windows uses socket2 for underlying I/O. This crate indicates errors with the std::io::Error type, which relies upon the Rust-specific ErrorKind enum. Several sites in the code (such as catnap/socket.rs method try_pop) coerce the ErrorKind value into the error constructor. It seems the desired behavior is to use Fail's From<io::Error> trait.

How to Reproduce

Cause any failure condition on a Windows/catnap setup. The returned Err(e), e.errno will be an ErrorKind value.

Expected Behavior

Ideally we would translate the I/O error kind into a valid errno; however, even using the EIO code with the correct cause would improve correctness.

Related Issues

Possibly #344

kyleholohan avatar Oct 13 '23 23:10 kyleholohan