-
Notifications
You must be signed in to change notification settings - Fork 378
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
deno panic #363
Comments
it boils down to mio trying to use an unspported syscall, here is a minimum reproduction main.rs use mio::{Events, Poll};
fn main() -> Result<(), Box<dyn std::error::Error>> {
let mut poll = Poll::new()?;
let mut events = Events::with_capacity(1024);
poll.poll(&mut events, None)?;
Ok(())
} Cargo.toml
panics with |
Wow, thank you for the reproduction code. |
I debugged a bit and it seems like epoll_wait implementation is the problem, it shows up like this in strace
which seems very suspicious |
Actually I'm not sure about my epoll_wait assumption maybe its just how strace formatting. But I did follow the code with gdb and that seems the last syscall it uses in mio |
turns out its indeed If I change that to use |
I tried to reproduce with a simple c program #include <sys/epoll.h>
int main() {
int epoll_fd = epoll_create1(0);
struct epoll_event events[10];
epoll_wait(epoll_fd, events, 10, -1);
} but this works and strace shows its making a call to So it seems like proot make this translation somewhere ? not sure why the same thing doesn't happen with rust |
somehow this bug doesn't happen on proot aarch64 , deno seems to work there denoland/deno#4862 (comment) |
I'm using termux on waydroid to test, it just occured to me that maybe its waydroid (or the image it uses) issue Or a waydroid/proot interaction, compiling the minimal example does work on waydroid termux without proot (compiled to android-x86-64) |
I tried with a different x86-64 android emulator (https://appetize.io) and it errors the same way |
Using deno with patched mio that uses pwait indeed works correctly |
Expected Behavior
deno works with no error on x86_64 linux via proot
Actual Behavior
deno panics inside tokio
Steps to Reproduce the Problem
Specifications
Linux waydroid 6.2.1-PRoot-Distro #1 ZEN SMP PREEMPT_DYNAMIC Thu, 27 Jul 2023 22:02:02 +0000 x86_64 GNU/Linux
Command Output
I'm assuming that there is a syscall that tokio is using that it isn't handled, strace doesn't show anything suspicious
The motivation is I want to use deno on termux on waydroid, the easiest way seemed to use proot
The text was updated successfully, but these errors were encountered: