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

Youki does not have reply from dbus #2559

Open
peter-jerry-ye opened this issue Dec 10, 2023 · 13 comments
Open

Youki does not have reply from dbus #2559

peter-jerry-ye opened this issue Dec 10, 2023 · 13 comments

Comments

@peter-jerry-ye
Copy link

Hi, I'm trying to use youki to run wasm. I followed the tutorial, using the rootful podman + debug build of youki + feature wasmtime. However, I'm getting the following error:

DEBUG youki: started by user 0 with ArgsOs { inner: ["/home/zihang/Document/youki/youki", "--log-level=trace", "delete", "--force", "ab1a269dbf8d7b0d7f74c8738b3b72dfe35328675d9b792f9c6b425ddc8f4740"] }
DEBUG youki::commands::delete: start deleting ab1a269dbf8d7b0d7f74c8738b3b72dfe35328675d9b792f9c6b425ddc8f4740
Error: OCI runtime error: /home/zihang/Document/youki/youki: thread 'main' panicked at crates/libcontainer/src/process/container_intermediate_process.rs:49:82:
called `Result::unwrap()` on an `Err` value: Systemd(SystemdClient(DBus(MethodCallErr("expected to get a reply for method call, didn't get any"))))
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Error: failed to receive. "waiting for intermediate process". BrokenChannel

Caused by:
    channel connection broken

What may be the cause of the error? Thank you.

@utam0k
Copy link
Member

utam0k commented Dec 10, 2023

Thanks for your report. May I ask you to build youki from the latest source code? I guess we have already fixed this bug 👍

@peter-jerry-ye
Copy link
Author

Thank you for your reply. I built it from the main branch, and I was running rootful podman, for which I didn't find any similar issues.

@peter-jerry-ye
Copy link
Author

Also, I can't reproduce it every time. Sometimes, it gives an error message like this:

DEBUG youki: started by user 0 with ArgsOs { inner: ["/home/zihang/Document/youki/youki", "--log-level=trace", "delete", "--force", "ffbf349d69bede6871c58efbdd4e53fe37f0021dec0b63c9409c54e7e76d9824"] }
DEBUG youki::commands::delete: start deleting ffbf349d69bede6871c58efbdd4e53fe37f0021dec0b63c9409c54e7e76d9824
Error: OCI runtime error: /home/zihang/Document/youki/youki: Error: failed to receive. "waiting for init ready". BrokenChannel

Caused by:
    channel connection broken

@YJDoc2
Copy link
Collaborator

YJDoc2 commented Dec 11, 2023

Hey @peter-jerry-ye , are you able to run podman rootless container with youki , or not at all? The channel connection broken error is probably a side effect of dbus error. I have seen this in CI a few times as well, but not able to reproduce it locally.

@peter-jerry-ye
Copy link
Author

@YJDoc2 Hi. Yes, I can run podman normally with youki unless it's a wasm workload. I think it is the wasm workload that causes the problem, but I couldn't find any addition error messages to help me locate the problem.

@YJDoc2
Copy link
Collaborator

YJDoc2 commented Dec 11, 2023

@peter-jerry-ye while it is possible that it is specifically wasm workload that is causing the issues ; I feel this is a more general issue, as in our CI (where I have also seen this kind of failure) does not test wasm workload.

Can I ask you to run non-wasm workloads in rootless mode in a loop for sometime, and see if that also fails? And would you be willing to share strace and dbus logs related to youki when such failure happens, so we might be able to understand this better? If you're fine with sharing them, I'll comment on commands to be run, and what exactly is to be collected. Thank you!

@peter-jerry-ye
Copy link
Author

I just retried another way. I built with sudo buildah build --annotation "module.wasm.image/variant=compat" --platform wasi/wasm -t wasm-module . and it worked with sudo podman --runtime ~/Document/youki/youki run --rm localhost/wasm-module it worked. The question is, did it run with youki or crun-wasm?

@peter-jerry-ye
Copy link
Author

@YJDoc2 No, I did not observe failure with non-wasm workloads. Could you please let me know the commands to be run? Thanks.

@YJDoc2
Copy link
Collaborator

YJDoc2 commented Dec 13, 2023

Hey, so not sure why this would specifically happen for wasm workloads, but can you run the following commands and share the o/p?

# podman create command with --runtime youki

strace -o ./strace.log -e '!futex' -x  -v -s 2048 -f podman run <container_name>

The create command should be run normally, as podman does not call youki there ; running the strace + podman run should create a strace.log file, which should contain the dbus messages sent by youki. Note if you get error like cannot open strace.log permission denied , run this in /tmp dir instead.

Apart from that another useful log would be of dbus messages itself, which can be seen by running dbus-monitor --address unix:path=/run/user/id/bus (replace id with your uid) . The issue is many application use this bus, so you get a lot of noise here. For example, simply switching from one application to other using alt+tab can log several messages.

The way I do this is to create two terminals, scale them so both are visible at same time and I don't need to switch windows ; try to keep any other programs running to minimum ; let the initial message flood for few seconds, and then running the podman command. That way the next messages should all be of youki itself. If you can share those logs as well, it wold be great!

Thanks a lot!

@peter-jerry-ye
Copy link
Author

strace.log

Hi, here's my strace.log. Though I think it reported a different error this time.

@YJDoc2
Copy link
Collaborator

YJDoc2 commented Dec 18, 2023

@peter-jerry-ye For some reason, I cannot access the log file you have uploaded. It shows a 404 error when I open the link. Can you check / re-upload? Also can you tell what different error it was ? That would also help when going through the strace logs. Thank you!

@YJDoc2
Copy link
Collaborator

YJDoc2 commented Jan 2, 2024

Hey @peter-jerry-ye , can you take a look at my previous comment? Thanks!

@peter-jerry-ye
Copy link
Author

@YJDoc2 Sorry, I had some health issue during the last few weeks. I'll reupload the strace.
strace.log

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

3 participants