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

Kernel panic on ARM64: "Requested init virtme-init failed (error -8)" #233

Closed
visitorckw opened this issue Feb 8, 2025 · 3 comments
Closed

Comments

@visitorckw
Copy link

Kernel panics when running virtme-ng to test an ARM64 Linux kernel on an x86-64 host. The issue occurs when virtme-init fails to execute with error -8, leading to a kernel panic.

Steps to reproduce

  1. Build the ARM64 kernel:
    vng --build --arch arm64
  2. Run the virtual machine:
    vng --arch arm64 --cpus 8

Observed behavior

Boot fails with the following panic message:

[    0.657709] Kernel panic - not syncing: Requested init /home/visitorckw/.local/lib/python3.10/site-packages/virtme/guest/virtme-init failed (error -8).
[    0.658725] CPU: 6 UID: 0 PID: 1 Comm: swapper/0 Not tainted 6.14.0-rc1-virtme #1
[    0.658863] Hardware name: linux,dummy-virt (DT)
[    0.659045] Call trace:
[    0.659204]  show_stack+0x18/0x24 (C)
[    0.659601]  dump_stack_lvl+0x38/0x90
[    0.659700]  dump_stack+0x18/0x24
[    0.659745]  panic+0x388/0x3e0
[    0.659801]  kernel_init+0xd0/0x1dc
[    0.659848]  ret_from_fork+0x10/0x20
[    0.660111] SMP: stopping secondary CPUs
[    0.660588] Kernel Offset: 0x346f67600000 from 0xffff800080000000
[    0.660649] PHYS_OFFSET: 0xfff0f4b080000000
[    0.660688] CPU features: 0x108,0002013c,00800000,0200420b
[    0.660743] Memory Limit: none
[    0.660978] ---[ end Kernel panic - not syncing: Requested init /home/visitorckw/.local/lib/python3.10/site-packages/virtme/guest/virtme-init failed (error -8). ]---

System information

  • Host architecture: x86-64
  • Target architecture: ARM64
  • Kernel version: 6.14.0-rc1
  • virtme-ng version: virtme-ng 1.32+137.g2dcde98
  • QEMU version: QEMU emulator version 6.2.0 (Debian 1:6.2+dfsg-2ubuntu6.24)
@matttbe
Copy link
Collaborator

matttbe commented Feb 8, 2025

Hello,

Do you have the same issue when using --no-virtme-ng-init?
Do you know if the init program has been compiled for the right architecture? (When looking at the location, I guess no)

Also, typically when building for a different architecture, the --root option has to be specified not to use the file system of the host containing binaries built for the host architecture, not the targeted one.

@visitorckw
Copy link
Author

Not providing the --root option was my oversight. After adding --root, it works successfully. Thanks!

matttbe added a commit to matttbe/virtme-ng that referenced this issue Feb 9, 2025
Because it doesn't make sense to run on a different architecture, but
with the host's root FS.

Print a warning, not to block weird use-cases, or if the same arch as
the host is passed to --arch.

Link: arighi#233
Signed-off-by: Matthieu Baerts (NGI0) <[email protected]>
matttbe added a commit to matttbe/virtme-ng that referenced this issue Feb 10, 2025
Because it doesn't make sense to run on a different architecture, but
with the host's root FS.

Hopefully this is not going to block weird use-cases.

Link: arighi#233
Signed-off-by: Matthieu Baerts (NGI0) <[email protected]>
@matttbe
Copy link
Collaborator

matttbe commented Feb 12, 2025

Not providing the --root option was my oversight. After adding --root, it works successfully. Thanks!

#234 should then hopefully help to prevent future issues!

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

2 participants