[Bug 1995362] [NEW] ldd / ld-linux-x86-64.so.2 crashes with SIGSEGV when ran against certain shared libraries
Rok Mandeljc
1995362 at bugs.launchpad.net
Tue Nov 1 11:17:23 UTC 2022
Public bug reported:
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
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/python3.10/site-packages/PySide6/QtQml.abi3.so˙:
```
LD_TRACE_LOADED_OBJECTS=1 /lib64/ld-linux-x86-64.so.2 venv/lib64/python3.10/site-packages/PySide6/QtQml.abi3.so
```
This gives the expected output:
```
(venv) root at d7fd69601f0d:/# LD_TRACE_LOADED_OBJECTS=1 /lib64/ld-linux-x86-64.so.2 venv/lib64/python3.10/site-packages/PySide6/QtQml.abi3.so
linux-vdso.so.1 (0x00007ffe2fbcf000)
libpyside6qml.abi3.so.6.4 => /venv/lib64/python3.10/site-packages/PySide6/libpyside6qml.abi3.so.6.4 (0x00007f43c109a000)
libQt6Qml.so.6 => /venv/lib64/python3.10/site-packages/PySide6/Qt/lib/libQt6Qml.so.6 (0x00007f43c0b31000)
libpyside6.abi3.so.6.4 => /venv/lib64/python3.10/site-packages/PySide6/libpyside6.abi3.so.6.4 (0x00007f43c0af3000)
libshiboken6.abi3.so.6.4 => not found
libQt6Network.so.6 => /venv/lib64/python3.10/site-packages/PySide6/Qt/lib/libQt6Network.so.6 (0x00007f43c0948000)
libQt6Core.so.6 => /venv/lib64/python3.10/site-packages/PySide6/Qt/lib/libQt6Core.so.6 (0x00007f43c02c8000)
libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f43c009e000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f43bffb7000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f43bff97000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f43bff92000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f43bfd6a000)
/lib64/ld-linux-x86-64.so.2 (0x00007f43c114b000)
libshiboken6.abi3.so.6.4 => not found
libshiboken6.abi3.so.6.4 => not found
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f43bfd63000)
libgssapi_krb5.so.2 => /lib/x86_64-linux-gnu/libgssapi_krb5.so.2 (0x00007f43bfd0f000)
libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f43bfcf3000)
libicui18n.so.56 => /venv/lib64/python3.10/site-packages/PySide6/Qt/lib/libicui18n.so.56 (0x00007f43bf800000)
libicuuc.so.56 => /venv/lib64/python3.10/site-packages/PySide6/Qt/lib/libicuuc.so.56 (0x00007f43bf400000)
libicudata.so.56 => /venv/lib64/python3.10/site-packages/PySide6/Qt/lib/libicudata.so.56 (0x00007f43bda00000)
libglib-2.0.so.0 => not found
libgthread-2.0.so.0 => not found
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f43bfcec000)
libkrb5.so.3 => /lib/x86_64-linux-gnu/libkrb5.so.3 (0x00007f43bd935000)
libk5crypto.so.3 => /lib/x86_64-linux-gnu/libk5crypto.so.3 (0x00007f43bfcbb000)
libcom_err.so.2 => /lib/x86_64-linux-gnu/libcom_err.so.2 (0x00007f43bfcb5000)
libkrb5support.so.0 => /lib/x86_64-linux-gnu/libkrb5support.so.0 (0x00007f43bfca7000)
libkeyutils.so.1 => /lib/x86_64-linux-gnu/libkeyutils.so.1 (0x00007f43bfca0000)
libresolv.so.2 => /lib/x86_64-linux-gnu/libresolv.so.2 (0x00007f43bf7ec000)
```
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 at d7fd69601f0d:/# 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
DistroRelease: Ubuntu 22.04
Package: libc6 2.35-0ubuntu3.1
ProcVersionSignature: Ubuntu 5.15.0-50.56-generic 5.15.60
Uname: Linux 5.15.0-50-generic x86_64
ApportVersion: 2.20.11-0ubuntu82.1
Architecture: amd64
CasperMD5CheckResult: pass
CurrentDesktop: ubuntu:GNOME
Date: Tue Nov 1 12:14:02 2022
ExecutablePath: /usr/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2
InstallationDate: Installed on 2022-04-21 (193 days ago)
InstallationMedia: Ubuntu 22.04 LTS "Jammy Jellyfish" - Release amd64 (20220419)
LocalLibraries: /home/rok/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
ProcCmdline: /lib64/ld-linux-x86-64.so.2 venv/lib64/python3.10/site-packages/PySide6/QtQml.abi3.so
SegvAnalysis:
Segfault happened at: 0x7f16cce8a480: add %ah,-0x19(%rax)
PC (0x7f16cce8a480) in non-executable VMA region: 0x7f16cce8a000-0x7f16cce8c000 rw-p None
source "%ah" ok
destination "-0x19(%rax)" (0x7fff9a2e3f57) ok
SegvReason: executing writable VMA None
Signal: 11
SourcePackage: glibc
StacktraceTop:
?? ()
?? ()
?? ()
?? ()
?? ()
Title: ld-linux-x86-64.so.2 crashed with SIGSEGV
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm cdrom dip lpadmin lxd plugdev sambashare sudo
mtime.conffile..etc.apport.crashdb.conf: 2022-11-01T12:12:40.406888
separator:
** Affects: glibc (Ubuntu)
Importance: Undecided
Status: New
** Tags: amd64 apport-crash jammy local-libs wayland-session
** Information type changed from Private to Public
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to glibc in Ubuntu.
https://bugs.launchpad.net/bugs/1995362
Title:
ldd / ld-linux-x86-64.so.2 crashes with SIGSEGV when ran against
certain shared libraries
Status in glibc package in Ubuntu:
New
Bug description:
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
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/python3.10/site-packages/PySide6/QtQml.abi3.so˙:
```
LD_TRACE_LOADED_OBJECTS=1 /lib64/ld-linux-x86-64.so.2 venv/lib64/python3.10/site-packages/PySide6/QtQml.abi3.so
```
This gives the expected output:
```
(venv) root at d7fd69601f0d:/# LD_TRACE_LOADED_OBJECTS=1 /lib64/ld-linux-x86-64.so.2 venv/lib64/python3.10/site-packages/PySide6/QtQml.abi3.so
linux-vdso.so.1 (0x00007ffe2fbcf000)
libpyside6qml.abi3.so.6.4 => /venv/lib64/python3.10/site-packages/PySide6/libpyside6qml.abi3.so.6.4 (0x00007f43c109a000)
libQt6Qml.so.6 => /venv/lib64/python3.10/site-packages/PySide6/Qt/lib/libQt6Qml.so.6 (0x00007f43c0b31000)
libpyside6.abi3.so.6.4 => /venv/lib64/python3.10/site-packages/PySide6/libpyside6.abi3.so.6.4 (0x00007f43c0af3000)
libshiboken6.abi3.so.6.4 => not found
libQt6Network.so.6 => /venv/lib64/python3.10/site-packages/PySide6/Qt/lib/libQt6Network.so.6 (0x00007f43c0948000)
libQt6Core.so.6 => /venv/lib64/python3.10/site-packages/PySide6/Qt/lib/libQt6Core.so.6 (0x00007f43c02c8000)
libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f43c009e000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f43bffb7000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f43bff97000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f43bff92000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f43bfd6a000)
/lib64/ld-linux-x86-64.so.2 (0x00007f43c114b000)
libshiboken6.abi3.so.6.4 => not found
libshiboken6.abi3.so.6.4 => not found
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f43bfd63000)
libgssapi_krb5.so.2 => /lib/x86_64-linux-gnu/libgssapi_krb5.so.2 (0x00007f43bfd0f000)
libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f43bfcf3000)
libicui18n.so.56 => /venv/lib64/python3.10/site-packages/PySide6/Qt/lib/libicui18n.so.56 (0x00007f43bf800000)
libicuuc.so.56 => /venv/lib64/python3.10/site-packages/PySide6/Qt/lib/libicuuc.so.56 (0x00007f43bf400000)
libicudata.so.56 => /venv/lib64/python3.10/site-packages/PySide6/Qt/lib/libicudata.so.56 (0x00007f43bda00000)
libglib-2.0.so.0 => not found
libgthread-2.0.so.0 => not found
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f43bfcec000)
libkrb5.so.3 => /lib/x86_64-linux-gnu/libkrb5.so.3 (0x00007f43bd935000)
libk5crypto.so.3 => /lib/x86_64-linux-gnu/libk5crypto.so.3 (0x00007f43bfcbb000)
libcom_err.so.2 => /lib/x86_64-linux-gnu/libcom_err.so.2 (0x00007f43bfcb5000)
libkrb5support.so.0 => /lib/x86_64-linux-gnu/libkrb5support.so.0 (0x00007f43bfca7000)
libkeyutils.so.1 => /lib/x86_64-linux-gnu/libkeyutils.so.1 (0x00007f43bfca0000)
libresolv.so.2 => /lib/x86_64-linux-gnu/libresolv.so.2 (0x00007f43bf7ec000)
```
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 at d7fd69601f0d:/# 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
DistroRelease: Ubuntu 22.04
Package: libc6 2.35-0ubuntu3.1
ProcVersionSignature: Ubuntu 5.15.0-50.56-generic 5.15.60
Uname: Linux 5.15.0-50-generic x86_64
ApportVersion: 2.20.11-0ubuntu82.1
Architecture: amd64
CasperMD5CheckResult: pass
CurrentDesktop: ubuntu:GNOME
Date: Tue Nov 1 12:14:02 2022
ExecutablePath: /usr/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2
InstallationDate: Installed on 2022-04-21 (193 days ago)
InstallationMedia: Ubuntu 22.04 LTS "Jammy Jellyfish" - Release amd64 (20220419)
LocalLibraries: /home/rok/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
ProcCmdline: /lib64/ld-linux-x86-64.so.2 venv/lib64/python3.10/site-packages/PySide6/QtQml.abi3.so
SegvAnalysis:
Segfault happened at: 0x7f16cce8a480: add %ah,-0x19(%rax)
PC (0x7f16cce8a480) in non-executable VMA region: 0x7f16cce8a000-0x7f16cce8c000 rw-p None
source "%ah" ok
destination "-0x19(%rax)" (0x7fff9a2e3f57) ok
SegvReason: executing writable VMA None
Signal: 11
SourcePackage: glibc
StacktraceTop:
?? ()
?? ()
?? ()
?? ()
?? ()
Title: ld-linux-x86-64.so.2 crashed with SIGSEGV
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm cdrom dip lpadmin lxd plugdev sambashare sudo
mtime.conffile..etc.apport.crashdb.conf: 2022-11-01T12:12:40.406888
separator:
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/glibc/+bug/1995362/+subscriptions
More information about the foundations-bugs
mailing list