Bug 14581 - qemu-system-ppc -M mac99 does not boot for glibc system
Summary: qemu-system-ppc -M mac99 does not boot for glibc system
Status: RESOLVED MOVED
Alias: None
Product: buildroot
Classification: Unclassified
Component: Other (show other bugs)
Version: unspecified
Hardware: All Linux
: P5 normal
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-02-10 13:46 UTC by wbx
Modified: 2024-06-15 15:00 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description wbx 2022-02-10 13:46:58 UTC
Hi,

you get following error when trying to boot a glibc system in qemu-system-ppc:
Run /sbin/init as init process
init[1]: segfault (11) at 7369693e nip 7eb024 lr 7ead8c code 1 in libc.so.6[772000+1fa000]
init[1]: code: 7d5d5378 815efd38 39200000 913f0000 814a0000 813f000c 75291fbf 2c0a0000 
init[1]: code: 913f000c 41e2fe94 893d0000 5529103a <7d2a482e> 2c090000 41c2fe80 7fe4fb78 
Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b
CPU: 0 PID: 1 Comm: init Not tainted 5.15.0 #1
Call Trace:
[f1019d80] [c004c054] panic+0x124/0x308 (unreliable)
[f1019de0] [c004eadc] do_exit+0x910/0x918
[f1019e30] [c004fb38] do_group_exit+0x34/0xa8
[f1019e50] [c005e550] get_signal+0x1ec/0x86c
[f1019eb0] [c000cdcc] do_notify_resume+0x78/0x304
[f1019f10] [c00128a0] interrupt_exit_user_prepare_main+0xf8/0x130
[f1019f30] [c0019224] interrupt_return+0x14/0x144
--- interrupt: 300 at 0x7eb024
NIP:  007eb024 LR: 007ead8c CTR: 007ff680
REGS: f1019f40 TRAP: 0300   Not tainted  (5.15.0)
MSR:  0000d032 <EE,PR,ME,IR,DR,RI>  CR: 48002424  XER: 20000000
DAR: 7369693e DSISR: 40000000 
GPR00: 007e16a0 af9058c0 a7b8a430 00ab1879 00000000 af905d20 af906138 af906630 
GPR08: 00000030 000001cc 73696772 00000000 48002424 00acfa54 00000000 af905d20 
GPR16: 00000000 00ab1879 af905d20 00000000 00000000 4ec40000 af906630 00000000 
GPR24: af906138 af9066f8 af906138 00000000 00000000 00ab187a 00981fb8 af905d20 
NIP [007eb024] 0x7eb024
LR [007ead8c] 0x7ead8c
--- interrupt: 300
Rebooting in 180 seconds..

best regards
 Waldemar
Comment 1 romain.naour 2022-02-14 20:35:36 UTC
Hi Waldemar,

Thanks for the report!

I can reproduce it easily with gcc-10 and gcc-11 but not with gcc-9.

The powerpc 7400 support has been broken since the beginning of gcc-10 development.
After the commit [1] removing -many from the options passed by default to the
assembler, the build of this defconfig fail with assembler errors:

arch/powerpc/perf/bhrb.S: Assembler messages:
arch/powerpc/perf/bhrb.S:22: Error: unrecognized opcode: `cmpldi'
arch/powerpc/perf/bhrb.S:24: Error: unrecognized opcode: `ld'
arch/powerpc/perf/bhrb.S:25: Error: unrecognized opcode: `sldi'

It was fixed later by the commit [2] before the gcc-10 release but glibc segfault at runtime since then.

The Buildroot gitlab-ci testing only test with uClibc-ng libc but I try sometime with Glibc... but I missed this issue.

This issue should be reported to gcc.

[1] https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=e154242724b084380e3221df7c08fcdbd8460674
[2] https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=66711279083121b07d909ac0fc2f3a744ac7c937

Best regards,
Romain
Comment 2 Yann E. MORIN 2024-06-15 15:00:38 UTC
Thank you for your report.

The issue tracker for the Buildroot project has been moved to
the Gitlab.com issue tracker:
    https://gitlab.com/buildroot.org/buildroot/-/issues

We are taking this opportunity to close old issues in this old
tracker. If you believe your issue is still relevant, please
open one in the new issue tracker.

Thank you!