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

[Rust] Quick start example throw Broken pipe error via WSL #159

Closed
katopz opened this issue Sep 29, 2023 · 11 comments
Closed

[Rust] Quick start example throw Broken pipe error via WSL #159

katopz opened this issue Sep 29, 2023 · 11 comments

Comments

@katopz
Copy link

katopz commented Sep 29, 2023

Source

https://carton.run/quickstart

Error

{"tokens": String([["day"]], shape=[1, 1], strides=[1, 1], layout=CFcf (0xf), dynamic ndim=2), "scores": Float([[14.551311]], shape=[1, 1], strides=[1, 1], layout=CFcf (0xf), dynamic ndim=2)}
thread 'tokio-runtime-worker' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 32, kind: BrokenPipe, message: "Broken pipe" }', /app/source/carton-runner-interface/src/do_not_modify/framed.rs:71:38
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
thread 'tokio-runtime-worker' panicked at 'called `Result::unwrap()` on an `Err` value: SendError(RPCResponse { id: 0, complete: true, data: LogMessage { record: LogRecord { metadata: LogMetadata { level: Trace, target: "mio::poll" }, args: "deregistering event source from poller", module_path: Some("mio::poll"), file: Some("/root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mio-0.8.5/src/poll.rs"), line: Some(663) } } })', /app/source/carton-runner-interface/src/server.rs:299:36

Any hint?

@VivekPanyam
Copy link
Owner

VivekPanyam commented Sep 29, 2023

Hi! This is #148. The fix has already landed and should be released when the nightly runner builds happen. See the linked issue for more details.

In the meantime, your program is actually working correctly; the error message is from the runner process while it's shutting down. Although it's not a good experience, it doesn't affect the main process or the correctness of the model inference. As mentioned, it should be fixed tonight and I'll post another comment when the release is out.

@katopz
Copy link
Author

katopz commented Sep 29, 2023

Cool thx!, anyway it's not support on Windows am i right? I can see plenty of unix specific there.

   Compiling sendfd v0.4.3
error[E0433]: failed to resolve: could not find `unix` in `os`
 --> C:\Users\katop\.cargo\registry\src\index.crates.io-6f17d22bba15001f\sendfd-0.4.3\src\lib.rs:7:14
  |
7 | use std::os::unix::io::{AsRawFd, RawFd};
  |              ^^^^ could not find `unix` in `os`

error[E0432]: unresolved import `std::os::unix`
 --> C:\Users\katop\.cargo\registry\src\index.crates.io-6f17d22bba15001f\sendfd-0.4.3\src\lib.rs:8:14
  |
8 | use std::os::unix::net;
  |              ^^^^ could not find `unix` in `os`

   Compiling tracing-subscriber v0.3.17

@VivekPanyam
Copy link
Owner

Correct, Windows is not currently supported. I'm open to it if there's interest (or if someone wants to help), but I don't have plans to implement Windows support myself at the moment.

@katopz
Copy link
Author

katopz commented Sep 29, 2023

I'm not a big fan of Windows either 😅 but i think i will take a look if it's not much patch needed.

@VivekPanyam
Copy link
Owner

I suspect it'll be fairly involved, but you're welcome to take a look!

Among other things, the runner interface may be somewhat complex to get working on Windows. We use Unix domain sockets and file descriptor passing on Linux and macOS. You'll probably need to implement an alternative for Windows.

If the core library, the runner interface, and the noop runner work, that's a big step towards Windows support. After that, each of the runners will require some work, but that can be done incrementally.

@katopz
Copy link
Author

katopz commented Sep 29, 2023

That seems far from my hobby 😅, maybe this related 👉 tokio-rs/tokio#2201 JIC someone passing by

@VivekPanyam
Copy link
Owner

There are plenty of other places to help out if you're interested! See here.

Depending on what you want to spend time on, you could work on:

  • creating bindings for a new language
  • creating a runner for a new ML framework
  • cleaning up existing code (search for todo in the codebase)
  • exploring performance and optimization stuff
  • speeding up CI builds
  • ...

Do any of those sound interesting to you?

@katopz
Copy link
Author

katopz commented Sep 29, 2023

My hobby is Rust/Wasm/Cloudflare Workers related (try to avoid js/ts as possible but still), anyway i do have 4090 here so i think i can help on perf/benchmark and maybe optimization pretty much later. 🙌

@VivekPanyam
Copy link
Owner

One thing that would be super useful is if you could explore creating a wonnx runner. I built scaffolding for being able to run inference from the WASM bindings, but haven't had a chance to create a runner that can run in WASM.

Does that sound like something you'd enjoy working on?

@katopz
Copy link
Author

katopz commented Sep 29, 2023

Cool, i will take a look. 🧐

@VivekPanyam
Copy link
Owner

Sounds good.

The nightly builds are complete and new runners have been released that solve the problem. See #148 (comment) for instructions on updating.

I'll go ahead and close this issue since the original task is fixed. I'll create another issue about wonnx sometime tomorrow

This was referenced Sep 30, 2023
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