[Bug 1995362] Re: ldd / ld-linux-x86-64.so.2 crashes with SIGSEGV when ran against certain shared libraries
Simon Chopin
1995362 at bugs.launchpad.net
Tue Jun 6 08:28:45 UTC 2023
** Also affects: glibc (Ubuntu Kinetic)
Importance: Undecided
Status: New
** Changed in: glibc (Ubuntu Kinetic)
Status: New => Fix Released
--
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:
Fix Released
Status in glibc source package in Jammy:
In Progress
Status in glibc source package in Kinetic:
Fix Released
Bug description:
[Impact]
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.
It has been fixed upstream in the following patch:
https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=10fe3cd309b32c003a6b98e08928e7d6007caecf
[Test Plan]
The patch includes tests for this. However, it's fairly easy to test
on an installed system:
$ sudo apt install -y python3 python3-venv libglib2.0-0
$ python3 -m venv venv
$ . venv/bin/activate
$ pip install pyside6
$ LD_TRACE_LOADED_OBJECTS=1 /lib64/ld-linux-x86-64.so.2 venv/lib64/python3.10/site-packages/PySide6/QtQml.abi3.so
That last command should *NOT* segfault.
[Regression potential]
We're touching a fairly sensible part of the system here. Besides "ldd
is totally broken"-type scenarios, there could be more subtle breakage
due to changes in the load order of dynamic libraries (unlikely given
the nature of the patch, though)
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