[Bug 2106208] Re: Relocation overflow in GRUB when booting with RISC-V EDK II and emulating NUMA.

Mate Kukri 2106208 at bugs.launchpad.net
Fri Apr 4 07:49:13 UTC 2025


I think NUMA here is just causing the memory map to have big enough
holes in it, and the allocator to behave in such a way that some
relocations will have addends that overflow a 32-bit signed slot.

We had the same issue exposed by a 4GB memory limit here:
https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/2103864

I think we should investigate why GRUB modules are not relocatable to
any absolute 64-bit address on RISC-V, which is how they are usually
expected to behave. (They are ELF object files built with
-mcmodel=large)

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to grub2 in Ubuntu.
https://bugs.launchpad.net/bugs/2106208

Title:
  Relocation overflow in GRUB when booting with RISC-V EDK II and
  emulating NUMA.

Status in edk2 package in Ubuntu:
  New
Status in grub2 package in Ubuntu:
  New

Bug description:
  I tried to boot our preinstalled RISC-V server images with EDK II
  using the following command:

  qemu-system-riscv64 \
  -machine virt \
  -m 8192 \
  -nographic \
  -smp 8,sockets=2,cores=4,threads=1 \
  -numa node,cpus=0-3,mem=4096 \
  -numa node,cpus=4-7,mem=4096 \
  -drive if=pflash,format=raw,unit=0,file=/usr/share/qemu-efi-riscv64/RISCV_VIRT_CODE.fd,readonly=on \
  -drive if=pflash,format=raw,unit=1,file=RISCV_VIRT_VARS.fd \
  -device virtio-net-device,netdev=eth0 \
  -netdev user,id=eth0 \
  -device virtio-rng-pci \
  -drive file=ubuntu-24.04.2-preinstalled-server-riscv64.img,format=raw,if=virtio

  I tried these combinations:

  Feb 15 11:10 ubuntu-24.04.2-preinstalled-server-riscv64.img.xz with EDK II 2025.02-3ubuntu1 from plucky
  Feb 15 11:10 ubuntu-24.04.2-preinstalled-server-riscv64.img.xz with EDK II 2024.02-2 from noble
  Mar 31 08:14 plucky-preinstalled-server-riscv64.img with EDK II 2025.02-3ubuntu1 from plucky
  Mar 31 08:14 plucky-preinstalled-server-riscv64.img with EDK II 2024.02-2 from noble

  On all of these GRUB fails with `relocation overflow`.

  I am using QEMU 1:9.2.1+ds-1ubuntu4 on a amd64 Plucky system.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/edk2/+bug/2106208/+subscriptions




More information about the foundations-bugs mailing list