Ubuntu

libc6 update for Edgy fails due to sanity check

Reported by Paul Smith on 2007-01-23
30
Affects Status Importance Assigned to Milestone
glibc (Ubuntu)
Undecided
Unassigned
Nominated for Hardy by dbox307
Dapper
High
Fabio Massimo Di Nitto

Bug Description

The preinst script in libc6 (and variants) contains a sanity check which is designed to locate improperly-installed components of glibc. Upon finding such a component, it aborts installation of the package.

The system is not harmed in any way by this failure, so DO NOT attempt to "fix" it with dpkg or by moving files by hand. Simply wait for the next update to be available from your local mirror, and install it when it arrives.

There are two problems related to this check:

1. The test contains a bug causing it to be triggered by an unrelated (valid) library provided by the libpthread20 package.

2. Some users have reported occurrences of /usr/lib/libdl.so.2 and /usr/lib/libc.so.6 which trigger the check. These files are NOT provided by any Ubuntu package and their origin is as yet unknown.

For example:

(Reading database ... 160320 files and directories currently installed.)
Preparing to replace libc6-dev 2.4-1ubuntu12 (using .../libc6-dev_2.4-1ubuntu12.2_i386.deb) ...
Unpacking replacement libc6-dev ...
Preparing to replace libc6 2.4-1ubuntu12 (using .../libc6_2.4-1ubuntu12.2_i386.deb) ...
Matching libraries: /usr/lib/libc.so.6 /lib/ld-linux.so.2

A copy of glibc was found in an unexpected directory.
It is not safe to upgrade the C library in this situation;
please remove that copy of the C library and try again.
dpkg: error processing /var/cache/apt/archives/libc6_2.4-1ubuntu12.2_i386.deb (--unpack):
 subprocess pre-installation script returned error exit status 1
Errors were encountered while processing:
 /var/cache/apt/archives/libc6_2.4-1ubuntu12.2_i386.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
A package failed to install. Trying to recover:
dpkg: dependency problems prevent configuration of libc6-dev:
 libc6-dev depends on libc6 (= 2.4-1ubuntu12.2); however:
  Version of libc6 on system is 2.4-1ubuntu12.
