Debian Bug report logs - #161788
libc6 always loads i686 libraries from cache when available, ignoring the host arch

version graph

Package: libc6; Maintainer for libc6 is GNU Libc Maintainers <debian-glibc@lists.debian.org>; Source for libc6 is src:eglibc.

Reported by: Andrew Suffield <asuffield@debian.org>

Date: Sat, 21 Sep 2002 16:03:02 UTC

Severity: grave

Tags: sid

Merged with 161700, 161717, 161720, 161740, 161773, 161774, 161786, 161813

Fixed in version glibc/2.2.5-15

Done: GOTO Masanori <gotom@debian.or.jp>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, libssl0.9.6@packages.debian.org, GNU Libc Maintainers <debian-glibc@lists.debian.org>, glibc@packages.qa.debian.org:
Bug#161788; Package libc6. Full text and rfc822 format available.

Acknowledgement sent to Andrew Suffield <asuffield@debian.org>:
New Bug report received and forwarded. Copy sent to libssl0.9.6@packages.debian.org, GNU Libc Maintainers <debian-glibc@lists.debian.org>, glibc@packages.qa.debian.org. Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: Andrew Suffield <asuffield@debian.org>
To: submit@bugs.debian.org
Subject: libc6 always loads i686 libraries from cache when available, ignoring the host arch
Date: Sat, 21 Sep 2002 16:59:58 +0100
[Message part 1 (text/plain, inline)]
Package: libc6
Severity: grave

Here's a cute one. On any i386 platform, when there is an
i686-specific library in ld.so.cache, libc6 will prefer it over all
other libraries in the cache, even if the local system is really
i[345]86.

The problem is specific to cached libraries, and should not occur on
other architectures.

This causes the latest version of libssl to crash with SIGILL on
i[345]86 systems. It can be directly diagnosed by setting
LD_DEBUG=libs and looking at the first few lines generated when the
offending binary is run, and observing that /usr/lib/i686/libcrypto*
is being loaded from the cache.

When _dl_load_cache_lookup searches the cache, it checks the platform
using this expression (sysdeps/generic/dl-cache.c around line 233):
      if (_DL_PLATFORMS_COUNT && platform != -1				      \
	  && (lib->hwcap & _DL_HWCAP_PLATFORM) != 0			      \
	  && (lib->hwcap & _DL_HWCAP_PLATFORM) != platform)		      \
	continue;							      \

_DL_HWCAP_PLATFORM is a mask that is supposed to match all the bits in
an hwcap field that can represent the current platform. Unfortunately,
it's got the wrong value. Here's the fix (haven't tested this yet,
glibc takes too long to build, but some bit-twiddling in gdb indicates
it should work):

--- sysdeps/unix/sysv/linux/i386/dl-procinfo.h~	2001-07-22 21:24:56.000000000 +0100
+++ sysdeps/unix/sysv/linux/i386/dl-procinfo.h	2002-09-21 16:38:34.000000000 +0100
@@ -34,7 +34,7 @@
 /* Start at 48 to reserve some space.  */
 #define _DL_FIRST_PLATFORM	48
 /* Mask to filter out platforms.  */
-#define _DL_HWCAP_PLATFORM	(7ULL << _DL_FIRST_PLATFORM)
+#define _DL_HWCAP_PLATFORM	(((1ULL << _DL_PLATFORMS_COUNT) - 1) << _DL_FIRST_PLATFORM)
 
 
 static inline int

The value '7' clearly dates from when there were only three platforms,
and never got updated when i686 was added. The practical upshot is
that the bit for 'i686' is never considered by anything to be a
platform, so the entry in ld.so.cache is assumed to be for any
platform.

-- 
  .''`.  ** Debian GNU/Linux ** | Andrew Suffield
 : :' :  http://www.debian.org/ | Dept. of Computing,
 `. `'                          | Imperial College,
   `-             -><-          | London, UK
[Message part 2 (application/pgp-signature, inline)]

Merged 161700 161717 161720 161733 161734 161740 161786 161788 161813. Request was from Andrew Suffield <asuffield@debian.org> to control@bugs.debian.org. Full text and rfc822 format available.

