Public bug reported:

gcc-9 in focal missbuilds 5.8 RISC-V kernel; gcc-10 in focal builds
bootable kernel.


The broken kernel build is here:
https://launchpad.net/ubuntu/+source/linux-riscv-5.8/5.8.0-14.16~20.04.1

the dmesg is:

$ telnet 10.101.50.219 3000
Trying 10.101.50.219...
Connected to 10.101.50.219.
Escape character is '^]'.
This is a banner for port con1(telnet(rfc2217),tcp,3000)
1:      Debian GNU/Linux kernel 5.8.0-14-generic
Retrieving file: /boot/initrd.img-5.8.0-14-generic
157868702 bytes read in 79765 ms (1.9 MiB/s)
Retrieving file: /boot/vmlinuz-5.8.0-14-generic
20092252 bytes read in 10167 ms (1.9 MiB/s)
append: root=LABEL=cloudimg-rootfs ro earlycon
## Flattened Device Tree blob at ff7685a0
   Booting using the fdt blob at 0xff7685a0
   Using Device Tree in place at 00000000ff7685a0, end 00000000ff76dd86

Starting kernel ...

[    0.000000] OF: fdt: Ignoring memory range 0x80000000 - 0x80200000
[    0.000000] Linux version 5.8.0-14-generic (buildd@riscv64-qemu-lcy01-088) 
(gcc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0, GNU ld (GNU Binutils for Ubuntu) 
2.34) #16~20.04.1-Ubuntu SMP Wed Jan 20 18:22:58 UTC 2021 (Ubuntu 
5.8.0-14.16~20.04.1-generic 5.8.18)
[    0.000000] earlycon: sifive0 at MMIO 0x0000000010010000 (options '')
[    0.000000] printk: bootconsole [sifive0] enabled
[    0.000000] Initial ramdisk at: 0x(____ptrval____) (157872128 bytes)
[    0.000000] Zone ranges:
[    0.000000]   DMA32    [mem 0x0000000080200000-0x00000000ffffffff]
[    0.000000]   Normal   [mem 0x0000000100000000-0x000000027fffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000080200000-0x000000027fffffff]
[    0.000000] Zeroed struct page in unavailable ranges: 512 pages
[    0.000000] Initmem setup node 0 [mem 0x0000000080200000-0x000000027fffffff]
[    0.000000] software IO TLB: mapped [mem 0xfb768000-0xff768000] (64MB)
[    0.000000] SBI specification v0.2 detected
[    0.000000] SBI implementation ID=0x1 Version=0x7
[    0.000000] SBI v0.2 TIME extension detected
[    0.000000] SBI v0.2 IPI extension detected
[    0.000000] SBI v0.2 RFENCE extension detected
[    0.000000] SBI v0.2 HSM extension detected
[    0.000000] CPU with hartid=0 is not available
[    0.000000] CPU with hartid=0 is not available
[    0.000000] riscv: ISA extensions acdfim
[    0.000000] riscv: ELF capabilities acdfim
[    0.000000] percpu: Embedded 27 pages/cpu s70744 r8192 d31656 u110592
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 2063880
[    0.000000] Kernel command line: root=LABEL=cloudimg-rootfs ro earlycon
[    0.000000] Dentry cache hash table entries: 1048576 (order: 11, 8388608 
bytes, linear)
[    0.000000] Inode-cache hash table entries: 524288 (order: 10, 4194304 
bytes, linear)
[    0.000000] Sorting __ex_table...
[    0.000000] mem auto-init: stack:off, heap alloc:on, heap free:off
[    0.000000] Memory: 7985324K/8386560K available (8927K kernel code, 4167K 
rwdata, 4096K rodata, 313K init, 995K bss, 401236K reserved, 0K cma-reserved)
[    0.000000] random: get_random_u64 called from kmem_cache_open+0x3a/0x3b2 
with crng_init=0
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[    0.000000] ftrace: allocating 35188 entries in 138 pages
[    0.000000] Oops - Oops - store (or AMO) address misaligned [#1]
[    0.000000] Modules linked in:
[    0.000000] CPU: 0 PID: 0 Comm: swapper Not tainted 5.8.0-14-generic 
#16~20.04.1-Ubuntu
[    0.000000] epc: ffffffe000204894 ra : ffffffe00020488a sp : ffffffe001203e40
[    0.000000]  gp : ffffffe001328650 tp : ffffffe00120a440 t0 : 
0000000000000006
[    0.000000]  t1 : 0000000000000000 t2 : 0000000000000000 s0 : 
ffffffe001203e50
[    0.000000]  s1 : 0000000000000000 a0 : ffffffe000215c12 a1 : 
0000000000000000
[    0.000000]  a2 : ffffffe00120a440 a3 : 0000000000010000 a4 : 
4000000000000002
[    0.000000]  a5 : 0000000000010001 a6 : ffffffffffffd097 a7 : 
0000000052464e43
[    0.000000]  s2 : ffffffe001330de1 s3 : ffffffe001330da1 s4 : 
ffffffe00132ac84
[    0.000000]  s5 : 0000000000000000 s6 : 0000000000000000 s7 : 
ffffffe1f5a06040
[    0.000000]  s8 : 0000000000000001 s9 : ffffffe00132ac60 s10: 
0000000200000100
[    0.000000]  s11: 0000000000000174 t3 : ffffffe0012f0968 t4 : 
0000000000000068
[    0.000000]  t5 : ffffffe0012f09a8 t6 : 0000000000040000
[    0.000000] status: 0000000200000100 badaddr: ffffffe001330de1 cause: 
0000000000000006
[    0.000000] ---[ end trace f67eb9af4d8d492b ]---
[    0.000000] Kernel panic - not syncing: Fatal exception in interrupt
[    0.000000] ---[ end Kernel panic - not syncing: Fatal exception in 
interrupt ]---


Same kernel, no source code changes at 
https://launchpad.net/ubuntu/+source/linux-riscv-5.8/5.8.0-14.16~20.04.3

compiled with gcc-10

boots correctly without OOps w.r.t. address misalignment.

I wonder if there is something fixed in gcc-10, which is not yet in
gcc-9 branch and/or not in focal's gcc-9.

** Affects: gcc-9 (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: focal riscv64

** Tags added: focal riscv64

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

Title:
  gcc-9 in focal missbuilds 5.8 RISC-V kernel; gcc-10 in focal builds
  bootable kernel.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/gcc-9/+bug/1914257/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to