dpkg: error processing libc6-dev (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 libc6-dev

Ubuntu does not ship /usr/lib/libc.so.6 and never did or will.

The message is telling you what to do and why it's aborting the upgrade. It's not a bug.

Fabio

Changed in glibc:
status: Unconfirmed → Rejected

it looks like the trigger is another package. Can you please attach the output of dpkg -l > installed_packages ?

Are you running some external installed pkg like nVidia beta binary drivers?

Fabio

Changed in glibc:
status: Rejected → Needs Info

Please also attach /etc/apt/sources.list

Lorenco Trichardt (trichalo) wrote :

Sources list:
deb ftp://archive.ubuntu.com/ubuntu/ edgy main restricted
deb-src ftp://archive.ubuntu.com/ubuntu/ edgy main restricted
deb ftp://archive.ubuntu.com/ubuntu/ edgy-updates main restricted
deb-src ftp://archive.ubuntu.com/ubuntu/ edgy-updates main restricted
deb ftp://archive.ubuntu.com/ubuntu/ edgy universe
deb-src ftp://archive.ubuntu.com/ubuntu/ edgy universe
deb ftp://archive.ubuntu.com/ubuntu/ edgy-backports main restricted universe multiverse
deb-src ftp://archive.ubuntu.com/ubuntu/ edgy-backports main restricted universe multiverse
deb ftp://security.ubuntu.com/ubuntu edgy-security main restricted
deb-src ftp://security.ubuntu.com/ubuntu edgy-security main restricted
#vvvv This is the WINE updates
deb http://wine.budgetdedicated.com/apt edgy main

**********************

sudo apt-get install -f
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following extra packages will be installed:
libc6 libc6-i686
Suggested packages:
glibc-doc
The following packages will be upgraded:
libc6 libc6-i686
2 upgraded, 0 newly installed, 0 to remove and 6 not upgraded.
1 not fully installed or removed.
Need to get 0B/5253kB of archives.
After unpacking 0B of additional disk space will be used.
Do you want to continue [Y/n]? y
(Reading database ... 168137 files and directories currently installed.)
Preparing to replace libc6 2.4-1ubuntu12 (using .../libc6_2.4-1ubuntu12.2_i386.deb) ...
Matching libraries: /usr/lib/libdl.so.2 /lib/ld-linux.so.2

A copy of glibc was found in an unexpected directory.
It is not safe to upgrade the C library in this situation;
please remove that copy of the C library and try again.
dpkg: error processing /var/cache/apt/archives/libc6_2.4-1ubuntu12.2_i386.deb (--unpack):
subprocess pre-installation script returned error exit status 1
Errors were encountered while processing:
/var/cache/apt/archives/libc6_2.4-1ubuntu12.2_i386.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
************************

Paul Smith (psmith-gnu) wrote :

First, I don't agree with your assertion that the message tells you exactly what to do. It says it matched some files, then it says there are extra copies. Are the files it listed the ones that are extra, or the good ones? Etc. That message could be greatly improved by saying explicitly "unknown duplicate versions: ..." instead of just "matched:". Plus if the listed files are wrong then why is /lib/ld-linux.so.2 shown as well? Overall the message generated here is cryptic and in no way leads anyone to a solution, especially since we're talking about libc which anyone who knows anything will be extremely reluctant to change.

Second, I've looked and /usr/lib/libc.so.6 is a symlink to (the real) /lib/libc.so.6, so this "extra version" is really completely innocuous. It seems that the test could be a bit smarter and compare the contents or something to be sure there really are multiple versions, and not just multiple paths to the same version.

Third, I do not have any beta nvidia drivers installed: I'm using the Ubuntu-supported nvidia drivers. However, at one time (back in dapper) I did have the beta versions installed, as the "supported" versions were too old and wouldn't work with my card. I've checked the timestamps on the symlinks, though, and they were created on Nov 10, while the "real" libc has a timestamp of Nov 8, so I don't think these are left from an old package. I also noticed that /usr/lib/libm.so.6 exists with a Nov 10 timestamp and is a symlink pointing to /lib/libm.so.6

On the other hand, I rebooted and after that X wouldn't start; I had to drop back to the open "nv" drivers in order to get it going again. At first it complained about a missing file /usr/lib/xserver/SecurityPolicy, then when I copied /usr/share/doc/xserver-xorg-core/SecurityPolicy to that location it just stopped (no error messages in the log file, but the driver wouldn't start). I get the nvidia splash screen, then it exits. I've dropped back to the "nv" driver and it works (although of course I don't have any acceleration).

One last note: since I tried to upgrade libc my VPN package, which is Juniper's Network Connect, does not work anymore; it gives me an error about "unable to load library libncui.so" (which is a Network Connect shared lib). I am not bothering to look at this until after my libc is upgraded successfully.

Thanks for the reply!

Final debdiff

Matt Zimmerman (mdz) on 2007-01-24
description: updated
description: updated

Paul Smith wrote:

>
> Second, I've looked and /usr/lib/libc.so.6 is a symlink to (the real)
> /lib/libc.so.6, so this "extra version" is really completely innocuous.
> It seems that the test could be a bit smarter and compare the contents
> or something to be sure there really are multiple versions, and not just
> multiple paths to the same version.

This is exactly the problem. Who or what did create these symlinks?

> Third, I do not have any beta nvidia drivers installed:

ok we are trying to understand who did create those symlinks

