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

uhyve Unable to create VM #90

Open
gilesbradshaw opened this issue Dec 9, 2020 · 8 comments
Open

uhyve Unable to create VM #90

gilesbradshaw opened this issue Dec 9, 2020 · 8 comments

Comments

@gilesbradshaw
Copy link

$ uhyve target/x86_64-unknown-hermit/debug/hello_world
thread 'main' panicked at 'Unable to create VM: OsError(16)', /home/giles/.cargo/registry/src/github.com-1ecc6299db9ec823/uhyve-0.0.23/src/bin/uhyve.rs:181:10
stack backtrace:
   0:     0x56016c0fd697 - std::backtrace_rs::backtrace::libunwind::trace::h746c3e9529d524bc
                               at /rustc/1700ca07c6dd7becff85678409a5df6ad4cf4f47/library/std/src/../../backtrace/src/backtrace/libunwind.rs:90:5
   1:     0x56016c0fd697 - std::backtrace_rs::backtrace::trace_unsynchronized::h86340908ff889faa
                               at /rustc/1700ca07c6dd7becff85678409a5df6ad4cf4f47/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x56016c0fd697 - std::sys_common::backtrace::_print_fmt::h43f85f9b18230404
                               at /rustc/1700ca07c6dd7becff85678409a5df6ad4cf4f47/library/std/src/sys_common/backtrace.rs:67:5
   3:     0x56016c0fd697 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hc132ae1a5b5aa7cd
                               at /rustc/1700ca07c6dd7becff85678409a5df6ad4cf4f47/library/std/src/sys_common/backtrace.rs:46:22
   4:     0x56016c11c5cc - core::fmt::write::hdf023a0036d2a25f
                               at /rustc/1700ca07c6dd7becff85678409a5df6ad4cf4f47/library/core/src/fmt/mod.rs:1078:17
   5:     0x56016c0f85b2 - std::io::Write::write_fmt::h8580846154bcb66a
                               at /rustc/1700ca07c6dd7becff85678409a5df6ad4cf4f47/library/std/src/io/mod.rs:1519:15
   6:     0x56016c0ff805 - std::sys_common::backtrace::_print::h7ee55fed88d107a3
                               at /rustc/1700ca07c6dd7becff85678409a5df6ad4cf4f47/library/std/src/sys_common/backtrace.rs:49:5
   7:     0x56016c0ff805 - std::sys_common::backtrace::print::h54a7d3e52a524177
                               at /rustc/1700ca07c6dd7becff85678409a5df6ad4cf4f47/library/std/src/sys_common/backtrace.rs:36:9
   8:     0x56016c0ff805 - std::panicking::default_hook::{{closure}}::h60921e857bf55a40
                               at /rustc/1700ca07c6dd7becff85678409a5df6ad4cf4f47/library/std/src/panicking.rs:208:50
   9:     0x56016c0ff35a - std::panicking::default_hook::hf0f9afb1017317fc
                               at /rustc/1700ca07c6dd7becff85678409a5df6ad4cf4f47/library/std/src/panicking.rs:225:9
  10:     0x56016c0fffa1 - std::panicking::rust_panic_with_hook::h8d66bf42b407aaea
                               at /rustc/1700ca07c6dd7becff85678409a5df6ad4cf4f47/library/std/src/panicking.rs:591:17
  11:     0x56016c0ffae7 - std::panicking::begin_panic_handler::{{closure}}::hde71edcd925d0c5e
                               at /rustc/1700ca07c6dd7becff85678409a5df6ad4cf4f47/library/std/src/panicking.rs:497:13
  12:     0x56016c0fdb5c - std::sys_common::backtrace::__rust_end_short_backtrace::h8a3c7d6cea578919
                               at /rustc/1700ca07c6dd7becff85678409a5df6ad4cf4f47/library/std/src/sys_common/backtrace.rs:141:18
  13:     0x56016c0ffa49 - rust_begin_unwind
                               at /rustc/1700ca07c6dd7becff85678409a5df6ad4cf4f47/library/std/src/panicking.rs:493:5
  14:     0x56016c11b6f1 - core::panicking::panic_fmt::h20225113c4a2f8fd
                               at /rustc/1700ca07c6dd7becff85678409a5df6ad4cf4f47/library/core/src/panicking.rs:92:14
  15:     0x56016c11b513 - core::option::expect_none_failed::hc6d6d4cea4fdc285
                               at /rustc/1700ca07c6dd7becff85678409a5df6ad4cf4f47/library/core/src/option.rs:1268:5
  16:     0x56016bfd8999 - uhyve::main::h25caef88d415da46
  17:     0x56016bfd3823 - std::sys_common::backtrace::__rust_begin_short_backtrace::hbfc576f104f953ad
  18:     0x56016bfd3b49 - std::rt::lang_start::{{closure}}::hca78c41f3c1bcf7b
  19:     0x56016c1003c7 - core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once::h54c39b9b8451875a
                               at /rustc/1700ca07c6dd7becff85678409a5df6ad4cf4f47/library/core/src/ops/function.rs:259:13
  20:     0x56016c1003c7 - std::panicking::try::do_call::hcdfba51a06e21b42
                               at /rustc/1700ca07c6dd7becff85678409a5df6ad4cf4f47/library/std/src/panicking.rs:379:40
  21:     0x56016c1003c7 - std::panicking::try::hb36953ccd24f930d
                               at /rustc/1700ca07c6dd7becff85678409a5df6ad4cf4f47/library/std/src/panicking.rs:343:19
  22:     0x56016c1003c7 - std::panic::catch_unwind::hbb374cd03beb3824
                               at /rustc/1700ca07c6dd7becff85678409a5df6ad4cf4f47/library/std/src/panic.rs:396:14
  23:     0x56016c1003c7 - std::rt::lang_start_internal::h97dca9624db2aa85
                               at /rustc/1700ca07c6dd7becff85678409a5df6ad4cf4f47/library/std/src/rt.rs:51:25
  24:     0x56016bfd8bb2 - main
  25:     0x7f3171aadb6b - __libc_start_main
  26:     0x56016bfd30ca - _start
  27:                0x0 - <unknown>

