The issues reported in this bug are reproducible on an AWS c6g.2xlarge instance. The test packages with the backported patch to disable LTO addressed the issues. ... $ lsb_release -cs jammy $ dpkg --print-architecture arm64 $ sudo dmesg | grep DMI: [ 0.033370] DMI: Amazon EC2 c6g.2xlarge/, BIOS 1.0 11/1/2018 Test 1) riscv64 on arm64, additional bits (comment #4) sudo apt install --yes --no-install-recommends qemu-system-riscv64 wget https://github.com/carlosedp/riscv-bringup/releases/download/v1.0/UbuntuFocal-riscv64-QemuVM.tar.gz tar xzf UbuntuFocal-riscv64-QemuVM.tar.gz ./run_riscvVM.sh <... wait ...> [ OK ] Reached target Local File Systems. Starting udev Kernel Device Manager... qemu-system-riscv64: ../../block/aio_task.c:64: aio_task_pool_wait_one: Assertion `qemu_coroutine_self() == pool->main_co' failed. ./run_riscvVM.sh: line 31: 2572 Aborted (core dumped) qemu-system-riscv64 -machine virt -nographic -smp 4 -m 4G -bios fw_payload.bin -device virtio-blk-device,drive=hd0 -object rng-random,filename=/dev/urandom,id=rng0 -device virtio-rng-device,rng=rng0 -drive file=riscv64-UbuntuFocal-qemu.qcow2,format=qcow2,id=hd0 -device virtio-net-device,netdev=usernet -netdev user,id=usernet,$ports (fails 5/5 times) Test 2) riscv64 on arm64, ubuntu cloud image (based on comment #4) wget https://cloud-images.ubuntu.com/jammy/current/jammy-server-cloudimg-riscv64.img sudo modprobe nbd sudo qemu-nbd -c /dev/nbd0 --read-only jammy-server-cloudimg-riscv64.img sudo mount /dev/nbd0p1 /mnt -o ro sudo cp /mnt/boot/vmlinuz-* /mnt/boot/initrd.img-* . sudo chown $USER vmlinuz-* initrd.img-* sudo umount /mnt sudo qemu-nbd -d /dev/nbd0 qemu-system-riscv64 \ -machine virt -nographic \ -smp 4 -m 4G \ -bios default \ -kernel vmlinuz-* -initrd initrd.img-* \ -append 'root=/dev/vda1 ro console=ttyS0' \ -device virtio-blk-device,drive=drive0 \ -drive file=jammy-server-cloudimg-riscv64.img,format=qcow2,id=drive0 <... wait ~30-60 seconds ...> [ 36.089758] systemd[1]: Starting Load Kernel Module fuse... Starting Load Kernel Module fuse... [ 36.134443] systemd[1]: Starting Load Kernel Module pstore_blk... Starting Load Kernel Module pstore_blk... qemu-system-riscv64: GLib: g_source_ref: assertion 'source != NULL' failed Segmentation fault (core dumped) [fails 5/5 times] Test 3) arm64 on arm64, ubuntu cloud image wget https://cloud-images.ubuntu.com/jammy/current/jammy-server-cloudimg-arm64.img sudo apt install --yes --no-install-recommends qemu-system-arm qemu-efi-aarch64 ipxe-qemu cp /usr/share/AAVMF/AAVMF_CODE.fd flash0.img cp /usr/share/AAVMF/AAVMF_VARS.fd flash1.img qemu-system-aarch64 \ -machine virt -nographic \ -smp 4 -m 4G \ -cpu cortex-a57 \ -pflash flash0.img -pflash flash1.img \ -drive file=jammy-server-cloudimg-arm64.img,format=qcow2,id=drive0,if=none \ -device virtio-blk-device,drive=drive0 ... BdsDxe: failed to load Boot0001 "UEFI Misc Device" from VenHw(93E34C7E-B50E-11DF-9223-2443DFD72085,00): Not Found qemu-system-aarch64: GLib: g_source_ref: assertion 'source != NULL' failed Segmentation fault (core dumped) [fails 5/5 times] Test packages with LTO disabled on non-amd64: amd64 build log: ../../configure ... --extra-cflags="-g -O2 -ffile-prefix-map=/<>=. -flto=auto -ffat-lto-objects -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2" arm64 build log: ../../configure ... --extra-cflags="-g -O2 -ffile-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2" ... sudo add-apt-repository -y ppa:mfo/lp1921664 sudo apt install -y qemu-system-misc qemu-system-arm Test 1) ./run_riscvVM.sh ... Ubuntu 20.04 LTS Ubuntu-riscv64 ttyS0 Ubuntu-riscv64 login: (3/3 times) Test 2) qemu-system-riscv64 \ ... [ 25.509053] systemd[1]: Detected architecture riscv64. ... Ubuntu 22.04.2 LTS ubuntu ttyS0 ubuntu login: (3/3 times) Test 3) qemu-system-aarch64 \ ... [ 41.020286] systemd[1]: Detected architecture arm64. ... [ 60.178904] EXT4-fs (vda1): re-mounted. Opts: discard,errors=remount-ro. Quota mode: none. < waaaaait > Ubuntu 22.04.2 LTS ubuntu ttyAMA0 ubuntu login: