Merge crash 8.0.3+ds1-3 into Noble

Bug #2042357 reported by Mauricio Faria de Oliveira
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
crash (Debian)
Fix Released
Unknown
crash (Ubuntu)
Fix Released
Medium
Mauricio Faria de Oliveira

Bug Description

Merge Request / git-ubuntu:

https://code.launchpad.net/~mfo/ubuntu/+source/crash/+git/crash/+merge/455353

Test packages:

ppa:mfo/noble-crash-v2

...

Versions:

$ rmadison -a source crash | grep noble
 crash | 8.0.2-1ubuntu1 | noble | source

$ rmadison -a source crash -u debian | grep 'unstable '
crash | 8.0.2-1 | unstable | source
crash | 8.0.3+ds1-3 | unstable | source

...

Debian bugs:

https://bugs.debian.org/1054805
Please update crash to 8.0.3

https://bugs.debian.org/1055117
FTBFS: crash 8.0.3-1 is missing gdb-10.2.tar.gz

...

Docs:
https://github.com/canonical/ubuntu-maintainers-handbook/blob/main/PackageMerging.md

Related branches

Changed in crash (Ubuntu):
status: New → Incomplete
status: Incomplete → In Progress
importance: Undecided → Medium
assignee: nobody → Mauricio Faria de Oliveira (mfo)
description: updated
no longer affects: crash
Changed in crash (Debian):
status: Unknown → New
Revision history for this message
Mauricio Faria de Oliveira (mfo) wrote :

The package built successfully in a PPA with all supported architectures (!riscv64).
Now waiting on the Debian issue with the gdb-10.2.tar.gz tarball to be addressed.

Test build in ppa:mfo/noble-crash,

```
crash (8.0.3-1ubuntu1+gdb102targz.2) noble; urgency=medium

  * Merge with Debian unstable. Remaining changes: (LP: #2042357)
    - d/t/live: If the "live" autopkgtest fails with a recommendation
      to try /proc/kcore instead of the default, attempt that before
      failing the test. [7.2.6-1ubuntu1]
    - d/t/live: Fix logic issue in "live" autopkgtest introduced in
       the last upload. [7.2.6-1ubuntu2]
    - d/t/live: Fix test, as if will return 0 when no cases were true.
      [7.2.8-1ubuntu1]
    - d/t/control: Add linux-libc-dev dependency for the autopkg test.
      This package gets usually broken with kernel upgrades, so let it
      already show in the autopkg test. [7.2.9-2ubuntu3]
    - d/t/control: Run autopkg test with allow-stderr. [8.0.0-1ubuntu1]
  * Dropped changes:
    - Build without lto. Fails to build gdb on ppc64el. That should be
      fixed, once gdb is updated to a more recent version (e.g. 10.x).
      [7.2.9-2ubuntu2]
  * Added changes:
    - d/p/0002-Fix-compilation-error-due-to-new-strlcpy-function.patch:
      Fix FTBFS due to strlcpy() introduced in glibc 2.38.

crash (8.0.3-1) unstable; urgency=medium

  * New upstream (Closes: #1054805)
  * https://github.com/crash-utility/crash/compare/8.0.2...8.0.3

 -- Mauricio Faria de Oliveira <email address hidden> Tue, 31 Oct 2023 14:09:03 -0300
```

description: updated
description: updated
Revision history for this message
Mauricio Faria de Oliveira (mfo) wrote :

Debian crash 8.0.3+ds1-3 [1] addressed the gdb tarball issue.

I'll update the merge, and proceed with build and tests.

[1] https://tracker.debian.org/news/1475695/accepted-crash-803ds1-3-source-into-unstable/

description: updated
Changed in crash (Debian):
status: New → Fix Released
Revision history for this message
Mauricio Faria de Oliveira (mfo) wrote :

Merged with Debian (8.0.3+ds1-3), now building (ppa:mfo/crash-noble).

