Subiquity fails to execute when running on ARM64 with -64k Kernel. It exits with the "Segmentation fault" message
[Additional Info]
The problem seems to be with python3.8 binary in the snap. The same problem occurs with wget binary in the same snap, but ubuntu-distro-info works fine. Both python3.8 and wget are statically compiled, while ubuntu-distro-info is not.
root@jammy-arm:~# file /snap/subiquity/4236/usr/bin/python3.8
/snap/subiquity/4236/usr/bin/python3.8: ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter /snap/core20/current/lib/ld-linux-aarch64.so.1, for GNU/Linux 3.7.0, BuildID[sha1]=bad3f5d001ec1e2ec539f16d8f6729a06cdd68df, stripped
root@jammy-arm:~# /snap/subiquity/4236/usr/bin/python3.8
Segmentation fault
root@jammy-arm:~# ldd /snap/subiquity/4236/usr/bin/python3.8
not a dynamic executable
root@jammy-arm:~# file /snap/subiquity/4236/usr/bin/wget
/snap/subiquity/4236/usr/bin/wget: ELF 64-bit LSB pie executable, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter /snap/core20/current/lib/ld-linux-aarch64.so.1, for GNU/Linux 3.7.0, BuildID[sha1]=0f2234825d67c22b6b320139445759f6662aa01e, stripped
root@jammy-arm:~# /snap/subiquity/4236/usr/bin/wget
Segmentation fault
root@jammy-arm:~# ldd /snap/subiquity/4236/usr/bin/wget
not a dynamic executable
root@jammy-arm:~# file /snap/subiquity/4236/usr/bin/ubuntu-distro-info
/snap/subiquity/4236/usr/bin/ubuntu-distro-info: ELF 64-bit LSB pie executable, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter /snap/core20/current/lib/ld-linux-aarch64.so.1, for GNU/Linux 3.7.0, BuildID[sha1]=5d8c4c52d7ce614024eba1ba9069e48ad4192508, stripped
root@jammy-arm:~# /snap/subiquity/4236/usr/bin/ubuntu-distro-info
ubuntu-distro-info: You have to select exactly one of --all, --devel, --latest, --lts, --stable, --supported, --supported-esm, --series, --unsupported.
root@jammy-arm:~# ldd /snap/subiquity/4236/usr/bin/ubuntu-distro-info
linux-vdso.so.1 (0x0000fffe72270000)
libc.so.6 => /snap/core20/current/lib/aarch64-linux-gnu/libc.so.6 (0x0000fffe720b0000)
/snap/core20/current/lib/ld-linux-aarch64.so.1 => /lib/ld-linux-aarch64.so.1 (0x0000fffe72280000)
The same VM, using the non -64k kernel works:
# uname -a
Linux jammy-arm 5.15.0-27-generic #28-Ubuntu SMP Thu Apr 14 12:56:31 UTC 2022 aarch64 aarch64 aarch64 GNU/Linux
# /snap/subiquity/4236/usr/bin/python3.8 -c "print('Works')"
Works
Tried other kernels (5.17, 5.19) with the same error.
[Reproducer]
1. Run a VM in ARM64 architecture:
virt-install --arch aarch64 --boot uefi --osinfo detect=on,require=off --name jammy-arm --memory 8096 --vcpus 4 --disk=jammy-server-cloudimg-arm64.img,bus=virtio --disk=jammy-arm-seed.qcow2,bus=virtio --network network=default,model=virtio --boot hd --noautoconsole
3. Reboot in the kernel (I disabled secure boot)
# uname -a
Linux jammy-arm 5.15.0-27-generic-64k #28-Ubuntu SMP Thu Apr 14 19:01:31 UTC 2022 aarch64 aarch64 aarch64 GNU/Linux
4. Install subiquity
sudo snap install subiquity
5. Try to run it
# /snap/bin/subiquity
Segmentation fault
[Problem Description]
Subiquity fails to execute when running on ARM64 with -64k Kernel. It exits with the "Segmentation fault" message
[Additional Info]
The problem seems to be with python3.8 binary in the snap. The same problem occurs with wget binary in the same snap, but ubuntu-distro-info works fine. Both python3.8 and wget are statically compiled, while ubuntu-distro-info is not.
root@jammy-arm:~# file /snap/subiquity /4236/usr/ bin/python3. 8 /4236/usr/ bin/python3. 8: ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter /snap/core20/ current/ lib/ld- linux-aarch64. so.1, for GNU/Linux 3.7.0, BuildID[ sha1]=bad3f5d00 1ec1e2ec539f16d 8f6729a06cdd68d f, stripped /4236/usr/ bin/python3. 8 /4236/usr/ bin/python3. 8
/snap/subiquity
root@jammy-arm:~# /snap/subiquity
Segmentation fault
root@jammy-arm:~# ldd /snap/subiquity
not a dynamic executable
root@jammy-arm:~# file /snap/subiquity /4236/usr/ bin/wget /4236/usr/ bin/wget: ELF 64-bit LSB pie executable, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter /snap/core20/ current/ lib/ld- linux-aarch64. so.1, for GNU/Linux 3.7.0, BuildID[ sha1]=0f2234825 d67c22b6b320139 445759f6662aa01 e, stripped /4236/usr/ bin/wget /4236/usr/ bin/wget
/snap/subiquity
root@jammy-arm:~# /snap/subiquity
Segmentation fault
root@jammy-arm:~# ldd /snap/subiquity
not a dynamic executable
root@jammy-arm:~# file /snap/subiquity /4236/usr/ bin/ubuntu- distro- info /4236/usr/ bin/ubuntu- distro- info: ELF 64-bit LSB pie executable, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter /snap/core20/ current/ lib/ld- linux-aarch64. so.1, for GNU/Linux 3.7.0, BuildID[ sha1]=5d8c4c52d 7ce614024eba1ba 9069e48ad419250 8, stripped /4236/usr/ bin/ubuntu- distro- info /4236/usr/ bin/ubuntu- distro- info 0000) current/ lib/aarch64- linux-gnu/ libc.so. 6 (0x0000fffe720b 0000) core20/ current/ lib/ld- linux-aarch64. so.1 => /lib/ld- linux-aarch64. so.1 (0x0000fffe7228 0000)
/snap/subiquity
root@jammy-arm:~# /snap/subiquity
ubuntu-distro-info: You have to select exactly one of --all, --devel, --latest, --lts, --stable, --supported, --supported-esm, --series, --unsupported.
root@jammy-arm:~# ldd /snap/subiquity
linux-vdso.so.1 (0x0000fffe7227
libc.so.6 => /snap/core20/
/snap/
The same VM, using the non -64k kernel works:
# uname -a /4236/usr/ bin/python3. 8 -c "print('Works')"
Linux jammy-arm 5.15.0-27-generic #28-Ubuntu SMP Thu Apr 14 12:56:31 UTC 2022 aarch64 aarch64 aarch64 GNU/Linux
# /snap/subiquity
Works
Tried other kernels (5.17, 5.19) with the same error.
[Reproducer]
1. Run a VM in ARM64 architecture: on,require= off --name jammy-arm --memory 8096 --vcpus 4 --disk= jammy-server- cloudimg- arm64.img, bus=virtio --disk= jammy-arm- seed.qcow2, bus=virtio --network network= default, model=virtio --boot hd --noautoconsole
virt-install --arch aarch64 --boot uefi --osinfo detect=
2. Connect to the VM and install a -64k kernel /launchpad. net/~canonical- kernel- team/+archive/ ubuntu/ bootstrap/ +build/ 23546569
https:/
3. Reboot in the kernel (I disabled secure boot) 27-generic- 64k #28-Ubuntu SMP Thu Apr 14 19:01:31 UTC 2022 aarch64 aarch64 aarch64 GNU/Linux
# uname -a
Linux jammy-arm 5.15.0-
4. Install subiquity
sudo snap install subiquity
5. Try to run it
# /snap/bin/subiquity
Segmentation fault