[Bug 1989082] Re: execute bit is missing on libc.so.6

Simon Chopin 1989082 at bugs.launchpad.net
Mon Jun 5 13:47:50 UTC 2023


I adjusted the test plan to use a slightly modified version of your
script, thanks!

** Description changed:

  [Impact]
  Starting with Ubuntu 22.04 the execute bit is no longer set on /lib/x86_64-linux-gnu/libc.so.6. This causes trouble for some scripts that try to determine the glibc version by executing this file, for instance the LSF scheduler.
  
  [Proposed fix]
  
  Adjust the build system to chmod the library after the fixperms stage.
  This has been fixed in Debian, although it's not easily cherry-pickable.
  
  [Test plan]
  
- $ /lib/x86_64-linux-gnu/libc.so.6
+ Run the following script:
  
- -> This should print something similar to this:
- GNU C Library (Ubuntu GLIBC 2.35-0ubuntu3.1) stable release version 2.35.
- Copyright (C) 2022 Free Software Foundation, Inc.
- This is free software; see the source for copying conditions.
- There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
- PARTICULAR PURPOSE.
- Compiled by GNU CC version 11.2.0.
- libc ABIs: UNIQUE IFUNC ABSOLUTE
- For bug reporting instructions, please see:
- <https://bugs.launchpad.net/ubuntu/+source/glibc/+bugs>.
+ ```
+ #!/bin/bash
+ 
+ for glibc in `ldconfig -p | grep libc.so.6 | sed 's/.*=>//'`
+ do
+     if [ -x "$glibc" ] ; then
+         $glibc >/dev/null 2>&1
+         if [ "$?" != "0" ] ; then
+             continue
+         fi
+         _libcver=`$glibc 2>/dev/null | grep "GNU C Library" | awk '{print $10}' | awk -F. '{print $2}' | sed 's/,//'`
+     fi
+     if [ "$_libcver" != "" ] ; then
+         echo "GLibc minor version is $_libcver"
+         break
+     fi
+ done
+ if [ "$_libcver" = "" ] ; then
+     echo "Cannot figure out the GLibc version."
+     exit 1
+ fi
+ ```
+ 
+ On Focal, it prints out the following:
+   GLibc minor version is 31
+ 
+ On Jammy:
+   Cannot figure out the GLibc version.
+ Expected:
+   GLibc minor version is 35
  
  [Regression potential]
  
  This change is fairly minimal, but could expose bugs in codepaths that
  were depending on the system version of glibc and were thus far dormant
  in Jammy.

-- 
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/1989082

Title:
  execute bit is missing on libc.so.6

Status in glibc package in Ubuntu:
  Triaged
Status in glibc source package in Jammy:
  In Progress
Status in glibc source package in Kinetic:
  Won't Fix
Status in glibc source package in Lunar:
  Won't Fix

Bug description:
  [Impact]
  Starting with Ubuntu 22.04 the execute bit is no longer set on /lib/x86_64-linux-gnu/libc.so.6. This causes trouble for some scripts that try to determine the glibc version by executing this file, for instance the LSF scheduler.

  [Proposed fix]

  Adjust the build system to chmod the library after the fixperms stage.
  This has been fixed in Debian, although it's not easily cherry-
  pickable.

  [Test plan]

  Run the following script:

  ```
  #!/bin/bash

  for glibc in `ldconfig -p | grep libc.so.6 | sed 's/.*=>//'`
  do
      if [ -x "$glibc" ] ; then
          $glibc >/dev/null 2>&1
          if [ "$?" != "0" ] ; then
              continue
          fi
          _libcver=`$glibc 2>/dev/null | grep "GNU C Library" | awk '{print $10}' | awk -F. '{print $2}' | sed 's/,//'`
      fi
      if [ "$_libcver" != "" ] ; then
          echo "GLibc minor version is $_libcver"
          break
      fi
  done
  if [ "$_libcver" = "" ] ; then
      echo "Cannot figure out the GLibc version."
      exit 1
  fi
  ```

  On Focal, it prints out the following:
    GLibc minor version is 31

  On Jammy:
    Cannot figure out the GLibc version.
  Expected:
    GLibc minor version is 35

  [Regression potential]

  This change is fairly minimal, but could expose bugs in codepaths that
  were depending on the system version of glibc and were thus far
  dormant in Jammy.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/glibc/+bug/1989082/+subscriptions




More information about the foundations-bugs mailing list