[Bookworm] PHP 8.2 fails with "Illegal instruction" on ARMv6
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Raspbian |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
On Raspbian Bookworm, any invocation of PHP 8.2 fails on ARMv6 RPi models:
# php -v
Illegal instruction
# journalctl -u php8.2-fpm
Mar 26 20:41:06 DietPi systemd[1]: Starting php8.2-fpm.service - The PHP 8.2 FastCGI Process Manager...
Mar 26 20:41:06 DietPi systemd[1]: php8.2-fpm.service: Main process exited, code=killed, status=4/ILL
Mar 26 20:41:06 DietPi systemd[1]: php8.2-fpm.service: Failed with result 'signal'.
Mar 26 20:41:06 DietPi systemd[1]: Failed to start php8.2-fpm.service - The PHP 8.2 FastCGI Process Manager.
It seems to be something in the PHP core, since disabling all modules does not change something. Let me know of some more details, a strace or something like this helps, but probably it is a known issue from earlier PHP versions, requiring some patch for ARMv6.
Best regards,
Micha
Changed in raspbian: | |
status: | New → Fix Released |
The issue persists. The binaries btw work well on ARMv7 or QEMU containers (which emulate ARMv7 as well), so it must be some limitation with the ARMv6 instruction set, respectively wrong build flags.
Here a strace from the call, which is not too long:
``` "/usr/bin/ php", ["php", "-v"], 0xbe88ade4 /* 13 vars */) = 0 "/etc/ld. so.preload" , R_OK) = 0 so.preload" , O_RDONLY| O_LARGEFILE| O_CLOEXEC) = 3 SYNC_AS_ STAT|AT_ NO_AUTOMOUNT| AT_EMPTY_ PATH, STATX_BASIC_STATS, {stx_mask= STATX_BASIC_ STATS|STATX_ MNT_ID, stx_attributes=0, stx_mode= S_IFREG| 0644, stx_size=54, ...}) = 0 PROT_WRITE, MAP_PRIVATE, 3, 0) = 0xb6f07000 "/proc/ self/exe" , "/usr/bin/php8.2", 4096) = 15 arm-linux- gnueabihf/ libarmmem- v6l.so" , O_RDONLY| O_LARGEFILE| O_CLOEXEC) = 3 1\1\1\0\ 0\0\0\0\ 0\0\0\0\ 3\0(\0\ 1\0\0\0\ 250\3\0\ 0004\0\ 0\0"... , 512) = 512 SYNC_AS_ STAT|AT_ NO_AUTOMOUNT| AT_EMPTY_ PATH, STATX_BASIC_STATS, {stx_mask= STATX_BASIC_ STATS|STATX_ MNT_ID, stx_attributes=0, stx_mode= S_IFREG| 0644, stx_size=9512, ...}) = 0 PROT_WRITE, MAP_PRIVATE| MAP_ANONYMOUS, -1, 0) = 0xb6f05000 MAP_ANONYMOUS, -1, 0) = 0xb6ee2000 PROT_EXEC, MAP_PRIVATE| MAP_FIXED| MAP_DENYWRITE, 3, 0) = 0xb6ef0000 0xb6ef2000, 61440, PROT_NONE) = 0 PROT_WRITE, MAP_PRIVATE| MAP_FIXED| MAP_DENYWRITE, 3, 0x1000) = 0xb6f01000 O_LARGEFILE| O_CLOEXEC) = 3 SYNC_AS_ STAT|AT_ NO_AUTOMOUNT| AT_EMPTY_ PATH, STATX_BASIC_STATS, {stx_mask= STATX_BASIC_ STATS|STATX_ MNT_ID, stx_attributes=0, stx_mode= S_IFREG| 0644, stx_size=10999, ...}) = 0 linux-gnueabihf /libm.so. 6", O_RDONLY| O_LARGEFILE| O_CLOEXEC) = 3 1\1\1\0\ 0\0\0\0\ 0\0\0\0\ 3\0(\0\ 1\0\0\0\ 0\0\0\0004\ 0\0\0". .., 512) = 512 SYNC_AS_ STAT|AT_ NO_AUTOMOUNT| AT_EMPTY_ PATH, STATX_BASIC_STATS, {stx_mask= STATX_BASIC_ STATS|STATX_ MNT_ID, stx_attributes=0, stx_mode= S_IFREG| 0644, stx_size=284116, ...}) = 0 PROT_EXEC, MAP_PRIVATE| MAP_DENYWRITE, 3, 0) = 0xb6ea6000 PROT_WRITE, MAP_PRIVATE| MAP_FIXED| MAP_DENYWRITE, 3, 0x44000) = 0xb6eeb000 linux-gnueabihf /libxml2. so.2", O_RDONLY| O_LARGEFILE| O_CLOEXEC) = 3 1\1\1\0\ 0\0\0\0\ 0\0\0\0\ 3\0(\0\ 1\0\0\0\ 0\0\0\0004\ 0\0\0". .., 512) = 512 SYNC_AS_ STAT|AT_ NO_AUTOMOUNT| AT_EMPTY_ PATH, STATX_BASIC_STATS, {stx_mask= STATX_BASIC_ STATS|STATX_ MNT_I.. .
root@Zero:~# php -v
Illegal instruction
root@Zero:~# strace php -v
execve(
brk(NULL) = 0x104f000
access(
openat(AT_FDCWD, "/etc/ld.
statx(3, "", AT_STATX_
mmap2(NULL, 54, PROT_READ|
close(3) = 0
readlink(
openat(AT_FDCWD, "/usr/lib/
read(3, "\177ELF\
statx(3, "", AT_STATX_
mmap2(NULL, 8192, PROT_READ|
mmap2(NULL, 139308, PROT_NONE, MAP_PRIVATE|
mmap2(0xb6ef0000, 73772, PROT_READ|
munmap(0xb6ee2000, 57344) = 0
munmap(0xb6f03000, 4140) = 0
mprotect(
mmap2(0xb6f01000, 8192, PROT_READ|
close(3) = 0
munmap(0xb6f07000, 54) = 0
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|
statx(3, "", AT_STATX_
mmap2(NULL, 10999, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb6eed000
close(3) = 0
openat(AT_FDCWD, "/lib/arm-
read(3, "\177ELF\
statx(3, "", AT_STATX_
mmap2(NULL, 286828, PROT_READ|
mmap2(0xb6eeb000, 8192, PROT_READ|
close(3) = 0
openat(AT_FDCWD, "/lib/arm-
read(3, "\177ELF\
statx(3, "", AT_STATX_