ocaml-multicore / ocaml-uring

Bindings to io_uring for OCaml
ISC License
62 stars 17 forks source link

FD passing `sendmsg` fails on WSL2 #55

Open patricoferris opened 2 years ago

patricoferris commented 2 years ago

At the moment using the latest WSL kernel, the fd passing sendmsg examples are failing with EINVAL. Not sure if this is an issue in the C stubs or something quirky with WSL.

┌──────────────────────────────────────────────────────────────────────────────┐
│ [FAIL]        uring         12   send_msg.                                   │
└──────────────────────────────────────────────────────────────────────────────┘
File "ocaml-uring/tests/main.ml", line 387, character 13:

   Expected: `2'
   Received: `-22'
talex5 commented 2 years ago

https://github.com/Microsoft/WSL/issues/514 says:

We currently only have a support for passing just one file descriptor at a time via unix sockets. [...] Just FYI that this should be fixed in 15042.

Maybe that's the problem?

whentze commented 1 year ago

AFAICT, this functionality was broken on Linux proper too, at least for a while. Here's what I can make of this:

@patricoferris when you opened this issue, the latest kernel for WSL2 was 5.10.93.2 in which fd passing was still banned. By now, you can get 5.15 kernels for WSL2. Can you try it with that?