On Ubuntu 22.04.1 LTS, `ldd` (or rather, the underlying `/lib64/ld-linux-x86-64.so.2`) crashes when ran against some of the python extension modules from PySide6 PyPI wheels for linux. This does not happen under 20.04 nor 22.10, and neither does it happen under Fedora 36 (which nominally uses the glibc of same version, 2.35).
When running jammy docker container, the crash does not happen as long as glib2 libraries are not installed (are unresolvable).
The problem was encountered when freezing a PySide6-based python application using pyinstaller, which uses `ldd` to perform binary analysis (and in cases like this, comes up empty, resulting in missing libraries).
The problem (at least in PyInstaller + PySide6 context) might become more widespread as `ubuntu-22.04` CI runners become more prevalent on the GitHub actions.
On Ubuntu 22.04.1 LTS, `ldd` (or rather, the underlying `/lib64/ ld-linux- x86-64. so.2`) crashes when ran against some of the python extension modules from PySide6 PyPI wheels for linux. This does not happen under 20.04 nor 22.10, and neither does it happen under Fedora 36 (which nominally uses the glibc of same version, 2.35).
When running jammy docker container, the crash does not happen as long as glib2 libraries are not installed (are unresolvable).
The problem was encountered when freezing a PySide6-based python application using pyinstaller, which uses `ldd` to perform binary analysis (and in cases like this, comes up empty, resulting in missing libraries).
Original bug report: https:/ /github. com/pyinstaller /pyinstaller/ issues/ 7197
The problem (at least in PyInstaller + PySide6 context) might become more widespread as `ubuntu-22.04` CI runners become more prevalent on the GitHub actions.
Steps to reproduce (in docker container):
0. docker run --rm -ti ubuntu:jammy bash
1. apt update python3. 10/site- packages/ PySide6/ QtQml.abi3. so˙:
2. apt install -y python3 python3-venv
3. python3 -m venv venv
4. . venv/bin/activate
5. pip install pyside6
6. Call the equivalent of `ldd venv/lib64/
``` LOADED_ OBJECTS= 1 /lib64/ ld-linux- x86-64. so.2 venv/lib64/ python3. 10/site- packages/ PySide6/ QtQml.abi3. so
LD_TRACE_
```
This gives the expected output: 0d:/# LD_TRACE_ LOADED_ OBJECTS= 1 /lib64/ ld-linux- x86-64. so.2 venv/lib64/ python3. 10/site- packages/ PySide6/ QtQml.abi3. so f000) abi3.so. 6.4 => /venv/lib64/ python3. 10/site- packages/ PySide6/ libpyside6qml. abi3.so. 6.4 (0x00007f43c109 a000) python3. 10/site- packages/ PySide6/ Qt/lib/ libQt6Qml. so.6 (0x00007f43c0b3 1000) abi3.so. 6.4 => /venv/lib64/ python3. 10/site- packages/ PySide6/ libpyside6. abi3.so. 6.4 (0x00007f43c0af 3000) abi3.so. 6.4 => not found python3. 10/site- packages/ PySide6/ Qt/lib/ libQt6Network. so.6 (0x00007f43c094 8000) python3. 10/site- packages/ PySide6/ Qt/lib/ libQt6Core. so.6 (0x00007f43c02c 8000) 64-linux- gnu/libstdc+ +.so.6 (0x00007f43c009 e000) 64-linux- gnu/libm. so.6 (0x00007f43bffb 7000) 64-linux- gnu/libgcc_ s.so.1 (0x00007f43bff9 7000) 64-linux- gnu/libpthread. so.0 (0x00007f43bff9 2000) 64-linux- gnu/libc. so.6 (0x00007f43bfd6 a000) ld-linux- x86-64. so.2 (0x00007f43c114 b000) abi3.so. 6.4 => not found abi3.so. 6.4 => not found 64-linux- gnu/libdl. so.2 (0x00007f43bfd6 3000) krb5.so. 2 => /lib/x86_ 64-linux- gnu/libgssapi_ krb5.so. 2 (0x00007f43bfd0 f000) 64-linux- gnu/libz. so.1 (0x00007f43bfcf 3000) python3. 10/site- packages/ PySide6/ Qt/lib/ libicui18n. so.56 (0x00007f43bf80 0000) python3. 10/site- packages/ PySide6/ Qt/lib/ libicuuc. so.56 (0x00007f43bf40 0000) python3. 10/site- packages/ PySide6/ Qt/lib/ libicudata. so.56 (0x00007f43bda0 0000) 2.0.so. 0 => not found 64-linux- gnu/librt. so.1 (0x00007f43bfce c000) 64-linux- gnu/libkrb5. so.3 (0x00007f43bd93 5000) 64-linux- gnu/libk5crypto .so.3 (0x00007f43bfcb b000) 64-linux- gnu/libcom_ err.so. 2 (0x00007f43bfcb 5000) .so.0 => /lib/x86_ 64-linux- gnu/libkrb5supp ort.so. 0 (0x00007f43bfca 7000) 64-linux- gnu/libkeyutils .so.1 (0x00007f43bfca 0000) 64-linux- gnu/libresolv. so.2 (0x00007f43bf7e c000)
```
(venv) root@d7fd69601f
linux-vdso.so.1 (0x00007ffe2fbc
libpyside6qml.
libQt6Qml.so.6 => /venv/lib64/
libpyside6.
libshiboken6.
libQt6Network.so.6 => /venv/lib64/
libQt6Core.so.6 => /venv/lib64/
libstdc++.so.6 => /lib/x86_
libm.so.6 => /lib/x86_
libgcc_s.so.1 => /lib/x86_
libpthread.so.0 => /lib/x86_
libc.so.6 => /lib/x86_
/lib64/
libshiboken6.
libshiboken6.
libdl.so.2 => /lib/x86_
libgssapi_
libz.so.1 => /lib/x86_
libicui18n.so.56 => /venv/lib64/
libicuuc.so.56 => /venv/lib64/
libicudata.so.56 => /venv/lib64/
libglib-2.0.so.0 => not found
libgthread-
librt.so.1 => /lib/x86_
libkrb5.so.3 => /lib/x86_
libk5crypto.so.3 => /lib/x86_
libcom_err.so.2 => /lib/x86_
libkrb5support
libkeyutils.so.1 => /lib/x86_
libresolv.so.2 => /lib/x86_
```
7. Now, install glib so that `libglib-2.0.so.0` and `libgthread- 2.0.so. 0` become resolvable:
```
apt install -y libglib2.0-0
```
8. Try obtaining imports again:
(venv) root@d7fd69601f 0d:/# LD_TRACE_ LOADED_ OBJECTS= 1 /lib64/ ld-linux- x86-64. so.2 venv/lib64/ python3. 10/site- packages/ PySide6/ QtQml.abi3. so
Segmentation fault (core dumped)
ProblemType: Crash ature: Ubuntu 5.15.0- 50.56-generic 5.15.60 esult: pass x86_64- linux-gnu/ ld-linux- x86-64. so.2 venv/lib/ python3. 10/site- packages/ PySide6/ Qt/lib/ libQt6Network. so.6 /home/rok/ venv/lib/ python3. 10/site- packages/ PySide6/ libpyside6. abi3.so. 6.4 /home/rok/ venv/lib/ python3. 10/site- packages/ PySide6/ Qt/lib/ libQt6Qml. so.6 /home/rok/ venv/lib/ python3. 10/site- packages/ PySide6/ Qt/lib/ libicui18n. so.56 /home/rok/ venv/lib/ python3. 10/site- packages/ PySide6/ QtQml.abi3. so /home/rok/ venv/lib/ python3. 10/site- packages/ PySide6/ Qt/lib/ libicudata. so.56 /home/rok/ venv/lib/ python3. 10/site- packages/ PySide6/ Qt/lib/ libicuuc. so.56 /home/rok/ venv/lib/ python3. 10/site- packages/ PySide6/ Qt/lib/ libQt6Core. so.6 /home/rok/ venv/lib/ python3. 10/site- packages/ PySide6/ libpyside6qml. abi3.so. 6.4 ld-linux- x86-64. so.2 venv/lib64/ python3. 10/site- packages/ PySide6/ QtQml.abi3. so 0x7f16cce8c000 rw-p None x86-64. so.2 crashed with SIGSEGV .etc.apport. crashdb. conf: 2022-11- 01T12:12: 40.406888
DistroRelease: Ubuntu 22.04
Package: libc6 2.35-0ubuntu3.1
ProcVersionSign
Uname: Linux 5.15.0-50-generic x86_64
ApportVersion: 2.20.11-0ubuntu82.1
Architecture: amd64
CasperMD5CheckR
CurrentDesktop: ubuntu:GNOME
Date: Tue Nov 1 12:14:02 2022
ExecutablePath: /usr/lib/
InstallationDate: Installed on 2022-04-21 (193 days ago)
InstallationMedia: Ubuntu 22.04 LTS "Jammy Jellyfish" - Release amd64 (20220419)
LocalLibraries: /home/rok/
ProcCmdline: /lib64/
SegvAnalysis:
Segfault happened at: 0x7f16cce8a480: add %ah,-0x19(%rax)
PC (0x7f16cce8a480) in non-executable VMA region: 0x7f16cce8a000-
source "%ah" ok
destination "-0x19(%rax)" (0x7fff9a2e3f57) ok
SegvReason: executing writable VMA None
Signal: 11
SourcePackage: glibc
StacktraceTop:
?? ()
?? ()
?? ()
?? ()
?? ()
Title: ld-linux-
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm cdrom dip lpadmin lxd plugdev sambashare sudo
mtime.conffile.
separator: