-
Notifications
You must be signed in to change notification settings - Fork 54
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
vng silently hangs if boot fails #217
Comments
Version? |
Hello, @bjackman : which mode are you using? Interactive or script mode? In interactive mode, I agree it is unclear what can be done when it crashes before the init script. Maybe a timeout for the init script? In case of timeout, a message could be printed to use the verbose mode to see what's wrong? |
I'm guessing script mode means when you pass a command after Some examples of the commands in my history
Yeah - although I think before adding that complexity it would be good to confirm my assumption that setting I guess the ideal would be if there was a way to start QEMU with the |
Yes sorry, everything passed after Did you use
It is hard to assume people might not explicitly want to reboot the VM :)
Or by default using the |
Oh yeah don't worry I don't need help with the original problem, I can't remember what it was (I think probably I had disabled paravirt in my guest kernel so I needed
Yeah that's a good point - definitely sound like rebooting is a usecase that matters to someone.
Yeah I guess that would be an option. But, if there are people relying on the current behaviour, it would cause pain for them. So I think your timeout idea probably is the best solution here. |
The combo We don't do this in interactive mode, since we want to simulate what a machine would do normally on panic (just hang) unless some special boot options are passed via However, it'd be nice to always print kernel oops / panic to stderr when running in interactive mode. I'll do some testing and prepare a patch. |
As mentioned in #217 it would be nice to always print the output of critical kernel errors (oops / panic), instead of suppressing all the kernel logs completely by default. Therefore, keep suppressing the boot kernel log, but always dump panic/oops to stderr by default when running in interactive mode. Example with this change applied: arighi@virtme-ng~/s/linux (master)> vng _ _ __ _(_)_ __| |_ _ __ ___ ___ _ __ __ _ \ \ / / | __| __| _ _ \ / _ \_____| _ \ / _ | \ V /| | | | |_| | | | | | __/_____| | | | (_| | \_/ |_|_| \__|_| |_| |_|\___| |_| |_|\__ | |___/ kernel version: 6.13.0-virtme x86_64 (CTRL+d to exit) arighi@virtme-ng~/s/linux (master)> echo c | sudo tee /proc/sysrq-trigger [ 8.923672] sysrq: Trigger a crash [ 8.923980] Kernel panic - not syncing: sysrq triggered crash [ 8.924183] CPU: 0 UID: 0 PID: 198 Comm: tee Not tainted 6.13.0-virtme #2 [ 8.924632] Call Trace: [ 8.924704] <TASK> [ 8.924783] panic+0x349/0x3b0 [ 8.925055] sysrq_handle_crash+0x36/0x80 [ 8.925181] __handle_sysrq+0xed/0x270 [ 8.925274] write_sysrq_trigger+0x6a/0x90 [ 8.925380] proc_reg_write+0x56/0xa0 [ 8.925489] vfs_write+0x105/0x590 [ 8.925600] ksys_write+0x74/0xf0 [ 8.925682] do_syscall_64+0xbb/0x1d0 [ 8.925767] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 8.925891] RIP: 0033:0x7fdfed54ba84 Signed-off-by: Andrea Righi <[email protected]>
As mentioned in #217 it would be nice to always print the output of critical kernel errors (oops / panic), instead of suppressing all the kernel logs completely by default. Therefore, keep suppressing the boot kernel log, but always dump panic/oops to stderr by default when running in interactive mode. Example with this change applied: arighi@virtme-ng~/s/linux (master)> vng _ _ __ _(_)_ __| |_ _ __ ___ ___ _ __ __ _ \ \ / / | __| __| _ _ \ / _ \_____| _ \ / _ | \ V /| | | | |_| | | | | | __/_____| | | | (_| | \_/ |_|_| \__|_| |_| |_|\___| |_| |_|\__ | |___/ kernel version: 6.13.0-virtme x86_64 (CTRL+d to exit) arighi@virtme-ng~/s/linux (master)> echo c | sudo tee /proc/sysrq-trigger [ 8.923672] sysrq: Trigger a crash [ 8.923980] Kernel panic - not syncing: sysrq triggered crash [ 8.924183] CPU: 0 UID: 0 PID: 198 Comm: tee Not tainted 6.13.0-virtme #2 [ 8.924632] Call Trace: [ 8.924704] <TASK> [ 8.924783] panic+0x349/0x3b0 [ 8.925055] sysrq_handle_crash+0x36/0x80 [ 8.925181] __handle_sysrq+0xed/0x270 [ 8.925274] write_sysrq_trigger+0x6a/0x90 [ 8.925380] proc_reg_write+0x56/0xa0 [ 8.925489] vfs_write+0x105/0x590 [ 8.925600] ksys_write+0x74/0xf0 [ 8.925682] do_syscall_64+0xbb/0x1d0 [ 8.925767] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 8.925891] RIP: 0033:0x7fdfed54ba84 Signed-off-by: Andrea Righi <[email protected]>
As mentioned in #217 it would be nice to always print the output of critical kernel errors (oops / panic), instead of suppressing all the kernel logs completely by default. Therefore, keep suppressing the boot kernel log, but always dump panic/oops to stderr by default when running in interactive mode. Example with this change applied: arighi@virtme-ng~/s/linux (master)> vng _ _ __ _(_)_ __| |_ _ __ ___ ___ _ __ __ _ \ \ / / | __| __| _ _ \ / _ \_____| _ \ / _ | \ V /| | | | |_| | | | | | __/_____| | | | (_| | \_/ |_|_| \__|_| |_| |_|\___| |_| |_|\__ | |___/ kernel version: 6.13.0-virtme x86_64 (CTRL+d to exit) arighi@virtme-ng~/s/linux (master)> echo c | sudo tee /proc/sysrq-trigger [ 8.923672] sysrq: Trigger a crash [ 8.923980] Kernel panic - not syncing: sysrq triggered crash [ 8.924183] CPU: 0 UID: 0 PID: 198 Comm: tee Not tainted 6.13.0-virtme #2 [ 8.924632] Call Trace: [ 8.924704] <TASK> [ 8.924783] panic+0x349/0x3b0 [ 8.925055] sysrq_handle_crash+0x36/0x80 [ 8.925181] __handle_sysrq+0xed/0x270 [ 8.925274] write_sysrq_trigger+0x6a/0x90 [ 8.925380] proc_reg_write+0x56/0xa0 [ 8.925489] vfs_write+0x105/0x590 [ 8.925600] ksys_write+0x74/0xf0 [ 8.925682] do_syscall_64+0xbb/0x1d0 [ 8.925767] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 8.925891] RIP: 0033:0x7fdfed54ba84 Signed-off-by: Andrea Righi <[email protected]>
As mentioned in #217 it would be nice to always print the output of critical kernel errors (oops / panic), instead of suppressing all the kernel logs completely by default. Therefore, keep suppressing the boot kernel log, but always dump panic/oops to stderr by default when running in interactive mode. Example with this change applied: arighi@virtme-ng~/s/linux (master)> vng _ _ __ _(_)_ __| |_ _ __ ___ ___ _ __ __ _ \ \ / / | __| __| _ _ \ / _ \_____| _ \ / _ | \ V /| | | | |_| | | | | | __/_____| | | | (_| | \_/ |_|_| \__|_| |_| |_|\___| |_| |_|\__ | |___/ kernel version: 6.13.0-virtme x86_64 (CTRL+d to exit) arighi@virtme-ng~/s/linux (master)> echo c | sudo tee /proc/sysrq-trigger [ 8.923672] sysrq: Trigger a crash [ 8.923980] Kernel panic - not syncing: sysrq triggered crash [ 8.924183] CPU: 0 UID: 0 PID: 198 Comm: tee Not tainted 6.13.0-virtme #2 [ 8.924632] Call Trace: [ 8.924704] <TASK> [ 8.924783] panic+0x349/0x3b0 [ 8.925055] sysrq_handle_crash+0x36/0x80 [ 8.925181] __handle_sysrq+0xed/0x270 [ 8.925274] write_sysrq_trigger+0x6a/0x90 [ 8.925380] proc_reg_write+0x56/0xa0 [ 8.925489] vfs_write+0x105/0x590 [ 8.925600] ksys_write+0x74/0xf0 [ 8.925682] do_syscall_64+0xbb/0x1d0 [ 8.925767] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 8.925891] RIP: 0033:0x7fdfed54ba84 Signed-off-by: Andrea Righi <[email protected]>
As mentioned in #217 it would be nice to always print the output of critical kernel errors (oops / panic), instead of suppressing all the kernel logs completely by default. Therefore, keep suppressing the boot kernel log, but always dump panic/oops to stderr by default when running in interactive mode. Example with this change applied: arighi@virtme-ng~/s/linux (master)> vng _ _ __ _(_)_ __| |_ _ __ ___ ___ _ __ __ _ \ \ / / | __| __| _ _ \ / _ \_____| _ \ / _ | \ V /| | | | |_| | | | | | __/_____| | | | (_| | \_/ |_|_| \__|_| |_| |_|\___| |_| |_|\__ | |___/ kernel version: 6.13.0-virtme x86_64 (CTRL+d to exit) arighi@virtme-ng~/s/linux (master)> echo c | sudo tee /proc/sysrq-trigger [ 8.923672] sysrq: Trigger a crash [ 8.923980] Kernel panic - not syncing: sysrq triggered crash [ 8.924183] CPU: 0 UID: 0 PID: 198 Comm: tee Not tainted 6.13.0-virtme #2 [ 8.924632] Call Trace: [ 8.924704] <TASK> [ 8.924783] panic+0x349/0x3b0 [ 8.925055] sysrq_handle_crash+0x36/0x80 [ 8.925181] __handle_sysrq+0xed/0x270 [ 8.925274] write_sysrq_trigger+0x6a/0x90 [ 8.925380] proc_reg_write+0x56/0xa0 [ 8.925489] vfs_write+0x105/0x590 [ 8.925600] ksys_write+0x74/0xf0 [ 8.925682] do_syscall_64+0xbb/0x1d0 [ 8.925767] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 8.925891] RIP: 0033:0x7fdfed54ba84 Signed-off-by: Andrea Righi <[email protected]>
I have a system failing like
[ 2.073575] Kernel panic - not syncing: Attempted to kill init! exitcode=0x00007f00
.I can see this if I pass
--verbose
, but if I just runvng
, I get no error messages.My initial feeling was that the kernel console should be included in the default output regardless of
--verbose
but I suspect there's a good reason why it isn't.Another idea I had would be to combine the kernel's
panic=-1
with QEMU's-no-reboot
. But then that breaks the usecase of people who genuinely want to reboot (is that a valid usecase? I guess so?).Basically, I think the ideal behaviour is that if the kernel panics before we hit
virtme-init
, we spit out the console and exit with an error.So... any ideas?
The text was updated successfully, but these errors were encountered: