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

Panick when /proc is not mounted #26701

Open
mousetail opened this issue Nov 3, 2024 · 0 comments
Open

Panick when /proc is not mounted #26701

mousetail opened this issue Nov 3, 2024 · 0 comments
Assignees
Labels
needs investigation requires further investigation before determining if it is an issue or not panic

Comments

@mousetail
Copy link

This is a quite unusual setup, I'm aware.

I'm running deno using Bubblewrap:

    let mut command = Command::new("bwrap");
    command
        .args([
            "--ro-bind",
            "/bin",
            "/bin",
            "--chdir",
            "/",
            "--ro-bind",
            "/lib64",
            "/lib64",
            "--ro-bind",
            "/usr",
            "/usr",
            "--ro-bind",
            "/lib",
            "/lib",
            "--ro-bind",
            "/etc",
            "/etc",
            "--ro-bind",
            "/etc/alternatives",
            "/etc/alternatives",
            "--tmpfs",
            "/tmp",
            "--tmpfs",
            "/home/yq",
            "--setenv",
            "HOME",
            "/home/yq",
           "--unsare-all",
           "--new-session"
           "--setenv",
          "RUST_BACKTRACE",
          "1",
          "deno",
          "eval",
          "0"
        ]);

This hangs and shows the panic message:
image
(Note even with RUST_BACKTRACE=1 set it doesn't print a backtrace)

I ran it through strace to try to figure out what is going on, this was the output:

mousetail@DESKTOP-K0SID88:~/pypro$ strace ./deno eval 0 2>&1 | grep open
...
openat(AT_FDCWD, "/proc/self/maps", O_RDONLY|O_CLOEXEC) = 3
openat(AT_FDCWD, "/home/mousetail/pypro/deno", O_RDONLY|O_CLOEXEC) = 9
openat(AT_FDCWD, "/sys/devices/system/cpu/online", O_RDONLY|O_CLOEXEC) = 9
openat(AT_FDCWD, "/dev/urandom", O_RDONLY) = 9
...

What is interesting is that it works fine if I mount a dummy file in /proc but don't mount /sys it seems to work fine, even though it seems to only be loading proc to find the file in /sys to open.

It's not a huge deal to mount a fake /proc but it seems you consider any panic a bug so I'm reporting it just so you are aware.

@bartlomieju bartlomieju added needs investigation requires further investigation before determining if it is an issue or not panic labels Nov 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs investigation requires further investigation before determining if it is an issue or not panic
Projects
None yet
Development

No branches or pull requests

3 participants