Giter Site home page Giter Site logo

VM hangs at boot about ubicloud HOT 4 CLOSED

ubicloud avatar ubicloud commented on May 13, 2024
VM hangs at boot

from ubicloud.

Comments (4)

pykello avatar pykello commented on May 13, 2024

Code references

Building with guest debug

General build instructions: building.md

$ cargo build --release --target=x86_64-unknown-linux-musl --all --features guest_debug
$ cargo build --target=x86_64-unknown-linux-musl --all --features guest_debug

Core dump

sudo ~/projects/cloud-hypervisor/target/x86_64-unknown-linux-musl/debug/ch-remote \
   --api-socket /tmp/ch.sock coredump file:///tmp/coredump

/opt/cloud-hypervisor/v31.0/ch-remote --api-socket /vm/vmvmhxf8/ch-api.sock pause

/opt/cloud-hypervisor/v31.0/ch-remote --api-socket /vm/vmvmhxf8/ch-api.sock coredump file:///tmp/vmvmhxf8.coredump

Crash Utility

mnt/usr/src/linux-headers-5.15.0-86/scripts/extract-vmlinux mnt/boot/vmlinuz > /tmp/vmlinux
crash /tmp/vmlinux /tmp/vmvmhxf8.coredump

...
crash: /tmp/vmlinux: no .gnu_debuglink section

Debug symbols

Installing: https://hadibrais.wordpress.com/2017/03/13/installing-ubuntu-kernel-debugging-symbols/

apt install linux-image-5.15.0-86-generic-dbgsym
crash /usr/lib/debug/boot/vmlinux-5.15.0-86-generic /tmp/vmvmhxf8.coredump

from ubicloud.

pykello avatar pykello commented on May 13, 2024

Linux kernel code that prints the expected message:

https://github.com/torvalds/linux/blob/d2f51b3516dade79269ff45eae2a7668ae711b25/arch/x86/kernel/smpboot.c#L1231-L1232

        pr_info("CPU0: ");
        print_cpu_info(&cpu_data(0));

https://stackoverflow.com/questions/60803129/kernel-debugging-vmlinux-gdb-py-fails-to-run-on-gdb

git clone --branch v5.15 --depth 1 https://github.com/torvalds/linux
cd linux
make oldconfig
make scripts_gdb
sudo apt install linux-image-5.15.0-83-generic-dbgsym

sudo gdb -q

(gdb) add-auto-load-safe-path ~/projects/linux/
(gdb) souce vmlinux-gdb.py
(gdb) target remote /tmp/gdb.sock
(gdb) c

https://www.kernel.org/doc/html/latest/dev-tools/gdb-kernel-debugging.html
https://wiki.ubuntu.com/DebuggingKernelWithQEMU
cloud-hypervisor/cloud-hypervisor#3213
https://mhcerri.github.io/posts/debugging-the-ubuntu-kernel-with-gdb-and-qemu/

from ubicloud.

pykello avatar pykello commented on May 13, 2024
sudo apt install linux-image-6.2.0-1014-azure-dbgsym

from ubicloud.

fdr avatar fdr commented on May 13, 2024

Ah, we forgot to close this, but it was indeed https://gitlab.com/qemu-project/qemu/-/issues/1696, and identifying that the default kernel shipped on the GitHub Action image does not have that kernel patch applied, I inspected the Azure 6.5 variant package of the kernel, found that the tick patch was applied, we tried it, and the problem went away.

from ubicloud.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.