| Issue |
172253
|
| Summary |
clang miscompiles systemd on ppc64le
|
| Labels |
clang
|
| Assignees |
|
| Reporter |
Gelbpunkt
|
Hi there, I'm building systemd with clang on several architectures and setups, and it works great on almost all of them, but not all.
On Gentoo Linux (ppc64) with clang 21.1.7 and on Alpine Linux (ppc64le) with clang 21.1.7, it seems like clang miscompiles `libsystemd-shared-25X.so` (I'm building systemd 257 on Alpine and 259_rc3 on Gentoo).
The system will subsequently crash during boot with segfaults in `libsystemd-shared-25X.so` during boot. Here's such a lot:
<details>
<summary>Log of Alpine ppc64le with systemd 257 build with clang 21.1.7</summary>
```
[ 2.117601] systemd[1]: systemd 257.10 running in system mode (+PAM +AUDIT -SELINUX +APPARMOR +IMA +IPE +SMACK +SECCOMP +GCRYPT +GNUTLS +OPENSSL +ACL +BLKID +CURL +ELFUTILS +FIDO2 +IDN2 -IDN -IPTC +KMOD +LIBCRYPTSETUP +LIBCRYPTSETUP_PLUGINS +LIBFDISK +PCRE2 -PWQUALITY +P11KIT +QRENCODE -TPM2 +BZIP2 +LZ4 +XZ +ZLIB +ZSTD +BPF_FRAMEWORK -BTF +XKBCOMMON -UTMP -SYSVINIT -LIBARCHIVE)
[ 2.118991] systemd[1]: Detected virtualization kvm.
[ 2.119294] systemd[1]: Detected architecture ppc64-le.
Welcome to postmarketOS edge!
[ 2.121730] systemd[1]: Hostname set to <amadioha>.
[ 2.129983] systemd[1]: Failed to open libbpf, cgroup BPF features disabled: Not supported
[ 2.286354] systemd[1]: Queued start job for default target Graphical Interface.
[ 2.306785] systemd[1]: Created slice Slice /system/getty.
[ OK ] Created slice Slice /system/getty.
[ 2.309134] systemd[1]: Created slice Slice /system/modprobe.
[ OK ] Created slice Slice /system/modprobe.
[ 2.312187] systemd[1]: Created slice Slice /system/serial-getty.
[ OK ] Created slice Slice /system/serial-getty.
[ 2.315515] systemd[1]: Created slice User and Session Slice.
[ OK ] Created slice User and Session Slice.
[ 2.318080] systemd[1]: Started Dispatch Password Requests to Console Directory Watch.
[ OK ] Started Dispatch Password Requests to Console Directory Watch.
[ 2.320901] systemd[1]: Started Forward Password Requests to Wall Directory Watch.
[ OK ] Started Forward Password Requests to Wall Directory Watch.
[ 2.324473] systemd[1]: Set up automount Arbitrary Executable File Formats File System Automount Point.
[ OK ] Set up automount Arbitrary Executa…ormats File System Automount Point.
[ 2.327929] systemd[1]: Expecting device /dev/hvc0...
Expecting device /dev/hvc0...
[ 2.329310] systemd[1]: Reached target Local Encrypted Volumes.
[ OK ] Reached target Local Encrypted Volumes.
[ 2.331729] systemd[1]: Reached target Local Integrity Protected Volumes.
[ OK ] Reached target Local Integrity Protected Volumes.
[ 2.334405] systemd[1]: Reached target Path Units.
[ OK ] Reached target Path Units.
[ 2.336130] systemd[1]: Reached target Remote Encrypted Volumes.
[ OK ] Reached target Remote Encrypted Volumes.
[ 2.338583] systemd[1]: Reached target Remote File Systems.
[ OK ] Reached target Remote File Systems.
[ 2.340971] systemd[1]: Reached target Slice Units.
[ OK ] Reached target Slice Units.
[ 2.342771] systemd[1]: Reached target Local Verity Protected Volumes.
[ OK ] Reached target Local Verity Protected Volumes.
[ 2.347991] systemd[1]: Listening on Process Core Dump Socket.
[ OK ] Listening on Process Core Dump Socket.
[ 2.352201] systemd[1]: Listening on Credential Encryption/Decryption.
[ OK ] Listening on Credential Encryption/Decryption.
[ 2.354932] systemd[1]: Listening on Journal Socket (/dev/log).
[ OK ] Listening on Journal Socket (/dev/log).
[ 2.357499] systemd[1]: Listening on Journal Sockets.
[ OK ] Listening on Journal Sockets.
[ 2.359619] systemd[1]: Listening on DDI File System Mounter Socket.
[ OK ] Listening on DDI File System Mounter Socket.
[ 2.362013] systemd[1]: Listening on Network Service Netlink Socket.
[ OK ] Listening on Network Service Netlink Socket.
[ 2.364629] systemd[1]: Listening on Namespace Resource Manager Socket.
[ OK ] Listening on Namespace Resource Manager Socket.
[ 2.367063] systemd[1]: Userspace Out-Of-Memory (OOM) Killer Socket was skipped because of an unmet condition check (ConditionPathExists=/proc/pressure/memory).
[ 2.367786] systemd[1]: Listening on udev Control Socket.
[ OK ] Listening on udev Control Socket.
[ 2.369381] systemd[1]: Listening on udev Kernel Socket.
[ OK ] Listening on udev Kernel Socket.
[ 2.371471] systemd[1]: Huge Pages File System was skipped because of an unmet condition check (ConditionPathExists=/sys/kernel/mm/hugepages).
[ 2.394963] systemd[1]: Mounting POSIX Message Queue File System...
Mounting POSIX Message Queue File System...
[ 2.397972] systemd[1]: Mounting Kernel Debug File System...
Mounting Kernel Debug File System...
[ 2.400234] systemd[1]: Mounting Kernel Trace File System...
Mounting Kernel Trace File System...
[ 2.403912] systemd[1]: Starting Create List of Static Device Nodes...
Starting Create List of Static Device Nodes...
[ 2.408515] systemd[1]: Starting Load Kernel Module configfs...
Starting Load Kernel Module configfs...
[ 2.412647] systemd[1]: Starting Load Kernel Module dm_mod...
Starting Load Kernel Module dm_mod...
[ 2.417470] systemd[1]: Starting Load Kernel Module drm...
Starting Load Kernel Module drm...
[ 2.421982] systemd[1]: Starting Load Kernel Module efi_pstore...
Starting Load Kernel Module efi_pstore...
[ 2.429034] systemd[1]: Starting Load Kernel Module fuse...
Starting Load Kernel Module fuse...
[ 2.433279] systemd[1]: Starting Load Kernel Module loop...
Starting Load Kernel Module loop...
[ 2.435941] device-mapper: uevent: version 1.0.3
[ 2.436530] systemd[1]: Clear Stale Hibernate Storage Info was skipped because of an unmet condition check (ConditionPathExists=/sys/firmware/efi/efivars/HibernateLocation-8cf2644b-4b0b-428f-9387-6d876050dc67).
[ 2.436644] device-mapper: ioctl: 4.50.0-ioctl (2025-04-28) initialised: [email protected]
[ 2.441432] systemd[1]: Starting Journal Service...
Starting Journal Service...
[ 2.446231] systemd[1]: Starting Load Kernel Modules...
Starting Load Kernel Modules...
[ 2.449903] systemd[1]: Starting Generate network units from Kernel command line...
Starting Generate network units from Kernel command line...
[ 2.453414] systemd[1]: Starting Remount Root and Kernel File Systems...
Starting Remount Root and Kernel File Systems...
[ 2.458574] fuse: init (API version 7.45)
[ 2.459310] systemd[1]: Starting Load udev Rules from Credentials...
Starting Load udev Rules from Credentials...
[ 2.463107] systemd[1]: Starting Coldplug All udev Devices...
Starting Coldplug All udev Devices...
[ 2.466226] loop: module loaded
[ 2.466335] systemd[1]: Starting swap with zram...
Starting swap with zram...
[ 2.470578] systemd[1]: Mounted POSIX Message Queue File System.
[ OK ] Mounted POSIX Message Queue File System.
[ 2.472629] systemd[1]: Mounted Kernel Debug File System.
[ OK ] Mounted Kernel Debug File System.
[ 2.475547] systemd[1]: Mounted Kernel Trace File System.
[ OK ] Mounted Kernel Trace File System.
[ 2.477864] systemd[1]: Finished Create List of Static Device Nodes.
[ OK ] Finished Create List of Static Device Nodes.
[ 2.479794] systemd[1]: [email protected]: Deactivated successfully.
[ 2.480336] systemd[1]: Finished Load Kernel Module configfs.
[ OK ] Finished Load Kernel Module configfs.
[ 2.482454] systemd[1]: modprobe@dm_mod.service: Deactivated successfully.
[ 2.483037] systemd[1]: Finished Load Kernel Module dm_mod.
[ OK ] Finished Load Kernel Module dm_mod.
[ 2.485112] systemd[1]: modprobe@efi_pstore.service: Deactivated successfully.
[ 2.485835] systemd[1]: Finished Load Kernel Module efi_pstore.
[ OK ] Finished Load Kernel Module efi_pstore.
[ 2.487796] systemd[1]: [email protected]: Deactivated successfully.
[ 2.488316] systemd[1]: Finished Load Kernel Module fuse.
[ OK ] Finished Load Kernel Module fuse.
[ 2.490550] systemd[1]: [email protected]: Deactivated successfully.
[ 2.491073] systemd[1]: Finished Load Kernel Module drm.
[ OK ] Finished Load Kernel Module drm.
[ 2.493682] systemd[1]: [email protected]: Deactivated successfully.
[ 2.494180] systemd[1]: Finished Load Kernel Module loop.
[ OK ] Finished Load Kernel Module loop.
[ 2.495948] systemd[1]: Finished Load Kernel Modules.
[ OK ] Finished Load Kernel Modules.
[ 2.501483] systemd[1]: Mounting FUSE Control File System...
Mounting FUSE Control File System...
[ 2.504322] EXT4-fs (vda2): re-mounted 84f283c0-5eb0-4451-857f-832485a7d57b.
[ 2.506688] systemd[1]: Mounting Kernel Configuration File System...
Mounting Kernel Configuration File System...
[ 2.508175] systemd[1]: Repartition Root Disk was skipped because no trigger condition checks were met.
[ 2.511671] systemd[1]: Starting Apply Kernel Variables...
Starting Apply Kernel Variables...
[ 2.515344] systemd[1]: Starting Create Static Device Nodes in /dev gracefully...
Starting Create Static Device Nodes in /dev gracefully...
[ 2.519875] systemd[1]: Finished Generate network units from Kernel command line.
[ OK ] Finished Generate network units from Kernel command line.
[ 2.524689] systemd[1]: Finished Remount Root and Kernel File Systems.
[ OK ] Finished Remount Root and Kernel File Systems.
[ 2.527902] systemd[1]: Finished Load udev Rules from Credentials.
[ OK ] Finished Load udev Rul[ 2.528916] systemd-journald[960]: Collecting audit messages is disabled.
es from Credentials.
[ 2.530942] systemd[1]: Mounted FUSE Control File System.
[ OK ] Mounted FUSE Control File System.
[ 2.534140] systemd[1]: Mounted Kernel Configuration File System.
[ OK ] Mounted Kernel Configuration File System.
[ 2.536065] systemd[1]: Reached target Preparation for Network.
[ OK ] Reached target Preparation for Network.
[ 2.538264] systemd[1]: Rebuild Hardware Database was skipped because of an unmet condition check (ConditionNeedsUpdate=/etc).
[ 2.538802] systemd[1]: Platform Persistent Storage Archival was skipped because of an unmet condition check (ConditionDirectoryNotEmpty=/sys/fs/pstore).
[ 2.540893] systemd[1]: Starting Load/Save OS Random Seed...
Starting Load/Save OS Random Seed...
[ 2.546959] zram: Added device: zram0
[ 2.549243] zram: Added device: zram1
[ 2.549566] zram: Added device: zram2
[ 2.550923] systemd[1]: Finished Apply Kernel Variables.
[ OK ] Finished Apply Kernel Variables.
[ 2.553099] systemd[1]: Finished Create Static Device Nodes in /dev gracefully.
[ OK ] Finished Create Static Device Nodes in /dev gracefully.
[ 2.555352] systemd[1]: Create System Users was skipped because no trigger condition checks were met.
[ 2.555915] systemd[1]: Userspace Out-Of-Memory (OOM) Killer was skipped because of an unmet condition check (ConditionPathExists=/proc/pressure/memory).
[ 2.559439] systemd[1]: Starting Network Time Synchronization...
Starting Network Time Synchronization...
[ 2.562640] systemd[1]: Starting Create Static Device Nodes in /dev...
Starting Create Static Device Nodes in /dev...
[ 2.564826] systemd[1]: Started Journal Service.
[ OK ] Started Journal Service.
[ 2.581613] zram0: detected capacity change from 0 to 16715776
[ OK ] Finished Create Static Device Nodes in /dev.
[ OK ] Finished Coldplug All udev Devices.
[ OK ] Finished Load/Save OS Random Seed.
[ 2.612420] Adding 8357824k swap on /dev/zram0. Priority:16383 extents:1 across:8357824k SSDsc
[ OK ] Finished swap with zram.
[ OK ] Reached target Preparation for Local File Systems.
[ OK ] Reached target Swaps.
Starting Flush J[ 2.644192] sournal to Persisystemd-journald[t960]: Received client request toent Storage. flush runtime j.ournal.
.
Starting Rule-based Manager for Device Events and Files...
[ 2.650546] systemd-journald[960]: File /var/log/journal/d036eaa3cf004b13ac458e22db8c94e4/system.journal corrupted or uncleanly shut down, renaming and replacing.
[ OK ] Started Network Time Synchronization.
[ 2.676422] systemd[1]: segfault (11) at 6e41600065636976 nip 7fffb64f6d68 lr 7fffb64f6c5c code 3 in libsystemd-shared-257.so[266d68,7fffb6370000+2d0000]
[ 2.677378] systemd[1]: code: 5786077e 5787ee7e 6a5b0001 7f84899e 7f44b19e 6a110001 7e447d9e 7e04b59e
[ 2.678129] systemd[1]: code: 28340000 7c8f2378 7c8e2378 41820020 <89f40000> e88101b0 38a58e68 71ef00ff
[ 2.737595] systemd[1]: segfault (11) at 5 nip 7fffb64f6d68 lr 7fffb64f6c5c code 1 in libsystemd-shared-257.so[266d68,7fffb6370000+2d0000]
[ 2.738650] systemd[1]: code: 5786077e 5787ee7e 6a5b0001 7f84899e 7f44b19e 6a110001 7e447d9e 7e04b59e
[ 2.739133] systemd[1]: code: 28340000 7c8f2378 7c8e2378 41820020 <89f40000> e88101b0 38a58e68 71ef00ff
[ 2.743068] systemd[1]: segfault (11) at 5 nip 7fffb64f6d68 lr 7fffb64f6c5c code 1 in libsystemd-shared-257.so[266d68,7fffb6370000+2d0000]
[ 2.743511] systemd[1]: code: 5786077e 5787ee7e 6a5b0001 7f84899e 7f44b19e 6a110001 7e447d9e 7e04b59e
[ 2.743829] systemd[1]: code: 28340000 7c8f2378 7c8e2378 41820020 <89f40000> e88101b0 38a58e68 71ef00ff
[ 2.745705] systemd[1]: segfault (11) at 5 nip 7fffb64f6d68 lr 7fffb64f6c5c code 1 in libsystemd-shared-257.so[266d68,7fffb6370000+2d0000]
[ 2.746179] systemd[1]: code: 5786077e 5787ee7e 6a5b0001 7f84899e 7f44b19e 6a110001 7e447d9e 7e04b59e
[ 2.746495] systemd[1]: code: 28340000 7c8f2378 7c8e2378 41820020 <89f40000> e88101b0 38a58e68 71ef00ff
[ 2.748934] systemd[1]: segfault (11) at 5 nip 7fffb64f6d68 lr 7fffb64f6c5c code 1 in libsystemd-shared-257.so[266d68,7fffb6370000+2d0000]
[ 2.749355] systemd[1]: code: 5786077e 5787ee7e 6a5b0001 7f84899e 7f44b19e 6a110001 7e447d9e 7e04b59e
[ 2.749662] systemd[1]: code: 28340000 7c8f2378 7c8e2378 41820020 <89f40000> e88101b0 38a58e68 71ef00ff
[ 2.754886] systemd[1]: segfault (11) at 5 nip 7fffb64f6d68 lr 7fffb64f6c5c code 1 in libsystemd-shared-257.so[266d68,7fffb6370000+2d0000]
[ 2.755302] systemd[1]: code: 5786077e 5787ee7e 6a5b0001 7f84899e 7f44b19e 6a110001 7e447d9e 7e04b59e
[ 2.755609] systemd[1]: code: 28340000 7c8f2378 7c8e2378 41820020 <89f40000> e88101b0 38a58e68 71ef00ff
[ 2.758761] systemd[1]: segfault (11) at 5 nip 7fffb64f6d68 lr 7fffb64f6c5c code 1 in libsystemd-shared-257.so[266d68,7fffb6370000+2d0000]
[ 2.759247] systemd[1]: code: 5786077e 5787ee7e 6a5b0001 7f84899e 7f44b19e 6a110001 7e447d9e 7e04b59e
[ 2.759543] systemd[1]: code: 28340000 7c8f2378 7c8e2378 41820020 <89f40000> e88101b0 38a58e68 71ef00ff
[ 2.763989] systemd[1]: segfault (11) at 5 nip 7fffb64f6d68 lr 7fffb64f6c5c code 1 in libsystemd-shared-257.so[266d68,7fffb6370000+2d0000]
[ 2.764527] systemd[1]: code: 5786077e 5787ee<truncated>Please see the issue for the entire body.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs