Boot error: libgcc_s.so.1 must be installed for pthread_exit to work
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
initramfs-tools (Ubuntu) |
Fix Released
|
Critical
|
Unassigned | ||
Jammy |
Fix Released
|
Critical
|
Unassigned |
Bug Description
[Bug description]
On a jammy installation, which was upgraded from focal, after a full-upgrade and a reboot,
I enter the LUKS password to decrypt the disk. Then I get the following error:
libgcc_s.so.1 must be installed for pthread_exit to work
After the error is shown, the system asks for the password again (which never works, always throwing the same error).
[Root cause]
I was able to decrypt the disk with the same password by booting from a live usb. Which allowed further investigation.
The error shown in the LUKS password prompt menu comes from
https:/
From
https:/
we noticed that libgcc_s.so.1 is only copied if
1) copy_exec is called for a binary directly linked to libgcc_s.so.1, or
2) copy_exec is called for a binary linked to libpthread
The cryptsetup initramfs hook, calls copy_exec for /sbin/cryptsetup, which is linked to libargon2.so.1, which is linked to libpthread.so.0. This covers case (2) above. As a consequence, libgcc_s.so.1 is copied to the initrd image and the error reported here is not seen.
However, since glibc 2.34, libpthread is shipped within glibc, and the binaries are no longer linked to libpthread.so.0. As a consequence, an argon2 package built with glibc 2.32 will no longer be linked to libpthread.so.0 and libgcc_s.so.1 will no longer be copied to the initrd image. Triggering the reported error.
This can be verified in these two argon2 builds, from the same sources, but with different glibc versions:
https:/
https:/
Still lvm2 is a seeded package, which Recommends thin-provisioni
Since thin-provisioni
[Reproducer]
- Install jammy with a LUKS encrypted disk
- remove thin-provisioni
- perform a full-upgrade (make sure the kernel was upgraded or run update-initramfs manually)
- reboot and verify you can no longer get past the decrypt password prompt screen
[Workaround]
A workaround for anyone affected would be to install thin-provisioni
[Impact]
Users upgrading from focal to jammy will eventually be locked out of their systems in case they are using LUKS encryption.
[Additional information]
While this issue is similar to
https:/
https:/
https:/
This is a different bug, with a different root cause.
Thanks to sergiodj for the pairing session on the root cause analysis.
description: | updated |
tags: | added: rls-jj-incoming |
Changed in initramfs-tools (Ubuntu): | |
milestone: | none → ubuntu-22.02 |
Changed in initramfs-tools (Ubuntu): | |
status: | Fix Released → Confirmed |
tags: | added: fr-2002 |
tags: | removed: rls-jj-incoming |
Changed in initramfs-tools (Ubuntu Jammy): | |
status: | Confirmed → Fix Committed |
As per https:/ /bugs.debian. org/cgi- bin/bugreport. cgi?bug= 950254, the "libpthread copies libgcc" snippet in the copy_exec hook function may be needed for other packages such as open-iscsi, btrfs-progs. In this case these may also be affected by this issue. If this is the case, a solution should lie in the hook-functions here.