>
> On the other hand, I rebooted and after that X wouldn't start; I had to
> drop back to the open "nv" drivers in order to get it going again. At
> first it complained about a missing file
> /usr/lib/xserver/SecurityPolicy, then when I copied /usr/share/doc
> /xserver-xorg-core/SecurityPolicy to that location it just stopped (no
> error messages in the log file, but the driver wouldn't start). I get
> the nvidia splash screen, then it exits. I've dropped back to the "nv"
> driver and it works (although of course I don't have any acceleration).

You shouldn't copy stuff around at random. SecurityPolicy is something that you
can't just copy around without making it fits to your system. Anyway it is
outside the scope of this bug.

>
> One last note: since I tried to upgrade libc my VPN package, which is
> Juniper's Network Connect, does not work anymore; it gives me an error
> about "unable to load library libncui.so" (which is a Network Connect
> shared lib). I am not bothering to look at this until after my libc is
> upgraded successfully.

Is this software available for download? It might be the reason why there are
those symlinks around and I'd like to give it a check.

Fabio

Matt Zimmerman (mdz) wrote :

The attached list of installed packages includes the following third-party software:

fetchnotes ibm-j2re1.5 ibmwc ibmwc-gui ilc libbtctl2 libnotes0 mts-client skype sun-j2se5.0-jre-binary tacacsclient w32codec

It is possible that one of these packages includes in appropriate files which trigger this check. Please run:

dpkg -S /usr/lib/libc.so.6

and inform us of any other third-party software you have installed.

Colin Watson (cjwatson) wrote :

Lorenco: the packages mentioned by mdz are not in the sources.list you provided. Did you at one point have other repositories enabled?

Lorenco Trichardt (trichalo) wrote :

If I search for libdl.so.2 ld-linux.so.2 inside the deb's in my apt cache I get the following:
 libdl.so.2
*********
Doing libc6_2.4-1ubuntu12.2_i386.deb now
lrwxrwxrwx root/root 0 2007-01-22 21:54 ./lib/libdl.so.2 -> libdl-2.4.so
Doing libc6-dev_2.4-1ubuntu12.2_i386.deb now
lrwxrwxrwx root/root 0 2007-01-22 21:54 ./usr/lib/libdl.so -> /lib/libdl.so.2
Doing libc6-i686_2.4-1ubuntu12.2_i386.deb now
lrwxrwxrwx root/root 0 2007-01-22 21:55 ./lib/tls/i686/cmov/libdl.so.2 -> libdl-2.4.so

ld-linux.so.2
***********
Doing libc6_2.4-1ubuntu12.2_i386.deb now
lrwxrwxrwx root/root 0 2007-01-22 21:54 ./lib/ld-linux.so.2 -> ld-2.4.so
Doing libc6-i686_2.4-1ubuntu12.2_i386.deb now
lrwxrwxrwx root/root 0 2007-01-22 21:55 ./lib/tls/i686/cmov/ld-linux.so.2 -> ld-2.4.so

Matt Zimmerman (mdz) on 2007-01-24
description: updated

On Wed, Jan 24, 2007 at 02:00:25PM -0000, Lorenco Trichardt wrote:
> If I search for libdl.so.2 ld-linux.so.2 inside the deb's in my apt cache I get the following:

All of those are normal and in the correct locations.

--
 - mdz

Paul Smith (psmith-gnu) wrote :

dpkg -S was the very first thing I did but:
~$ dpkg -S /usr/lib/libc.so.6
dpkg: /usr/lib/libc.so.6 not found.

The link might have been created by some post-install script.

Matt: which package list are you referring to? I don't have any of the extra packages you listed installed on my box so you must be referring to the list added in a comment by Lorenco Trichardt. Note that his error has to do with /usr/lib/libdl, while mine is related to /usr/lib/libc.so.6. I checked and I don't have a /usr/lib/libdl.so.2 on my system at all, so while his symptoms might be the same as my bug (this bug), the underlying cause is not the same. I don't know whether it's useful to open a second bug for the libdl problem or not.

I don't know if the Juniper Network Connect is available for download generally, but I don't think this is the problem. The dates on the symlinks don't match up, and I ran ldd on the executables and all of them find /lib/libc, /lib/libm, /lib/libpthread, and /lib/libdl:

libncui.so:
        linux-gate.so.1 => (0xffffe000)
        libdl.so.2 => /lib/libdl.so.2 (0xb7ed8000)
        libz.so.1 => /usr/lib/libz.so.1 (0xb7ec4000)
        libpthread.so.0 => /lib/libpthread.so.0 (0xb7eb0000)
        libstdc++-libc6.2-2.so.3 => /usr/lib/libstdc++-libc6.2-2.so.3 (0xb7e68000)
        libm.so.6 => /lib/libm.so.6 (0xb7e43000)
        libc.so.6 => /lib/libc.so.6 (0xb7d23000)
        /lib/ld-linux.so.2 (0x80000000)
ncdiag:
        linux-gate.so.1 => (0xffffe000)
        libpthread.so.0 => /lib/libpthread.so.0 (0xb7ee6000)
        libstdc++-libc6.2-2.so.3 => /usr/lib/libstdc++-libc6.2-2.so.3 (0xb7e9e000)
        libm.so.6 => /lib/libm.so.6 (0xb7e78000)
        libc.so.6 => /lib/libc.so.6 (0xb7d58000)
        /lib/ld-linux.so.2 (0xb7f0a000)
ncsvc:
        linux-gate.so.1 => (0xffffe000)
        libdl.so.2 => /lib/libdl.so.2 (0xb7f0a000)
        libz.so.1 => /usr/lib/libz.so.1 (0xb7ef6000)
        libpthread.so.0 => /lib/libpthread.so.0 (0xb7ee2000)
        libstdc++-libc6.2-2.so.3 => /usr/lib/libstdc++-libc6.2-2.so.3 (0xb7e9a000)
        libm.so.6 => /lib/libm.so.6 (0xb7e75000)
        libc.so.6 => /lib/libc.so.6 (0xb7d55000)
        /lib/ld-linux.so.2 (0xb7f1f000)

Fabio Massimo Di Nitto wrote:
> Please also attach /etc/apt/sources.list
>
>

# deb cdrom:[Ubuntu 6.10 _Edgy Eft_ - Release i386 (20061025)]/ edgy main restricted

deb http://ca.archive.ubuntu.com/ubuntu/ edgy main restricted universe multiverse
deb-src http://ca.archive.ubuntu.com/ubuntu/ edgy main restricted universe multiverse

## Major bug fix updates produced after the final release of the
## distribution.
deb http://ca.archive.ubuntu.com/ubuntu/ edgy-updates main restricted universe multiverse
deb-src http://ca.archive.ubuntu.com/ubuntu/ edgy-updates main restricted universe multiverse

## Uncomment the following two lines to add software from the 'universe'
## repository.
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## universe WILL NOT receive any review or updates from the Ubuntu security
## team.
# deb http://ca.archive.ubuntu.com/ubuntu/ edgy universe
# deb-src http://ca.archive.ubuntu.com/ubuntu/ edgy universe

## Uncomment the following two lines to add software from the 'backports'
## repository.
## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
# deb http://ca.archive.ubuntu.com/ubuntu/ edgy-backports main restricted universe multiverse
# deb-src http://ca.archive.ubuntu.com/ubuntu/ edgy-backports main restricted universe multiverse

deb http://security.ubuntu.com/ubuntu edgy-security main restricted universe multiverse
deb-src http://security.ubuntu.com/ubuntu edgy-security main restricted universe multiverse
# deb http://security.ubuntu.com/ubuntu edgy-security universe
# deb-src http://security.ubuntu.com/ubuntu edgy-security universe
deb http://www.getautomatix.com/apt edgy main

#AUTOMATIX REPOS START

deb http://archive.canonical.com/ubuntu dapper-commercial main

deb http://archive.ubuntu.com/ubuntu edgy-backports main restricted universe multiverse

deb http://archive.ubuntu.com/ubuntu edgy-updates main restricted universe multiverse

deb http://archive.ubuntu.com/ubuntu edgy-security main restricted universe multiverse

deb http://archive.ubuntu.com/ubuntu edgy main restricted universe multiverse
#AUTOMATIX REPOS END

Paul Smith wrote:
> dpkg -S was the very first thing I did but:
> ~$ dpkg -S /usr/lib/libc.so.6
> dpkg: /usr/lib/libc.so.6 not found.
>
> The link might have been created by some post-install script.

Paul could you be so kind to do a grep in /var/lib/dpkg/info to see
if you can figure out what created those symlinks?
I wonder if also something that you might have built/installed locally from
source could have created those symlinks.

It seems like different pkgs are creating different symlinks and triggering the
check in glibc that we are turning into a warning now.

Fabio

Lorenco Trichardt (trichalo) wrote :

> Did you at one point have other repositories enabled?
Yes... I have a local repository that contains a couple of IBM internal debs and alienated debs from elsewhere as well as a temp link (comment out) of an Internal IBM repositories...

The check for local debs returned a blank (see attachment for all packages searched)
But will quickly check the IBM repository (installed software)
This will include only (i think) - ibm-j2re1.5 ibmwc ibmwc-gui

Those are all listed below:

> The attached list of installed packages includes the following third-party software:
> fetchnotes ibm-j2re1.5 ibmwc ibmwc-gui ilc libbtctl2 libnotes0 mts-client skype
> sun-j2se5.0-jre-binary tacacsclient w32codec

Sorry missed the last portion of the sources list :

deb file:/media/data/linux/debs stable main
#deb http://olymp.hursley.ibm.com/dc4eb/ stable main contrib non-free
#deb http://olymp.hursley.ibm.com/dc4eb/ testing main contrib non-free
#deb http://olymp.hursley.ibm.com/dc4eb/ unstable main contrib non-free
#deb http://watgsa.ibm.com/projects/l/lud/ cloud main

Matt Zimmerman (mdz) wrote :

On Wed, Jan 24, 2007 at 02:47:34PM -0000, Paul Smith wrote:
> dpkg -S was the very first thing I did but:
> ~$ dpkg -S /usr/lib/libc.so.6
> dpkg: /usr/lib/libc.so.6 not found.
>
> The link might have been created by some post-install script.
>
> Matt: which package list are you referring to? I don't have any of the
> extra packages you listed installed on my box so you must be referring
> to the list added in a comment by Lorenco Trichardt.

Correct; his was attached first, and if yours was there, I didn't see it
until later.

> Note that his error has to do with /usr/lib/libdl, while mine is related
> to /usr/lib/libc.so.6. I checked and I don't have a /usr/lib/libdl.so.2
> on my system at all, so while his symptoms might be the same as my bug
> (this bug), the underlying cause is not the same. I don't know whether
> it's useful to open a second bug for the libdl problem or not.

It is not necessary to open a separate bug; there is only one issue as far
as Ubuntu is concerned (though more than one invalid configuration may
trigger it).

> I don't know if the Juniper Network Connect is available for download
> generally, but I don't think this is the problem. The dates on the
> symlinks don't match up, and I ran ldd on the executables and all of
> them find /lib/libc, /lib/libm, /lib/libpthread, and /lib/libdl:

What is the date on the /usr/lib/libc.so.6 symlink, and does it correspond
with anything else on the system which might provide a clue about where it
came from?

--
 - mdz

Matt Zimmerman (mdz) wrote :

You could also try a brute-force approach of grepping all binaries on your system to search for this string. if we can find out where these files come from, we can warn other users about the potential for problems.

Lorenco Trichardt (trichalo) wrote :

I enabled the commented out repos (IBM ones) ran an update and is now running the following command for all three files:

for p in `dpkg -l | awk {' print $2 '};`; do echo "Doing $p now"; dpkg-query -L $p | grep "libc.so.6" ;done > libc.so.6.output &

replacing libc.so.6 with
ld-linux.so.2

and
libdl.so.2

Ill post the output when done... Any thing else I need to search for ?

Matt Zimmerman (mdz) wrote :

It would be better to search the entire system, as it is entirely possible that the file was not created by a .deb, whether official or unofficial.

if you find something using that type of search, it's easy to determine whether it came from a package after the fact.

Paul Smith (psmith-gnu) wrote :

I checked /var/lib/dpkg/info, grepping for libc.so, and no hits.

Those symlinks were created on Nov 10. I created temp files with timestamps at the beginning and end of the hour they were created, and did a find for all files between those stamps. The only hits were those symlinks and some temporary files, etc. in my home directory. Nothing gives me any clues as to how those symlinks got there. I don't remember creating them myself.

It's definitely a mystery :-/.

Paul Smith (psmith-gnu) wrote :

FYI, I did an update and then installed, and now I get these messages but they're warnings and the packages installed properly.

I'm going to delete these symlinks on my system and see if I can figure out what is using them (if something doesn't work anymore after I delete them then I guess I know!)

SnowX (snowx1000) wrote :

I have attached the output of zgrep pthread /var/log/dpkg.log* to see if it can help.

Lorenco Trichardt (trichalo) wrote :

Was wondering..... what is the common denominator in people that have the libs, I have a couple of SW packages installed (but not on Oct 25 that I remember when the two libs link were created...)
Examples:
vmware-server.... (had to install build essential for this to compile new kernel mod)
Couple of IBM apps... like WECM (IBM mobility Client VPN solution)
Anybody have these ?

Another thing that makes me wonder.... Why is it that if I remove these links all commands stop working....

If I search for these to libs (grep -R from /) I get links to /bin/*sh and a couple of other base packages ? This seems part of the core....

Being not too clever and slow I might be missing it ? How can another app use these libs and links of they are needed by the base system.

Please explain... (I also include the listing below of all the ls listings to these libs)

On the problematic libs:
libc.so.6 <- I do not have this lib....
ld-linux.so.2 <- This lib was installed the day after I reinstalled my laptop (24 Oct)
libdl.so.2 <- This lib was installed the day I reinstalled my laptop (24 Oct)

listing the links:
 ls -ltra /lib/libdl*
-rw-r--r-- 1 root root 9640 2007-01-24 18:49 /lib/libdl-2.4.so
lrwxrwxrwx 1 root root 12 2007-01-25 04:38 /lib/libdl.so.2 -> libdl-2.4.so

ls -ltra /usr/lib/libdl*
-rw-r--r-- 1 root root 15652 2006-10-04 11:39 /usr/lib/libdlm.so.2.0
-rw-r--r-- 1 root root 10496 2006-10-04 11:39 /usr/lib/libdlm_lt.so.2.0
lrwxrwxrwx 1 root root 13 2006-10-23 18:49 /usr/lib/libdlm.so.2 -> libdlm.so.2.0
lrwxrwxrwx 1 root root 16 2006-10-23 18:49 /usr/lib/libdlm_lt.so.2 -> libdlm_lt.so.2.0
lrwxrwxrwx 1 root root 17 2006-10-24 12:35 /usr/lib/libdl.so.2 -> /usr/lib/libdl.so
-rw-r--r-- 1 root root 8342 2007-01-24 18:49 /usr/lib/libdl.a
lrwxrwxrwx 1 root root 15 2007-01-25 04:38 /usr/lib/libdl.so -> /lib/libdl.so.2

The problem can affect dapper too.

Changed in glibc:
assignee: nobody → fabbione
importance: Undecided → High
status: Unconfirmed → Confirmed

Fixed in feisty and edgy.

Changed in glibc:
status: Needs Info → Fix Released
Martin Pitt (pitti) wrote :

Debdiff approved for dapper-proposed, please go ahead and upload, and set to 'in progress'.

Upload to dapper-proposed done. Subbed ubuntu-archive to process the source.

Changed in glibc:
status: Confirmed → In Progress
Martin Pitt (pitti) wrote :

Accepted into dapper-proposed.

Changed in glibc:
status: In Progress → Fix Committed
Simon Law (sfllaw) wrote :

Fix regression tested and approved for dapper-updates. Please upload it on 2 February 2007.

Thanks.

debdiff glibc_2.3.6-0ubuntu20.3.dsc
glibc_2.3.6-0ubuntu20.4.dsc
diff -u glibc-2.3.6/debian/changelog glibc-2.3.6/debian/changelog
--- glibc-2.3.6/debian/changelog
+++ glibc-2.3.6/debian/changelog
@@ -1,3 +1,11 @@
+glibc (2.3.6-0ubuntu20.4) dapper-updates; urgency=low
+
+ * No change upload to propagate 20.3 to dapper-updates.
+
+ Fix tested by Fabio M. Di Nitto and Simon Law.
+
+ -- Fabio M. Di Nitto <email address hidden> Fri, 02 Feb 2007 15:37:22 +0100
+
 glibc (2.3.6-0ubuntu20.3) dapper-proposed; urgency=low

   * Turn libc6 duplication check from an error to a warning and

Martin Pitt (pitti) wrote :

Accepted into dapper-updates, thank you!

Changed in glibc:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Related blueprints