Disconnected #161734 from all other report(s). Request was from Andrew Suffield <asuffield@debian.org> to control@bugs.debian.org. Full text and rfc822 format available.

Disconnected #161733 from all other report(s). Request was from Andrew Suffield <asuffield@debian.org> to control@bugs.debian.org. Full text and rfc822 format available.

Merged 161700 161717 161720 161740 161773 161774 161786 161788 161813. Request was from Andrew Suffield <asuffield@debian.org> to control@bugs.debian.org. Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, GNU Libc Maintainers <debian-glibc@lists.debian.org>, glibc@packages.qa.debian.org:
Bug#161788; Package libc6. Full text and rfc822 format available.

Acknowledgement sent to Daniel Jacobowitz <dan@debian.org>:
Extra info received and forwarded to list. Copy sent to GNU Libc Maintainers <debian-glibc@lists.debian.org>, glibc@packages.qa.debian.org. Full text and rfc822 format available.

Message #18 received at 161788@bugs.debian.org (full text, mbox):

From: Daniel Jacobowitz <dan@debian.org>
To: 161788@bugs.debian.org, Andrew Suffield <asuffield@debian.org>
Subject: [roland@redhat.com: Re: [asuffield@debian.org: Bug#161788: libc6 always loads i686 libraries from cache when available, ignoring the host arch]]
Date: Sat, 21 Sep 2002 19:19:25 -0400
OK, Andrew's patch is correct.  Who wants to upload a fixed glibc?  If
no one else has time I'll do it tonight or Sunday morning.

----- Forwarded message from Roland McGrath <roland@redhat.com> -----

Date: Sat, 21 Sep 2002 14:14:22 -0700
From: Roland McGrath <roland@redhat.com>
Subject: Re: [asuffield@debian.org: Bug#161788: libc6 always loads i686 libraries from cache when available, ignoring the host arch]
To: Daniel Jacobowitz <dan@debian.org>
Cc: libc-alpha@sources.redhat.com,
	Andrew Suffield <asuffield@debian.org>,
	debian-glibc@sources.redhat.com

Thanks, I've put that fix in.


----- End forwarded message -----

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer



Reply sent to GOTO Masanori <gotom@debian.or.jp>:
You have taken responsibility. Full text and rfc822 format available.

Notification sent to Andrew Suffield <asuffield@debian.org>:
Bug acknowledged by developer. Full text and rfc822 format available.

Message #23 received at 161700-close@bugs.debian.org (full text, mbox):

From: GOTO Masanori <gotom@debian.or.jp>
To: 161700-close@bugs.debian.org
Subject: Bug#161700: fixed in glibc 2.2.5-15
Date: Thu, 03 Oct 2002 11:17:36 -0400
We believe that the bug you reported is fixed in the latest version of
glibc, which is due to be installed in the Debian FTP archive:

glibc-doc_2.2.5-15_all.deb
  to pool/main/g/glibc/glibc-doc_2.2.5-15_all.deb
glibc_2.2.5-15.diff.gz
  to pool/main/g/glibc/glibc_2.2.5-15.diff.gz
glibc_2.2.5-15.dsc
  to pool/main/g/glibc/glibc_2.2.5-15.dsc
libc6-dbg_2.2.5-15_i386.deb
  to pool/main/g/glibc/libc6-dbg_2.2.5-15_i386.deb
libc6-dev_2.2.5-15_i386.deb
  to pool/main/g/glibc/libc6-dev_2.2.5-15_i386.deb
libc6-pic_2.2.5-15_i386.deb
  to pool/main/g/glibc/libc6-pic_2.2.5-15_i386.deb
libc6-prof_2.2.5-15_i386.deb
  to pool/main/g/glibc/libc6-prof_2.2.5-15_i386.deb
libc6_2.2.5-15_i386.deb
  to pool/main/g/glibc/libc6_2.2.5-15_i386.deb
locales_2.2.5-15_all.deb
  to pool/main/g/glibc/locales_2.2.5-15_all.deb
nscd_2.2.5-15_i386.deb
  to pool/main/g/glibc/nscd_2.2.5-15_i386.deb



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 161700@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
GOTO Masanori <gotom@debian.or.jp> (supplier of updated glibc package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.7
Date: Thu,  3 Oct 2002 09:56:46 +0900
Source: glibc
Binary: libc6.1-prof libc0.3-pic locales glibc-doc libc6-pic libc0.3 libc0.3-dbg libc6.1-dev libc6-prof libc6-dev-sparc64 libc6 libc0.3-dev libc6-dbg nscd libc6.1-dbg libc6.1-pic libc6-sparc64 libc6-dev libc0.3-prof libc6.1
Architecture: source i386 all
Version: 2.2.5-15
Distribution: unstable
Urgency: low
Maintainer: GOTO Masanori <gotom@debian.or.jp>
Changed-By: GOTO Masanori <gotom@debian.or.jp>
Description: 
 glibc-doc  - GNU C Library: Documentation
 libc6      - GNU C Library: Shared libraries and Timezone data
 libc6-dbg  - GNU C Library: Libraries with debugging symbols
 libc6-dev  - GNU C Library: Development Libraries and Header Files.
 libc6-pic  - GNU C Library: PIC archive library
 libc6-prof - GNU C Library: Profiling Libraries.
 locales    - GNU C Library: National Language (locale) data [support]
 nscd       - GNU C Library: Name Service Cache Daemon
Closes: 161700 161717 161720 161740 161773 161774 161786 161788 161813
Changes: 
 glibc (2.2.5-15) unstable; urgency=low
 .
   * debian/patches/dl-procinfo-fix.dpatch: Fix libssl optimization
     problem occured by glibc dl-procinfo.
       Closes: #161700, #161717, #161720, #161740, #161773, #161774
       Closes: #161786, #161788, #161813
Files: 
 13bbeaaacac865573257d0431ff0148e 1369 libs required glibc_2.2.5-15.dsc
 2cdb9e1e58212be75dfafd223b4af244 407764 libs required glibc_2.2.5-15.diff.gz
 760bcef3da195fa1cfe2eb572d97e203 3349206 base required libc6_2.2.5-15_i386.deb
 9bb59dcd0afbf750dbd6e6b2a9f6e0c6 2399148 devel standard libc6-dev_2.2.5-15_i386.deb
 1df3340fad8d4b645f0f98fab01a98a8 934384 devel extra libc6-prof_2.2.5-15_i386.deb
 b52fea3d8d31b3ddcc6a5262611d7106 2347470 devel extra libc6-dbg_2.2.5-15_i386.deb
 a1ae639e22b648eb55451456976a2ae2 841272 devel optional libc6-pic_2.2.5-15_i386.deb
 6c747686640c1851e0f587c698f0fdd9 60072 admin optional nscd_2.2.5-15_i386.deb
 1067927559312d6db084c8973373ef26 3388412 base standard locales_2.2.5-15_all.deb
 66b906af60e55cc8a4116327653062b2 2700926 doc optional glibc-doc_2.2.5-15_all.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE9m74G9dAn0Xqx8P4RAsSjAKCo8QDGuXBz9kVWSSssb6e9PpsRTACfRbWL
sFiqX0xl8gbLqDS42Kj8f0g=
=fK4T
-----END PGP SIGNATURE-----




Message #24 received at 161788-close@bugs.debian.org (full text, mbox):

From: GOTO Masanori <gotom@debian.or.jp>
To: 161788-close@bugs.debian.org
Subject: Bug#161788: fixed in glibc 2.2.5-15
Date: Thu, 03 Oct 2002 11:17:37 -0400
We believe that the bug you reported is fixed in the latest version of
glibc, which is due to be installed in the Debian FTP archive:

glibc-doc_2.2.5-15_all.deb
  to pool/main/g/glibc/glibc-doc_2.2.5-15_all.deb
glibc_2.2.5-15.diff.gz
  to pool/main/g/glibc/glibc_2.2.5-15.diff.gz
glibc_2.2.5-15.dsc
  to pool/main/g/glibc/glibc_2.2.5-15.dsc
libc6-dbg_2.2.5-15_i386.deb
  to pool/main/g/glibc/libc6-dbg_2.2.5-15_i386.deb
libc6-dev_2.2.5-15_i386.deb
  to pool/main/g/glibc/libc6-dev_2.2.5-15_i386.deb
libc6-pic_2.2.5-15_i386.deb
  to pool/main/g/glibc/libc6-pic_2.2.5-15_i386.deb
libc6-prof_2.2.5-15_i386.deb
  to pool/main/g/glibc/libc6-prof_2.2.5-15_i386.deb
libc6_2.2.5-15_i386.deb
  to pool/main/g/glibc/libc6_2.2.5-15_i386.deb
locales_2.2.5-15_all.deb
  to pool/main/g/glibc/locales_2.2.5-15_all.deb
nscd_2.2.5-15_i386.deb
  to pool/main/g/glibc/nscd_2.2.5-15_i386.deb



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 161788@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
GOTO Masanori <gotom@debian.or.jp> (supplier of updated glibc package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.7
Date: Thu,  3 Oct 2002 09:56:46 +0900
Source: glibc
Binary: libc6.1-prof libc0.3-pic locales glibc-doc libc6-pic libc0.3 libc0.3-dbg libc6.1-dev libc6-prof libc6-dev-sparc64 libc6 libc0.3-dev libc6-dbg nscd libc6.1-dbg libc6.1-pic libc6-sparc64 libc6-dev libc0.3-prof libc6.1
Architecture: source i386 all
Version: 2.2.5-15
Distribution: unstable
Urgency: low
Maintainer: GOTO Masanori <gotom@debian.or.jp>
Changed-By: GOTO Masanori <gotom@debian.or.jp>
Description: 
 glibc-doc  - GNU C Library: Documentation
 libc6      - GNU C Library: Shared libraries and Timezone data
 libc6-dbg  - GNU C Library: Libraries with debugging symbols
 libc6-dev  - GNU C Library: Development Libraries and Header Files.
 libc6-pic  - GNU C Library: PIC archive library
 libc6-prof - GNU C Library: Profiling Libraries.
 locales    - GNU C Library: National Language (locale) data [support]
 nscd       - GNU C Library: Name Service Cache Daemon
Closes: 161700 161717 161720 161740 161773 161774 161786 161788 161813
Changes: 
 glibc (2.2.5-15) unstable; urgency=low
 .
   * debian/patches/dl-procinfo-fix.dpatch: Fix libssl optimization
     problem occured by glibc dl-procinfo.
       Closes: #161700, #161717, #161720, #161740, #161773, #161774
       Closes: #161786, #161788, #161813
Files: 
 13bbeaaacac865573257d0431ff0148e 1369 libs required glibc_2.2.5-15.dsc
 2cdb9e1e58212be75dfafd223b4af244 407764 libs required glibc_2.2.5-15.diff.gz
 760bcef3da195fa1cfe2eb572d97e203 3349206 base required libc6_2.2.5-15_i386.deb
 9bb59dcd0afbf750dbd6e6b2a9f6e0c6 2399148 devel standard libc6-dev_2.2.5-15_i386.deb
 1df3340fad8d4b645f0f98fab01a98a8 934384 devel extra libc6-prof_2.2.5-15_i386.deb
 b52fea3d8d31b3ddcc6a5262611d7106 2347470 devel extra libc6-dbg_2.2.5-15_i386.deb
 a1ae639e22b648eb55451456976a2ae2 841272 devel optional libc6-pic_2.2.5-15_i386.deb
 6c747686640c1851e0f587c698f0fdd9 60072 admin optional nscd_2.2.5-15_i386.deb
 1067927559312d6db084c8973373ef26 3388412 base standard locales_2.2.5-15_all.deb
 66b906af60e55cc8a4116327653062b2 2700926 doc optional glibc-doc_2.2.5-15_all.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE9m74G9dAn0Xqx8P4RAsSjAKCo8QDGuXBz9kVWSSssb6e9PpsRTACfRbWL
sFiqX0xl8gbLqDS42Kj8f0g=
=fK4T
-----END PGP SIGNATURE-----




Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Sat Apr 19 02:10:26 2014; Machine Name: beach.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.