summary: - Merge crash 8.0.3 into Noble
+ Merge crash 8.0.3+ds1-3 into Noble
description: updated
description: updated
description: updated
Revision history for this message
Mauricio Faria de Oliveira (mfo) wrote :

The package built successfully in all architectures (amd64, arm64, armhf, ppc64el, s390x).

The PPA does not have riscv64 enabled, but it crash/riscv64 FTBFS in mantic-release,
which is in noble now, so even if it fails, it is not a regression from latest state.

Revision history for this message
Mauricio Faria de Oliveira (mfo) wrote :

Testing on amd64, arm64, armhf, ppc64el, and s390x with QEMU VMs.

Revision history for this message
Mauricio Faria de Oliveira (mfo) wrote :

Upstream patch 'Support-module-memory-layout-change-on-Linux-6.4'
is required to crash to open a 6.5 kernel crashdump on Noble too.

# crash ./usr/lib/debug/boot/vmlinux-*-generic /var/crash/*/dump.*
...
crash: invalid structure member offset: module_core_size
       FILE: kernel.c LINE: 3781 FUNCTION: module_init()

Revision history for this message
Mauricio Faria de Oliveira (mfo) wrote :

The test packages in `ppa:mfo/noble-crash-v2` have worked well
(ie, crash can actually start, and is able to get a backtrace)
in amd64, arm64, ppc64el, and s390x (armhf couldn't even kexec).

This is a lot better than the current state (crash quits early)
in all these architectures, so I will move forward and propose
the merge request patchset.

Test logs/commands for each arch follow in the next comments.

Revision history for this message
Mauricio Faria de Oliveira (mfo) wrote :
Download full text (3.8 KiB)

amd64
-----

vm

 lxc launch --vm -c limits.cpu=2 -c limits.memory=2GiB ubuntu-daily:noble noble-vm
 lxc shell noble-vm

 # uname -rv
 6.5.0-9-generic #9-Ubuntu SMP PREEMPT_DYNAMIC Sat Oct 7 01:35:40 UTC 2023

kdump-tools

 sudo apt update && apt install -y linux-crashdump # No, Yes
 sudo sed 's/crashkernel=[^" ]\+/crashkernel=512M/' -i /etc/default/grub.d/kdump-tools.cfg
 sudo update-grub && sudo reboot

 ...

 # dmesg | grep 'crashkernel.*RAM'
 [ 0.018756] Reserving 512MB of memory at 816MB for crashkernel (System RAM: 2043MB)

 # kdump-config status
 current state : ready to kdump

crashdump

 # echo c >/proc/sysrq-trigger

 ...

 # find /var/crash/
 /var/crash/
 /var/crash/kdump_lock
 /var/crash/kexec_cmd
 /var/crash/202311081257
 /var/crash/202311081257/dmesg.202311081257
 /var/crash/202311081257/dump.202311081257
 /var/crash/linux-image-6.5.0-9-generic-202311081257.crash

debug symbols

 dpkg -l | awk '$2 ~ /linux-image-[0-9.-]+-generic/ { print $2, $3}' \
   | while read pkg version; do \
       dbgpkg="linux-image-unsigned-${pkg#linux-image-}-dbgsym"; \
       arch=$(dpkg --print-architecture); \
       wget "https://launchpad.net/ubuntu/+archive/primary/+files/${dbgpkg}_${version}_${arch}.ddeb"; \
     done

 ar p linux-image-unsigned-*-dbgsym_*.ddeb data.tar.xz | tar xJ --wildcards './usr/lib/debug/boot/vmlinux-*-generic'

crash (old)

 # dpkg -s crash | grep Version:
 Version: 8.0.2-1ubuntu1

 # crash ./usr/lib/debug/boot/vmlinux-*-generic /var/crash/*/dump.*
 ...
 crash: invalid structure member offset: module_core_size
        FILE: kernel.c LINE: 3781 FUNCTION: module_init()

 [/usr/bin/crash] error trace: 558bf515829f => 558bf4dd7efc => 558bf4e64bff => 558bf4eef301

crash (new)

 sudo add-apt-repository -y ppa:mfo/noble-crash-v2 && sudo apt install -y crash

 # crash ./usr/lib/debug/boot/vmlinux-*-generic /var/crash/*/dump.*
 ...
 please wait... (determining panic task)
 WARNING: active task ffff93c084ed0000 on cpu 0 not found in PID hash

       KERNEL: ./usr/lib/debug/boot/vmlinux-6.5.0-9-generic
     DUMPFILE: /var/crash/202311081257/dump.202311081257 [PARTIAL DUMP]
  CPUS: 2
  DATE: Wed Nov 8 12:57:51 UTC 2023
       UPTIME: 00:01:42
 LOAD AVERAGE: 0.28, 0.18, 0.07
        TASKS: 3
     NODENAME: noble-vm
      RELEASE: 6.5.0-9-generic
      VERSION: #9-Ubuntu SMP PREEMPT_DYNAMIC Sat Oct 7 01:35:40 UTC 2023
      MACHINE: x86_64 (2495 Mhz)
       MEMORY: 2 GB
        PANIC: "Kernel panic - not syncing: sysrq triggered crash"
   PID: 4488
      COMMAND: "bash"
  TASK: ffff93c084ed0000 [THREAD_INFO: ffff93c084ed0000]
   CPU: 0
        STATE: TASK_RUNNING (PANIC)

 crash> bt
 PID: 4488 TASK: ffff93c084ed0000 CPU: 0 COMMAND: "bash"
  #0 [ffffa9c500d0bb38] machine_kexec at ffffffff9dcafa3b
  #1 [ffffa9c500d0bb98] __crash_kexec at ffffffff9de133f3
  #2 [ffffa9c500d0bc60] panic at ffffffff9dcf60e4
  #3 [ffffa9c500d0bce0] sysrq_handle_crash at ffffffff9e6a4b5a
  #4 [ffffa9c500d0bcf0] __handle_sysrq at ffffffff9e6a52e3
  #5 [ffffa9c500d0bd38] write_sysrq_trigger at ffffffff9e6a5b28
  #6 [ffffa9c500d0bd50] proc_reg_write at ffffffff9e1691b9
  #7 [ffffa9c500d0bd70] vfs_write at ffffffff9e0af87f
  #8 [ffffa9c500d0...

Read more...

Revision history for this message
Mauricio Faria de Oliveira (mfo) wrote :

common for arm64, ppc64el, s390x, armhf:
---

cloud-init data iso:

 echo 'local-hostname: test' >meta-data

 PUBKEY=$(cat $HOME/.ssh/id_rsa.pub)

 cat <<EOF >user-data
 #cloud-config
 users:
   - name: ubuntu
     ssh-authorized-keys: ["$PUBKEY"]
     sudo: ['ALL=(ALL) NOPASSWD:ALL']
     groups: sudo
     shell: /bin/bash
 runcmd:
    - echo 'AllowUsers ubuntu' >>/etc/ssh/sshd_config
    - restart ssh
 EOF

 genisoimage -output test-cidata.iso -volid cidata -joliet -rock user-data meta-data

Revision history for this message
Mauricio Faria de Oliveira (mfo) wrote :
Download full text (4.9 KiB)

arm64
-----

vm

 SERIES=noble
 ARCH=arm64
 DISK=${SERIES}_${ARCH}.qcow2

 wget https://cloud-images.ubuntu.com/$SERIES/current/${SERIES}-server-cloudimg-${ARCH}.img
 qemu-img create -F qcow2 -b ${SERIES}-server-cloudimg-${ARCH}.img -f qcow2 $DISK 8G

 sudo apt install -y qemu-system-arm qemu-efi

 dd if=/dev/zero of=flash1.img bs=1M count=64
 dd if=/dev/zero of=flash0.img bs=1M count=64
 dd if=/usr/share/qemu-efi/QEMU_EFI.fd of=flash0.img conv=notrunc

 qemu-system-aarch64 \
 -machine virt -cpu cortex-a57 \
 -pflash flash0.img -pflash flash1.img \
 \
 -smp cpus=2 -m 2048 \
 -nodefaults -no-user-config \
 -nographic -serial stdio \
 \
 -drive file=$DISK,if=none,id=drive0 \
 -device virtio-blk-device,drive=drive0 \
 \
 -drive file=test-cidata.iso,media=cdrom \
 \
 -netdev user,hostfwd=::22222-:22,id=net0 \
 -device virtio-net-device,netdev=net0

 $ ssh ubuntu@127.0.0.1 -p 22222

 $ lsb_release -cs
 No LSB modules are available.
 noble

 $ uname -m
 aarch64

 $ uname -rv
 6.5.0-9-generic #9-Ubuntu SMP PREEMPT_DYNAMIC Fri Oct 6 20:34:49 UTC 2023

kdump-tools

 sudo apt update && sudo apt install -y linux-crashdump # No, Yes
 sudo sed 's/crashkernel=[^" ]\+/crashkernel=512M/' -i /etc/default/grub.d/kdump-tools.cfg
 sudo update-grub && sudo reboot

 $ sudo dmesg | grep 'crashkernel reserved:'
 [ 0.000000] crashkernel reserved: 0x0000000091600000 - 0x00000000b1600000 (512 MB)

 $ sudo kdump-config status
  * Invalid symlink : /var/lib/kdump/initrd.img
  * Invalid symlink : /var/lib/kdump/vmlinuz
 current state : Not ready to kdump

 $ sudo kdump-config reload
  * unloaded kdump kernel
  * Creating symlink /var/lib/kdump/vmlinuz
 kdump-tools: Generating /var/lib/kdump/initrd.img-6.5.0-9-generic
  * Creating symlink /var/lib/kdump/initrd.img
  * loaded kdump kernel

 $ sudo kdump-config status
 current state : ready to kdump

crashdump

 $ echo c | sudo tee /proc/sysrq-trigger

 $ find /var/crash
 /var/crash
 /var/crash/202311081722
 /var/crash/202311081722/dmesg.202311081722
 /var/crash/202311081722/dump.202311081722
 /var/crash/kexec_cmd
 /var/crash/kdump_lock
 /var/crash/linux-image-6.5.0-9-generic-202311081722.crash

debug symbols

 dpkg -l | awk '$2 ~ /linux-image-[0-9.-]+-generic/ { print $2, $3}' \
   | while read pkg version; do \
       dbgpkg="linux-image-unsigned-${pkg#linux-image-}-dbgsym"; \
       arch=$(dpkg --print-architecture); \
       wget "https://launchpad.net/ubuntu/+archive/primary/+files/${dbgpkg}_${version}_${arch}.ddeb"; \
     done

 ar p linux-image-unsigned-*-dbgsym_*.ddeb data.tar.xz | tar xJ --wildcards './usr/lib/debug/boot/vmlinux-*-generic'

crash (old)

 $ dpkg -s crash | grep Version:
 Version: 8.0.2-1ubuntu1

 $ crash ./usr/lib/debug/boot/vmlinux-*-generic /var/crash/*/dump.*
 ...
 crash: invalid structure member offset: module_core_size
        FILE: kernel.c LINE: 3781 FUNCTION: module_init()

 [/usr/bin/crash] error trace: aaaac5c23f9c => aaaac58f2f84 => aaaac5974d3c => aaaac59e7330

crash (new)

 sudo add-apt-repository -y ppa:mfo/noble-crash-v2 && sudo apt install -y crash

 $ dpkg -s crash | grep Version:
 Version: 8.0.3+ds1-3ubuntu1

 $ crash ./usr/lib/debug/boot/vmlinux-*-generic /var/crash/*/...

Read more...

Revision history for this message
Mauricio Faria de Oliveira (mfo) wrote :
Download full text (4.4 KiB)

ppc64el
-------

vm

 SERIES=noble
 ARCH=ppc64el
 DISK=${SERIES}_${ARCH}.qcow2

 wget https://cloud-images.ubuntu.com/$SERIES/current/${SERIES}-server-cloudimg-${ARCH}.img
 qemu-img create -F qcow2 -b ${SERIES}-server-cloudimg-${ARCH}.img -f qcow2 $DISK 8G

 sudo apt install -y qemu-system-ppc

 qemu-system-ppc64 \
   -machine pseries -cpu POWER9 \
 \
 -smp cpus=2 -m 2048 \
 -nodefaults -no-user-config \
 -nographic -serial stdio \
 \
 -drive file=$DISK,if=none,id=drive0 \
 -device virtio-blk,drive=drive0 \
 \
 -drive file=test-cidata.iso,media=cdrom \
 \
 -netdev user,hostfwd=::22223-:22,id=net0 \
 -device virtio-net,netdev=net0

 $ ssh ubuntu@127.0.0.1 -p 22223

 $ lsb_release -cs
 No LSB modules are available.
 noble

 $ uname -m
 ppc64le

 $ uname -rv
 6.5.0-9-generic #9-Ubuntu SMP Fri Oct 6 20:21:54 UTC 2023

kdump-tools

 sudo apt update && sudo apt install -y linux-crashdump # No, Yes
 sudo sed 's/crashkernel=[^" ]\+/crashkernel=512M/' -i /etc/default/grub.d/kdump-tools.cfg
 sudo update-grub && sudo reboot

 ...

 $ sudo dmesg | grep 'crashkernel.*RAM'
 [ 0.000000] Reserving 512MB of memory at 512MB for crashkernel (System RAM: 2048MB)

 $ sudo kdump-config status
 current state : ready to kdump

crashdump

 $ echo c | sudo tee /proc/sysrq-trigger

 $ find /var/crash
 /var/crash
 /var/crash/kexec_cmd
 /var/crash/linux-image-6.5.0-9-generic-202311081556.crash
 /var/crash/_usr_bin_mandb.6.crash
 /var/crash/202311081556
 /var/crash/202311081556/dump.202311081556
 /var/crash/202311081556/dmesg.202311081556
 /var/crash/kdump_lock

debug symbols

 dpkg -l | awk '$2 ~ /linux-image-[0-9.-]+-generic/ { print $2, $3}' \
   | while read pkg version; do \
       dbgpkg="${pkg}-dbgsym"; \
       arch=$(dpkg --print-architecture); \
       wget "https://launchpad.net/ubuntu/+archive/primary/+files/${dbgpkg}_${version}_${arch}.ddeb"; \
     done

 ar p linux-image-*-dbgsym_*.ddeb data.tar.xz | tar xJ --wildcards './usr/lib/debug/boot/vmlinux-*-generic'

crash (old)

 # dpkg -s crash | grep Version:
 Version: 8.0.2-1ubuntu1

 # crash ./usr/lib/debug/boot/vmlinux-*-generic /var/crash/*/dump.*
 ...
 crash: invalid structure member offset: module_core_size
        FILE: kernel.c LINE: 3781 FUNCTION: module_init()

 [/usr/bin/crash] error trace: 122094283e0 => 12208f5f830 => 12209018148 => 122090b1ce0

crash (new)

 sudo add-apt-repository -y ppa:mfo/noble-crash-v2 && sudo apt install -y crash

 $ dpkg -s crash | grep Version:
 Version: 8.0.3+ds1-3ubuntu1

 # crash ./usr/lib/debug/boot/vmlinux-*-generic /var/crash/*/dump.*
 ...
 WARNING: active task c00000000a233200 on cpu 1 not found in PID hash

       KERNEL: ./usr/lib/debug/boot/vmlinux-6.5.0-9-generic
     DUMPFILE: /var/crash/202311081556/dump.202311081556 [PARTIAL DUMP]
  CPUS: 2
  DATE: Wed Nov 8 15:50:40 UTC 2023
       UPTIME: 00:23:57
 LOAD AVERAGE: 0.48, 1.10, 1.68
        TASKS: 3
     NODENAME: test
      RELEASE: 6.5.0-9-generic
      VERSION: #9-Ubuntu SMP Fri Oct 6 20:21:54 UTC 2023
      MACHINE: ppc64le (1000 Mhz)
       MEMORY: 2 GB
        PANIC: "Kernel panic - not syncing: sysrq triggered crash"
   PID: 4548
      COMMAND: "tee"
  TASK: c00000000a233200 [THREAD_INFO:...

Read more...

Revision history for this message
Mauricio Faria de Oliveira (mfo) wrote :
Download full text (3.4 KiB)

s390x
-----

vm

 sudo apt install -y qemu-system-s390x

 qemu-system-s390x \
   -machine s390-ccw-virtio -cpu qemu \
 \
 -smp cpus=2 -m 2048 \
 -nodefaults -no-user-config \
 -nographic -serial stdio \
 \
 -drive file=$DISK,if=none,id=drive0 \
 -device virtio-blk,drive=drive0 \
 \
 -drive file=test-cidata.iso,media=cdrom \
 \
 -netdev user,hostfwd=::22224-:22,id=net0 \
 -device virtio-net,netdev=net0

 $ ssh ubuntu@127.0.0.1 -p 22224

 $ lsb_release -cs
 No LSB modules are available.
 noble

 $ uname -m
 s390x

 $ uname -rv
 6.5.0-9-generic #9-Ubuntu SMP Fri Oct 6 19:43:35 UTC 2023

kdump-tools

 sudo apt update && sudo apt install -y linux-crashdump # No, Yes
 sudo sed '/^parameters =/ s/$/ crashkernel=512M/' -i /etc/zipl.conf
 sudo zipl && sudo reboot

 $ sudo dmesg | grep 'crashkernel.*RAM'
 [ 26.793337] setup: Reserving 512MB of memory at 1510MB for crashkernel (System RAM: 1536MB)

 $ sudo kdump-config status
 current state : ready to kdump

crashdump

 $ echo c | sudo tee /proc/sysrq-trigger

 $ find /var/crash
 /var/crash
 /var/crash/linux-image-6.5.0-9-generic-202311081631.crash
 /var/crash/202311081631
 /var/crash/202311081631/dump.202311081631
 /var/crash/202311081631/dmesg.202311081631
 /var/crash/kexec_cmd
 /var/crash/kdump_lock

debug symbols

 dpkg -l | awk '$2 ~ /linux-image-[0-9.-]+-generic/ { print $2, $3}' \
   | while read pkg version; do \
       dbgpkg="linux-image-unsigned-${pkg#linux-image-}-dbgsym"; \
       arch=$(dpkg --print-architecture); \
       wget "https://launchpad.net/ubuntu/+archive/primary/+files/${dbgpkg}_${version}_${arch}.ddeb"; \
     done

 ar p linux-image-unsigned-*-dbgsym_*.ddeb data.tar.xz | tar xJ --wildcards './usr/lib/debug/boot/vmlinux-*-generic'

crash (old)

 # dpkg -s crash | grep Version:
 Version: 8.0.2-1ubuntu1

 # crash ./usr/lib/debug/boot/vmlinux-*-generic /var/crash/*/dump.*
 crash: invalid structure member offset: module_core_size
        FILE: kernel.c LINE: 3781 FUNCTION: module_init()

 [/usr/bin/crash] error trace: 2aa1be60c84 => 2aa1bb029f2 => 2aa1bb951b2 => 2aa1bc0d668

crash (new)

 sudo add-apt-repository -y ppa:mfo/noble-crash-v2 && sudo apt install -y crash

 # dpkg -s crash | grep Version:
 Version: 8.0.3+ds1-3ubuntu1

 $ crash ./usr/lib/debug/boot/vmlinux-*-generic /var/crash/*/dump.*
 ...
 WARNING: active task 3833600 on cpu 1 not found in PID hash

       KERNEL: ./usr/lib/debug/boot/vmlinux-6.5.0-9-generic
     DUMPFILE: /var/crash/202311081631/dump.202311081631 [PARTIAL DUMP]
  CPUS: 2
  DATE: Wed Nov 8 16:22:13 UTC 2023
       UPTIME: 00:23:37
 LOAD AVERAGE: 0.02, 0.57, 1.58
        TASKS: 3
     NODENAME: test
      RELEASE: 6.5.0-9-generic
      VERSION: #9-Ubuntu SMP Fri Oct 6 19:43:35 UTC 2023
      MACHINE: s390x (unknown Mhz)
       MEMORY: 2 GB
        PANIC: "Kernel panic - not syncing: sysrq triggered crash"
   PID: 4610
      COMMAND: "tee"
  TASK: 3833600 [THREAD_INFO: 3833600]
   CPU: 1
        STATE: TASK_RUNNING (PANIC)

 crash> bt
 ...
  #0 [380002179a8] smp_call_ipl_cpu at 11e2fe
  #1 [380002179c8] __crash_kexec at 2adfaa
  #2 [38000217ac0] panic at 1a8208
  #3 [38000217b68] sysrq_reset_seq_param_set at a3f860
  #4 [38000217b80] __handle...

Read more...

Revision history for this message
Mauricio Faria de Oliveira (mfo) wrote :
Download full text (10.3 KiB)

armhf
(fails to kexec to the crash kernel, anyway, for doc purposes)
-----

vm

 sudo modprobe nbd
 sudo qemu-nbd -c /dev/nbd0 noble-server-cloudimg-armhf.img
 mkdir mnt
 sudo mount /dev/nbd0p16 mnt

 sudo cp mnt/vmlinuz-*-generic mnt/initrd.img-*-generic .
 sudo chown $USER vmlinuz-*-generic initrd.img-*-generic

 sudo umount mnt
 sudo qemu-nbd -d /dev/nbd0
 sudo modprobe -r nbd

 qemu-system-arm \
 -machine virt -cpu cortex-a15 \
 \
 -kernel vmlinuz-*-generic \
 -initrd initrd.img-*-generic \
 -append 'root=LABEL=cloudimg-rootfs crashkernel=512M' \
 \
 -smp cpus=2 -m 2048 \
 -nodefaults -no-user-config \
 -nographic -serial stdio \
 \
 -drive file=$DISK,if=none,id=drive0 \
 -device virtio-blk,drive=drive0 \
 \
 -drive file=test-cidata.iso,media=cdrom \
 \
 -netdev user,hostfwd=::22225-:22,id=net0 \
 -device virtio-net,netdev=net0

 $ ssh ubuntu@127.0.0.1 -p 22225

 $ lsb_release -cs
 No LSB modules are available.
 noble

 $ uname -m
 armv7l

 $ uname -rv
 6.5.0-9-generic #9-Ubuntu SMP Fri Oct 6 23:14:49 UTC 2023

kdump-tools

 sudo apt update && sudo apt install -y linux-crashdump # No, Yes
 # kernel cmdline parameter crashkernel=512M already in qemu cmdline
 sudo reboot

 $ sudo dmesg | grep 'crashkernel'
 [ 0.000000] crashkernel reservation failed - No suitable area found.

 $ sudo cat /proc/iomem
 ...
 40000000-bfffffff : System RAM
   40308000-41dfffff : Kernel code
   42000000-4230ff8f : Kernel data

 $ echo $(( 0x40000000 / 1024**2))
 1024

 $ echo $(( (0xbfffffff + 1) / 1024 ** 2 ))
 3072

 Try at 2G address, i.e., crashkernel=512M@2G

 $ sudo dmesg | grep crashkernel
 [ 0.000000] Reserving 512MB of memory at 2048MB for crashkernel (System RAM: 768MB)
 [ 0.000000] Kernel command line: root=LABEL=cloudimg-rootfs crashkernel=512M@2G

 $ sudo kdump-config status
 current state : ready to kdump

crashdump

 The VM never comes back from the kexec to the crashkernel;
 apparently it fails/oops and the panic kernel/crashkernel hits a kernel panic too! :)

 $ echo c | sudo tee /proc/sysrq-trigger

 [ 535.253829] sysrq: Trigger a crash
 [ 535.254672] Kernel panic - not syncing: sysrq triggered crash
 [ 535.255473] CPU: 0 PID: 1044 Comm: tee Kdump: loaded Not tainted 6.5.0-9-generic #9-Ubuntu
 [ 535.255995] Hardware name: Generic DT based system
 [ 535.256568] Backtrace:
 [ 535.257928] dump_backtrace from show_stack+0x20/0x38
 [ 535.259183] r7:00000000 r6:00000000 r5:600d0093 r4:c1ab26a0
 [ 535.259711] show_stack from dump_stack_lvl+0x48/0x68
 [ 535.260137] dump_stack_lvl from dump_stack+0x18/0x28
 [ 535.260422] r5:c2278a39 r4:c2278a24
 [ 535.260801] dump_stack from panic+0x140/0x394
 [ 535.261081] panic from sysrq_reset_seq_param_set+0x0/0xac
 [ 535.261374] r3:c0df9ec4 r2:00000000 r1:00000000 r0:c1b774c8
 [ 535.261607] r7:00000000
 [ 535.261741] sysrq_handle_crash from __handle_sysrq+0xc0/0x274
 [ 535.262006] __handle_sysrq from write_sysrq_trigger+0x38/0x64
 [ 535.262311] r10:f0c9df68 r9:00000002 r8:bed97404 r7:c4b81cc0 r6:00000000 r5:c0dfb488
 [ 535.262633] r4:00000002
 [ 535.262764] write_sysrq_trigger from proc_reg_write+0xcc/0x104
 [ 535.263033] r5:c0dfb488 r4:c2dcfb80
 [ 535.263192] pr...

description: updated
description: updated
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package crash - 8.0.3+ds1-3ubuntu1

---------------
crash (8.0.3+ds1-3ubuntu1) noble; urgency=medium

  * Merge with Debian unstable. Remaining changes: (LP: #2042357)
    - d/t/live: If the "live" autopkgtest fails with a recommendation to
      try /proc/kcore instead of the default, attempt that before
      failing the test. LP 1858958.
    - d/t/live: Fix logic issue in "live" autopkgtest introduced in the
      last upload.
    - d/t/live: Fix test, as if will return 0 when no cases were true.
    - d/t/control: Add linux-libc-dev dependency for the autopkg test.
      This package gets usually broken with kernel upgrades, so let it
      already show in the autopkg test.
    - d/t/control: Run autopkg test with allow-stderr.
  * Drop changes:
    - d/rules: Build without lto. Fails to build gdb on ppc64el. That
      should be fixed, once gdb is updated to a more recent version
      (e.g. 10.x). [This line is already commented out since Mantic.]
  * New changes:
    - d/p/0002-Fix-compilation-error-due-to-new-strlcpy-function.patch:
      Fix FTBFS due to strlcpy() introduced in glibc 2.38.
    - d/p/0003-Support-module-memory-layout-change-on-Linux-6.4.patch:
      Fix fatal 'crash: invalid structure member offset: module_core_size'

 -- Mauricio Faria de Oliveira <email address hidden> Tue, 07 Nov 2023 15:00:36 -0300

Changed in crash (Ubuntu):
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.