preinst check that kernel revision < 255 now does more harm than good
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
glibc (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Bionic |
Fix Released
|
Undecided
|
Unassigned | ||
Focal |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
[impact]
Amazon Linux 2 currently has a kernel with version 4.14.262-
The significance of the check is much less than it used to be when the major part of the kernel version was stuck at 2, so we should follow Debian and just drop it.
[test case]
Boot an Amazon Linux 2 instance. Install docker. Run an ubuntu container of the series being tested. Run "apt-get update && apt-get install --reinstall libc6" and look for error messages / failures.
[regression potential]
It's possible that some binaries run using the "uname26" personality will fail -- but they will already fail with the glibc as currently installed, there's no value in preventing an upgrade.

Launchpad Janitor (janitor) wrote : | #1 |
Changed in glibc (Ubuntu Bionic): | |
status: | New → Confirmed |
Changed in glibc (Ubuntu Focal): | |
status: | New → Confirmed |
Changed in glibc (Ubuntu): | |
status: | New → Confirmed |
Changed in glibc (Ubuntu Focal): | |
status: | Confirmed → In Progress |

windowsguy (something-f) wrote : | #4 |
Same on Ubuntu 20.04.4 LTS on arm64
$ sudo apt-get --fix-broken install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following additional packages will be installed:
libc6
Suggested packages:
glibc-doc
The following packages will be upgraded:
libc6
1 upgraded, 0 newly installed, 0 to remove and 6 not upgraded.
1 not fully installed or removed.
Need to get 0 B/2266 kB of archives.
After this operation, 7168 B disk space will be freed.
Do you want to continue? [Y/n] y
Preconfiguring packages ...
(Reading database ... 102158 files and directories currently installed.)
Preparing to unpack .../libc6_
ERROR: Your kernel version indicates a revision number
of 255 or greater. Glibc has a number of built in
assumptions that this revision number is less than 255.
If you\'ve built your own kernel, please make sure that any
custom version numbers are appended to the upstream
kernel number with a dash or some other delimiter.
dpkg: error processing archive /var/cache/
new libc6:arm64 package pre-installation script subprocess returned error exit status 1
Errors were encountered while processing:
/var/cache/
E: Sub-process /usr/bin/dpkg returned an error code (1)
$ uname -a
Linux k2 4.9.277-82 #1 SMP PREEMPT Fri Feb 18 14:35:13 UTC 2022 aarch64 aarch64 aarch64 GNU/Linux
$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_
DISTRIB_
DISTRIB_

Edison Gustavo Muenz (edisongustavo) wrote : | #5 |
Are there any suggested workarounds in the meantime? This started happening after the libc6-dev package (and its dependants: libc-dev-bin, libc6) were upgraded from 2.31-0ubuntu9.2 to 2.31-0ubuntu9.7.
I'm running on AWS CodeBuild (so amd64 arch).
I tried installing the older version but it's not available. This is the output of `rmadison libc6-dev`:
libc6-dev | 2.19-0ubuntu6 | trusty | amd64, arm64, armhf, i386, powerpc, ppc64el
libc6-dev | 2.19-0ubuntu6.15 | trusty-security | amd64, arm64, armhf, i386, powerpc, ppc64el
libc6-dev | 2.19-0ubuntu6.15 | trusty-updates | amd64, arm64, armhf, i386, powerpc, ppc64el
libc6-dev | 2.23-0ubuntu3 | xenial | amd64, arm64, armhf, i386, powerpc, ppc64el, s390x
libc6-dev | 2.23-0ubuntu11.3 | xenial-security | amd64, arm64, armhf, i386, powerpc, ppc64el, s390x
libc6-dev | 2.23-0ubuntu11.3 | xenial-updates | amd64, arm64, armhf, i386, powerpc, ppc64el, s390x
libc6-dev | 2.27-3ubuntu1 | bionic | amd64, arm64, armhf, i386, ppc64el, s390x
libc6-dev | 2.27-3ubuntu1.5 | bionic-security | amd64, arm64, armhf, i386, ppc64el, s390x
libc6-dev | 2.27-3ubuntu1.5 | bionic-updates | amd64, arm64, armhf, i386, ppc64el, s390x
libc6-dev | 2.31-0ubuntu9 | focal | amd64, arm64, armhf, i386, ppc64el, riscv64, s390x
libc6-dev | 2.31-0ubuntu9.4 | focal-proposed | riscv64
libc6-dev | 2.31-0ubuntu9.5 | focal-proposed | amd64, arm64, armhf, i386, ppc64el, s390x
libc6-dev | 2.31-0ubuntu9.7 | focal-security | amd64, arm64, armhf, i386, ppc64el, riscv64, s390x
libc6-dev | 2.31-0ubuntu9.7 | focal-updates | amd64, arm64, armhf, i386, ppc64el, riscv64, s390x
libc6-dev | 2.34-0ubuntu3 | impish | amd64, arm64, armhf, i386, ppc64el, riscv64, s390x
libc6-dev | 2.34-0ubuntu3.2 | impish-security | amd64, arm64, armhf, i386, ppc64el, riscv64, s390x
libc6-dev | 2.34-0ubuntu3.2 | impish-updates | amd64, arm64, armhf, i386, ppc64el, riscv64, s390x
libc6-dev | 2.35-0ubuntu1 | jammy | amd64, arm64, armhf, i386, ppc64el, riscv64, s390x
The 2.31-0ubuntu9 version has the same issue though.

Rajesh (rajesh734) wrote : | #6 |
This bug is blocking my docker build from yesterday. Until a fix is in place if you have a workaround then could you please share it

Nic Doye (nic) wrote : | #7 |
The workaround I'm using is taken from here: https:/
mv /bin/uname /bin/uname.orig
and copy in the script below as /bin/uname (with the correct permissions),
----
#!/bin/bash
if [[ $1 == "-r" ]] ;then
echo '4.9.250'
exit
else
uname.orig "$@"
fi

Nic Doye (nic) wrote : | #8 |
Sorry that should be "$1" not an unquoted $1.

Rajesh (rajesh734) wrote : | #9 |
Thank you @Nic Doye for the workaround! It helped my docker build.

Om Prasad (omprasad-surapu) wrote : | #10 |
this worked!

john robison (jwr-sb) wrote : | #11 |
AWS support gave me another (temporary) workaround for Codebuild. If you use the 2xl compute type (the largest one, with 145gb RAM), that fleet is still using the older AMI and the older kernel, and so that will unblock your builds. At least until that compute type gets the same upgrade eventually.

Itay Elgazar (elgazaritay) wrote : | #12 |
@Nic
@Rajesh
Can anyone give a snapshot of your dockerfile? I am running this on docker with no luck.
Thanks

Nic Doye (nic) wrote : | #13 |
Place the following script in bin/uname (where bin and Dockerfile are in the same directory):
-8<----- uname
#!/bin/bash
# Until the following bug is fixed:
# https:/
# https:/
# Workaround from https:/
#
if [[ "$1" == "-r" ]] ;then
echo '4.9.250'
exit
else
uname.orig "$@"
fi
-8<-----
In your Dockerfile, you can do this. (You could just copy the uname script, but we have other things we copy in).
-8<----- From Dockerfile
COPY . /tmp/
RUN mv /bin/uname /bin/uname.orig \
&& install -m 0755 /tmp/bin/uname /bin \
&& apt-get update \
&& apt-get upgrade -y \
...
-8<-----

Vivek Mehra (vivmehra) wrote : | #15 |
For people working with Docker build
@Itay Elgazar (elgazaritay)
Copy the script above into a file(like ubuntuFix.sh)
Use it in your Dockerfile like below:-
FROM ubuntu:latest
USER root
WORKDIR /home/app
COPY . /home/app
#Workaround for ubuntu fix start
RUN mv /bin/uname /bin/uname.orig
RUN cp ./ubuntuFix.sh /bin/uname
RUN chmod 755 /bin/uname;
RUN cat /bin/uname
#Workaround for ubuntu fix end
RUN apt clean
RUN apt-get update
RUN apt -y install gnupg2
.....
.....
//Rest of the Dockerfile code
.....
.....
@Nic thanks for the solution..
Hope this works for others using Docker image

Itay Elgazar (elgazaritay) wrote : | #16 |
@vivmehra
You're the hero, man!

Michael Scharf (scharfmn) wrote (last edit ): | #17 |
Many thanks @nic
Here is a version with no external file
RUN mv /bin/uname /bin/uname.orig
RUN printf '#!/bin/bash\n\nif [[ "$1" == "-r" ]] ;then\n echo '4.9.250'\n exit\nelse\n uname.orig "$@"\nfi' > /bin/uname
RUN chmod 755 /bin/uname
(The second statement should be all on one line if you copy-paste it)

Michael Hudson-Doyle (mwhudson) wrote : | #18 |
This fix will land in glibc in a week or so (hopefully) but before that we can get new images out with the glibc from the security update in, which will make your builds work again.

Michael Hudson-Doyle (mwhudson) wrote : | #19 |
New ubuntu official images have been published which contain the glibc update, so this issue should be less impactful now. The plan is still to fix this quickly though.

Vivek Mehra (vivmehra) wrote : | #20 |
Thanks for the update @Michael

Launchpad Janitor (janitor) wrote : | #21 |
This bug was fixed in the package glibc - 2.35-0ubuntu3
---------------
glibc (2.35-0ubuntu3) jammy; urgency=medium
* debian/
-- Michael Hudson-Doyle <email address hidden> Fri, 04 Mar 2022 15:54:17 +1300
Changed in glibc (Ubuntu): | |
status: | Confirmed → Fix Released |

Martin Klosi (roise0r) wrote (last edit ): | #22 |
I'm trying to install the fixed package on a docker image, running Ubuntu 18.04.6, but I get: `91mE: Version '2.35-0ubuntu3' for 'libc6' was not found`. Running: `RUN apt-get install -y --no-install-
Ubuntu version:
19:36:03 NAME="Ubuntu"
19:36:03 VERSION="18.04.6 LTS (Bionic Beaver)"
19:36:03 ID=ubuntu
19:36:03 ID_LIKE=debian
19:36:03 PRETTY_NAME="Ubuntu 18.04.6 LTS"
19:36:03 VERSION_ID="18.04"
19:36:03 HOME_URL="https:/
19:36:03 SUPPORT_URL="https:/
19:36:03 BUG_REPORT_URL="https:/
19:36:03 PRIVACY_
19:36:03 VERSION_
19:36:03 UBUNTU_
Dockerfile:
FROM ubuntu:bionic
RUN cat /etc/os-release
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update
RUN apt list -a libc6
Available libc6 versions:
19:36:11 libc6:
19:36:11 Installed: 2.27-3ubuntu1.4
19:36:11 Candidate: 2.27-3ubuntu1.5
19:36:11 Version table:
19:36:11 2.27-3ubuntu1.5 500
19:36:11 500 http://
19:36:11 500 http://
19:36:11 *** 2.27-3ubuntu1.4 100
19:36:11 100 /var/lib/
19:36:11 2.27-3ubuntu1 500
19:36:11 500 http://

Brian Murray (brian-murray) wrote : Please test proposed package | #23 |
Hello Michael, or anyone else affected,
Accepted glibc into focal-proposed. The package will build now and be available at https:/
Please help us by testing this new package. See https:/
If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-
Further information regarding the verification process can be found at https:/
N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.
Changed in glibc (Ubuntu Focal): | |
status: | In Progress → Fix Committed |
tags: | added: verification-needed verification-needed-focal |

Ibrahim Awwal (ibrahim-awwal) wrote (last edit ): | #24 |
For those on Bionic/18.04, it looks like the fix hasn't made it back to bionic yet so there's no package to install for Bionic at the moment.
Depending on how you're using Amazon Linux and/or ECS, you may be able to work around the issue by temporarily rebuilding a base image outside of ECS with a different kernel version, making sure to install libc6 in that base image, and using that image for any builds that occur under an Amazon Linux kernel.

Ubuntu SRU Bot (ubuntu-sru-bot) wrote : Autopkgtest regression report (glibc/2.31-0ubuntu9.8) | #25 |
All autopkgtests for the newly accepted glibc (2.31-0ubuntu9.8) for focal have finished running.
The following regressions have been reported in tests triggered by the package:
ruby-stackprof/
sphinxbase/
r-cran-ps/1.3.2-2 (s390x)
linux-hwe-
mercurial/
linux-hwe-
mbedtls/
libreoffice/
ruby-ferret/
cross-toolchain
Please visit the excuses page listed below and investigate the failures, proceeding afterwards as per the StableReleaseUp
https:/
[1] https:/
Thank you!

Steve Langasek (vorlon) wrote : Please test proposed package | #26 |
Hello Michael, or anyone else affected,
Accepted glibc into focal-proposed. The package will build now and be available at https:/
Please help us by testing this new package. See https:/
If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-
Further information regarding the verification process can be found at https:/
N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Ubuntu SRU Bot (ubuntu-sru-bot) wrote : Autopkgtest regression report (glibc/2.31-0ubuntu9.9) | #27 |
All autopkgtests for the newly accepted glibc (2.31-0ubuntu9.9) for focal have finished running.
The following regressions have been reported in tests triggered by the package:
hilive/2.0a-3build2 (arm64)
tomb/2.7+dfsg2-1 (arm64)
linux-hwe-
bali-phy/
smalt/0.7.6-9 (ppc64el)
mariadb-
feersum/1.407-2 (s390x)
kopanocore/
r-cran-ps/1.3.2-2 (s390x, ppc64el)
libreoffice/
imagemagick/
ruby-stackprof/
gnome-photos/
linux-azure-
linux-intel-
php-luasandbox/
mbedtls/
cross-toolchain
rtags/2.37-1 (amd64)
gvfs/1.
linux-oem-
linux-azure-
mercurial/
r-cran-
s3ql/3.
snapd/2.
sphinxbase/
gemma/0.98.1+dfsg-1 (armhf)
Please visit the excuses page listed below and investigate the failures, proceeding afterwards as per the StableReleaseUp
https:/
[1] https:/
Thank you!

Konrad Dear (kon-rad) wrote : | #28 |
Hi,
Is it possible to add this fix to bionic-backport please? I'm happy to test and confirm the fix works if required.
It looks harmless to me: https:/
Thank you.

Adam Kaminski (thimslugga) wrote : | #29 |
I did some testing and I didn't run into any issues after updating to the newer libc6 from -proposed. Looks good.
FROM ubuntu:focal
ENV DEBIAN_FRONTEND noninteractive
RUN mv /bin/uname /bin/uname.orig
RUN printf '#!/bin/bash\n\nif [[ "$1" == "-r" ]] ;then\n echo '5.4.277-277'\n exit\nelse\n uname.orig "$@"\nfi' > /bin/uname
RUN chmod 755 /bin/uname
RUN echo "deb http://
RUN apt-get update && apt-get upgrade -y libc6
RUN apt-get install --reinstall libc6
docker build -t ${USER}:focal-libc6 .
tags: | added: fr-2274 |

Michael Hudson-Doyle (mwhudson) wrote : | #30 |
Hello, could someone affected by this bug test the version of glibc in focal-proposed? We had to rebuild the package for unrelated reasons.

Michael Hudson-Doyle (mwhudson) wrote : | #31 |
Verified on an AL2 instance:
root@19bea50a89
4.14.275-
root@19bea50a89
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 1 not upgraded.
Need to get 2714 kB of archives.
After this operation, 0 B of additional disk space will be used.
Get:1 http://
Fetched 2714 kB in 0s (16.7 MB/s)
debconf: delaying package configuration, since apt-utils is not installed
(Reading database ... 4127 files and directories currently installed.)
Preparing to unpack .../libc6_
debconf: unable to initialize frontend: Dialog
debconf: (No usable dialog-like program is installed, so the dialog based frontend cannot be used. at /usr/share/
ne 76.)
debconf: falling back to frontend: Readline
debconf: unable to initialize frontend: Readline
debconf: (Can't locate Term/ReadLine.pm in @INC (you may need to install the Term::ReadLine module) (@INC contains: /etc/perl /usr/local/
linux-gnu/
are/perl/5.30 /usr/local/
debconf: falling back to frontend: Teletype
ERROR: Your kernel version indicates a revision number
of 255 or greater. Glibc has a number of built in
assumptions that this revision number is less than 255.
If you\'ve built your own kernel, please make sure that any
custom version numbers are appended to the upstream
kernel number with a dash or some other delimiter.
dpkg: error processing archive /var/cache/
new libc6:amd64 package pre-installation script subprocess returned error exit status 1
Errors were encountered while processing:
/var/cache/
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@19bea50a89
Reading package lists... Done
Building dependency tree
Reading state information... Done
Selected version '2.31-0ubuntu9.9' (Ubuntu:
Selected version '2.31-0ubuntu9.9' (Ubuntu:
Suggested packages:
manpages glibc-doc locales
The following packages will be upgraded:
libc-bin libc6
2 upgraded, 0 newly installed, 0 to remove and 6 not upgraded.
Need to get 3356 kB of archives.
After this operation, 7168 B of additional disk space will be used.
Get:1 http://
Get:2 http://
Fetched 3356 kB in 0s (18.6 MB/s)
debconf: delaying package configuration, since apt-utils is not installed
(Reading database ... 4981 files and directories c...
tags: |
added: verification-done-focal removed: verification-needed verification-needed-focal |

Chris Halse Rogers (raof) wrote : Update Released | #32 |
The verification of the Stable Release Update for glibc has completed successfully and the package is now being released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Launchpad Janitor (janitor) wrote : | #33 |
This bug was fixed in the package glibc - 2.31-0ubuntu9.9
---------------
glibc (2.31-0ubuntu9.9) focal; urgency=medium
* Disable testsuite on riscv64. It is failing maths tests intermittently in
ways that cannot be a glibc regression and is disabled in later series
anyway.
glibc (2.31-0ubuntu9.8) focal; urgency=medium
* Update for 20.04. (LP: #1951033)
[ Balint Reczey ]
* Cherry-pick upstream patch to fix building with -moutline-atomics
* Prevent rare deadlock in pthread_cond_signal (LP: #1899800)
[ Matthias Klose ]
* Revert: Use DH_COMPAT=8 for dh_strip to fix debug sections for valgrind.
Enables debugging ld.so related issues. (LP: #1918035)
* Don't strip ld.so on armhf. (LP: #1927192)
[ Gunnar Hjalmarsson ]
* d/local/
[ Heitor Alves de Siqueira ]
* d/p/u/git-
- Fix memcpy() performance regression on x86 AMD systems (LP: #1928508)
[ Aurelien Jarno ]
* debian/
> 255 now that glibc and preinstall script are fixed. (LP: #1962225)
[ Michael Hudson-Doyle ]
* libc6 on arm64 is now built with -moutline-atomics so libc6-lse can now be
an empty package that is safe to remove. (LP: #1912652)
* d/patches/
improvements. (LP: #1951032)
* Add test-float64x-yn to xfails on riscv64.
-- Michael Hudson-Doyle <email address hidden> Thu, 07 Apr 2022 13:24:41 +1200
Changed in glibc (Ubuntu Focal): | |
status: | Fix Committed → Fix Released |

Robie Basak (racb) wrote : Please test proposed package | #34 |
Hello Michael, or anyone else affected,
Accepted glibc into bionic-proposed. The package will build now and be available at https:/
Please help us by testing this new package. See https:/
If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-
Further information regarding the verification process can be found at https:/
N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.
Changed in glibc (Ubuntu Bionic): | |
status: | Confirmed → Fix Committed |
tags: | added: verification-needed verification-needed-bionic |

Michael Hudson-Doyle (mwhudson) wrote : | #35 |
Verified that libc6 2.27-3ubuntu1.6 can be installed fine in a bionic docker container an Amazon Linux 2 system with the problematic kernel version:
root@eef8e8932f
Reading package lists... Done
Building dependency tree
Reading state information... Done
Suggested packages:
glibc-doc locales
The following packages will be upgraded:
libc6
1 upgraded, 0 newly installed, 0 to remove and 5 not upgraded.
Need to get 2831 kB of archives.
After this operation, 1024 B disk space will be freed.
Get:1 http://
Fetched 2831 kB in 1s (3348 kB/s)
debconf: delaying package configuration, since apt-utils is not installed
(Reading database ... 4140 files and directories currently installed.)
Preparing to unpack .../libc6_
debconf: unable to initialize frontend: Dialog
debconf: (No usable dialog-like program is installed, so the dialog based frontend cannot be used. at /usr/share/
debconf: falling back to frontend: Readline
debconf: unable to initialize frontend: Readline
debconf: (Can't locate Term/ReadLine.pm in @INC (you may need to install the Term::ReadLine module) (@INC contains: /etc/perl /usr/local/
/usr/lib/
f/FrontEnd/
debconf: falling back to frontend: Teletype
Unpacking libc6:amd64 (2.27-3ubuntu1.6) over (2.27-3ubuntu1.5) ...
Setting up libc6:amd64 (2.27-3ubuntu1.6) ...
debconf: unable to initialize frontend: Dialog
debconf: (No usable dialog-like program is installed, so the dialog based frontend cannot be used. at /usr/share/
debconf: falling back to frontend: Readline
debconf: unable to initialize frontend: Readline
debconf: (Can't locate Term/ReadLine.pm in @INC (you may need to install the Term::ReadLine module) (@INC contains: /etc/perl /usr/local/
/usr/lib/
f/FrontEnd/
debconf: falling back to frontend: Teletype
Processing triggers for libc-bin (2.27-3ubuntu1.5) ...
root@eef8e8932f
4.14.275-
tags: |
added: verification-done-bionic removed: verification-needed verification-needed-bionic |

Ubuntu SRU Bot (ubuntu-sru-bot) wrote : Autopkgtest regression report (glibc/2.27-3ubuntu1.6) | #36 |
All autopkgtests for the newly accepted glibc (2.27-3ubuntu1.6) for bionic have finished running.
The following regressions have been reported in tests triggered by the package:
docker.
sbd/1.3.1-2 (amd64)
chromium-
pymol/1.
nvidia-
pgbouncer/
r-cran-
firefox/
python-
c-icap/1:0.4.4-1 (ppc64el)
givaro/
apport/
threadweaver/
apt/1.6.14 (arm64)
containerd/
glibc/2.
cura-engine/
Please visit the excuses page listed below and investigate the failures, proceeding afterwards as per the StableReleaseUp
https:/
[1] https:/
Thank you!

Launchpad Janitor (janitor) wrote : | #37 |
This bug was fixed in the package glibc - 2.27-3ubuntu1.6
---------------
glibc (2.27-3ubuntu1.6) bionic; urgency=medium
[ Gunnar Hjalmarsson ]
* d/local/
[ Aurelien Jarno ]
* debian/
> 255 now that glibc and preinstall script are fixed. (LP: #1962225)
-- Michael Hudson-Doyle <email address hidden> Tue, 03 May 2022 22:19:39 +1200
Changed in glibc (Ubuntu Bionic): | |
status: | Fix Committed → Fix Released |
Status changed to 'Confirmed' because the bug affects multiple users.