any ideas?

@stlankes
Copy link
Contributor

stlankes commented Dec 9, 2020

Do you use Linux? Is kvm available on your system? Please show me the output of following command RUST_LOG=debug uhyve -v target/x86_64-unknown-hermit/debug/hello_world.

@gilesbradshaw
Copy link
Author

Hi Thanks for your help i needed reboot kubernetes/minikube#6468 (comment)

@stlankes
Copy link
Contributor

stlankes commented Dec 9, 2020

@gilesbradshaw Does it work with minikube? I never tested it.

@gilesbradshaw
Copy link
Author

ah sorry I don't know I was just reffing that as where I found suggestion to reboot :)

@jbreitbart
Copy link
Contributor

@stlankes I think we should handle the error more gracefully. Understanding the panic is probably not that easy for most people. I am reopening the error as a reminder. Maybe someone finds some time to fix this.

@jbreitbart jbreitbart reopened this Dec 9, 2020
bors bot added a commit to hermit-os/uhyve that referenced this issue Dec 10, 2020
42: improve error message r=jbreitbart a=stlankes

PR to solve issuer hermit-os/hermit-rs#90

Co-authored-by: Stefan Lankes <[email protected]>
@jbreitbart
Copy link
Contributor

I'll merge hermit-os/uhyve#42, but it does not fix the issue I had in mind. In general there are two types of errors:

  • A bug inside our code.
  • An error on user level (e.g. no access to KVM as described here, passing invalid parameters to uhyve, ...).

In case of a bug it is great if there is a stack trace so it can be tracked down, however in case of a user error the stack trace is confusing the user and uhyve should just terminate and print the appropriate message.

@stlankes
Copy link
Contributor

Do you prefer something like this?

@jbreitbart
Copy link
Contributor

I am not sure. That change means we treat every error the appears within vm::create_vm as a user error, which I guess it not true and there may very well be a bug in the code. I feel like we need to distinguishboth cases, but I am not sure how to do that.

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