Bug#882255: libc6-amd64: Multilib causes catastrophic system failure during upgrade to libc 2.25
- To: Aurelien Jarno <aurelien@aurel32.net>
- Cc: 882255@bugs.debian.org
- Subject: Bug#882255: libc6-amd64: Multilib causes catastrophic system failure during upgrade to libc 2.25
- From: Mikulas Patocka <mikulas@twibright.com>
- Date: Sat, 2 Dec 2017 03:34:52 +0100 (CET)
- Message-id: <[🔎] alpine.DEB.2.02.1712020330060.21008@leontynka>
- Reply-to: Mikulas Patocka <mikulas@twibright.com>, 882255@bugs.debian.org
- In-reply-to: <20171126000358.4oo3zzgpfbsl5yvv@aurel32.net>
- References: <151120161151.4000.12829575246333417808.reportbug@Debian> <20171120222413.tngmxcv7kyqwsecm@aurel32.net> <alpine.DEB.2.02.1711202355050.32748@leontynka> <20171120233431.d5ykzgi5rpcgk5ny@aurel32.net> <alpine.DEB.2.02.1711210054030.586@leontynka> <20171121001252.kyu7kxbtfyheledi@aurel32.net> <151120161151.4000.12829575246333417808.reportbug@Debian> <alpine.DEB.2.02.1711210136550.815@leontynka> <20171126000358.4oo3zzgpfbsl5yvv@aurel32.net> <151120161151.4000.12829575246333417808.reportbug@Debian>
On Sun, 26 Nov 2017, Aurelien Jarno wrote:
> > > You mean that even now running 'ldconfig' followed by 'ldd /bin/true'
> > > will give you
> > > libc.so.6 => /lib64/libc.so.6
> > > instead of
> > > libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6
> > > ?
> >
> > Yes.
> > # ldd /bin/true
> > linux-vdso.so.1 (0x00007ffc62b5a000)
> > libc.so.6 => /lib64/libc.so.6 (0x00007fd870377000)
> > /lib64/ld-linux-x86-64.so.2 (0x00007fd870921000)
> >
> > If I use the --inhibit-cache flag, it points to the correct location:
> > # /lib64/ld-linux-x86-64.so.2 --list --inhibit-cache /bin/true
> > linux-vdso.so.1 (0x00007ffd566e4000)
> > libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f73026c8000)
> > /lib64/ld-linux-x86-64.so.2 (0x00007f7302c73000)
> >
> > Without --inhibit-cache, it points to /lib64/libc.so.6
> > # /lib64/ld-linux-x86-64.so.2 --list /bin/true
> > linux-vdso.so.1 (0x00007ffd5ad10000)
> > libc.so.6 => /lib64/libc.so.6 (0x00007fc566092000)
> > /lib64/ld-linux-x86-64.so.2 (0x00007fc56663c000)
>
> I am still unable to reproduce this problem. On my system
> lib/x86_64-linux-gnu/ is preferred over lib64. ldconfig uses glob to to
> interpret the "*.conf" in /etc/ld.so.conf, so the files are sorted
> alphabetically and thus the zz_amd64-biarch-compat.conf should appear
> last.
>
> It would be interesting to check at the order in the cache, using
> "ldconfig -p | grep libc.so". Could you please provide that output?
>
> Thanks,
> Aurelien
# ldconfig -p | grep libc.so
libc.so.6 (libc6,x32, ABI OS: Linux 3.4.0) => /lib/x86_64-linux-gnux32/libc.so.6
libc.so.6 (libc6,x86-64, ABI OS: Linux 3.2.0) => /lib64/libc.so.6
libc.so.6 (libc6,x86-64, ABI OS: Linux 2.6.32) => /lib/x86_64-linux-gnu/libc.so.6
libc.so.6 (libc6, ABI OS: Linux 3.2.0) => /lib32/libc.so.6
libc.so.6 (libc6, ABI OS: Linux 2.6.32) => /lib/i386-linux-gnu/libc.so.6
The problem is caused by the "ABI OS" field - the libraries in /lib64 have
higher field than the libraries in /lib/x86_64-linux-gnu/
If I comment out this piece of code in the function compare in the file
glibc/elf/cache.c, the problem goes away and the linker will prefer
libraries in /lib/x86_64-linux-gnu/ and /lib/i386-linux-gnu/.
/*
if (e2->osversion > e1->osversion)
return 1;
if (e2->osversion < e1->osversion)
return -1;
*/
Mikulas
Reply to: