microsoft / microsoft/demikernel
[catnap] ambiguous use of Fail::errno for Windows
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 1.2k
- Forks
- 151
- PR merge metrics
- No merged PRs in 30d
Description
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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in src/rust/catnap/socket.rs at the try_pop method and inspect the other sites that coerce ErrorKind into the error constructor. Reproduce a failure on a Windows/catnap setup and trace the returned Err(e). Done means the I/O error is translated into a valid errno, or uses EIO with the original cause as described.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- networking
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100