Debian Bug report logs - #367656
libc6: [x86_64] getpid() always returns 5 when used in statically linked code

version graph

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

Reported by: Andree Leidenfrost <andree@debian.org>

Date: Wed, 17 May 2006 14:03:09 UTC

Severity: important

Found in version libc6/2.3.6-7

Fixed in version glibc/2.3.6.ds1-1

Done: Aurelien Jarno <aurel32@debian.org>

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, GNU Libc Maintainers <debian-glibc@lists.debian.org>:
Bug#367656; Package libc6. Full text and rfc822 format available.

Acknowledgement sent to Andree Leidenfrost <andree@debian.org>:
New Bug report received and forwarded. Copy sent to GNU Libc Maintainers <debian-glibc@lists.debian.org>. Full text and rfc822 format available.

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

From: Andree Leidenfrost <andree@debian.org>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: libc6: [x86_64] getpid() always returns 5 when used in statically linked code
Date: Wed, 17 May 2006 23:57:15 +1000
[Message part 1 (text/plain, inline)]
Package: libc6
Version: 2.3.6-7
Severity: important

I realise the above must sound pretty crazy, so I include a tarball 
containing a little test program 'test_getpid.c' which calls getpid() 
and outputs the result and a script 'buildandrun' which builds and runs 
(surprise, surprise) both a statically and a dynamically linked version 
of bespoke little program. Here are some results:

sarge i386:
-----------
 Architecture: i686
libc6 version: 2.3.2.ds1-22sarge3

Statically compiled: (Wrongfully returns 5 on amd64!)
pid=32340
Dynamically compiled:
pid=32341

sid i386:
---------
 Architecture: i686
libc6 version: 2.3.6-7

Statically compiled: (Wrongfully returns 5 on amd64!)
pid=7724
Dynamically compiled:
pid=7725

sid amd64:
----------
 Architecture: x86_64
libc6 version: 2.3.6-7

Statically compiled: (Wrongfully returns 5 on amd64!)
pid=5
Dynamically compiled:
pid=7488

I have run this many times and in fact was debugging a problem in 
busybox when I first experienced this. It has so far always returned 5 
on my sid amd64 system when the program was statically linked. Dynamic 
linking is fine on sid amd64 , so are sarge and sid i386 for both static 
and dynamic linking. As you can see the libc6 version is idential for 
the sid amd64 and i386 test runs, so it might be an x86_64 or a general 
64bit problem.

Please let me know if there is any other information you need or if you 
want me to run any other tests.

Thanks a lot and best regards,
Andree

-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.16-1-amd64-k8
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)

Versions of packages libc6 depends on:
ii  tzdata                        2006c-2    Time Zone and Daylight Saving Time

libc6 recommends no packages.

-- no debconf information
[test_getpid.tar.gz (application/octet-stream, attachment)]

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

Acknowledgement sent to Andree Leidenfrost <aleidenf@bigpond.net.au>:
Extra info received and forwarded to list. Copy sent to GNU Libc Maintainers <debian-glibc@lists.debian.org>. Full text and rfc822 format available.

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

From: Andree Leidenfrost <aleidenf@bigpond.net.au>
To: 367656@bugs.debian.org
Subject: Bug#367656: libc6: [x86_64] getpid() always returns 5 when used in statically linked code
Date: Thu, 18 May 2006 19:44:07 +1000
[Message part 1 (text/plain, inline)]
Just to let you know that the issue has been confirmed by an independent
party:

http://busybox.net/lists/busybox/2006-May/021510.html

Best regards,
Andree
-- 
Andree Leidenfrost
Sydney - Australia

[signature.asc (application/pgp-signature, inline)]

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

Acknowledgement sent to Andree Leidenfrost <andree@debian.org>:
Extra info received and forwarded to list. Copy sent to GNU Libc Maintainers <debian-glibc@lists.debian.org>. Full text and rfc822 format available.

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

From: Andree Leidenfrost <andree@debian.org>
To: 367656@bugs.debian.org
Subject: [UPDATE] Bug#367656: libc6: [x86_64] getpid() always returns 5 when used in statically linked code
Date: Thu, 18 May 2006 23:38:49 +1000
[Message part 1 (text/plain, inline)]
Just tested things in an amd64 sid debootstrap chroot environment with
the libc6 packages from experimental with the following outcome:

 Architecture: x86_64
libc6 version: 2.3.999.1-2

Statically compiled: (Wrongfully returns 5 on amd64!)
pid=7488
Dynamically compiled:
pid=7489

which means that this is fixed in libc 2.4 (I understand this is what
2.3.999.1-2 really is). The only remaining question is when 2.4 is going
to be in unstable...

Cheers,
Andree

[signature.asc (application/pgp-signature, inline)]

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

Acknowledgement sent to Andree Leidenfrost <aleidenf@bigpond.net.au>:
Extra info received and forwarded to list. Copy sent to GNU Libc Maintainers <debian-glibc@lists.debian.org>. Full text and rfc822 format available.

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

From: Andree Leidenfrost <aleidenf@bigpond.net.au>
To: 367656@bugs.debian.org
Subject: Bug#367656: libc6: [x86_64] getpid() always returns 5 when used in statically linked code
Date: Sun, 13 Aug 2006 23:12:39 +1000
[Message part 1 (text/plain, inline)]
According to Aurelien's message here:

http://lists.debian.org/debian-glibc/2006/07/msg00121.html

2.4 has missed the boat for etch.

Is there any chance that this gets addressed by backporting the
change/fix from 2.4?

Cheers,
Andree
-- 
Andree Leidenfrost
Sydney - Australia

[signature.asc (application/pgp-signature, inline)]

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

Acknowledgement sent to Aurelien Jarno <aurelien@aurel32.net>:
Extra info received and forwarded to list. Copy sent to GNU Libc Maintainers <debian-glibc@lists.debian.org>. Full text and rfc822 format available.

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

From: Aurelien Jarno <aurelien@aurel32.net>
To: Andree Leidenfrost <aleidenf@bigpond.net.au>, 367656@bugs.debian.org
Subject: Re: Bug#367656: libc6: [x86_64] getpid() always returns 5 when used in statically linked code
Date: Tue, 15 Aug 2006 16:55:02 +0200
On Sun, Aug 13, 2006 at 11:12:39PM +1000, Andree Leidenfrost wrote:
> According to Aurelien's message here:
> 
> http://lists.debian.org/debian-glibc/2006/07/msg00121.html
> 
> 2.4 has missed the boat for etch.
> 
> Is there any chance that this gets addressed by backporting the
> change/fix from 2.4?
> 

Yes, this can be addressed by backporting the fix, but we need to find
the fix first.

-- 
  .''`.  Aurelien Jarno	            | GPG: 1024D/F1BCDB73
 : :' :  Debian developer           | Electrical Engineer
 `. `'   aurel32@debian.org         | aurelien@aurel32.net
   `-    people.debian.org/~aurel32 | www.aurel32.net



Reply sent to Aurelien Jarno <aurel32@debian.org>:
You have taken responsibility. Full text and rfc822 format available.

Notification sent to Andree Leidenfrost <andree@debian.org>:
Bug acknowledged by developer. Full text and rfc822 format available.

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

From: Aurelien Jarno <aurel32@debian.org>
To: 367656-close@bugs.debian.org
Subject: Bug#367656: fixed in glibc 2.3.6.ds1-1
Date: Tue, 15 Aug 2006 15:02:36 -0700
Source: glibc
Source-Version: 2.3.6.ds1-1

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.3.6.ds1-1_all.deb
  to pool/main/g/glibc/glibc-doc_2.3.6.ds1-1_all.deb
glibc_2.3.6.ds1-1.diff.gz
  to pool/main/g/glibc/glibc_2.3.6.ds1-1.diff.gz
glibc_2.3.6.ds1-1.dsc
  to pool/main/g/glibc/glibc_2.3.6.ds1-1.dsc
glibc_2.3.6.ds1.orig.tar.gz
  to pool/main/g/glibc/glibc_2.3.6.ds1.orig.tar.gz
libc6-dbg_2.3.6.ds1-1_amd64.deb
  to pool/main/g/glibc/libc6-dbg_2.3.6.ds1-1_amd64.deb
libc6-dev-i386_2.3.6.ds1-1_amd64.deb
  to pool/main/g/glibc/libc6-dev-i386_2.3.6.ds1-1_amd64.deb
libc6-dev_2.3.6.ds1-1_amd64.deb
  to pool/main/g/glibc/libc6-dev_2.3.6.ds1-1_amd64.deb
libc6-i386_2.3.6.ds1-1_amd64.deb
  to pool/main/g/glibc/libc6-i386_2.3.6.ds1-1_amd64.deb
libc6-pic_2.3.6.ds1-1_amd64.deb
  to pool/main/g/glibc/libc6-pic_2.3.6.ds1-1_amd64.deb
libc6-prof_2.3.6.ds1-1_amd64.deb
  to pool/main/g/glibc/libc6-prof_2.3.6.ds1-1_amd64.deb
libc6-udeb_2.3.6.ds1-1_amd64.udeb
  to pool/main/g/glibc/libc6-udeb_2.3.6.ds1-1_amd64.udeb
libc6_2.3.6.ds1-1_amd64.deb
  to pool/main/g/glibc/libc6_2.3.6.ds1-1_amd64.deb
libnss-dns-udeb_2.3.6.ds1-1_amd64.udeb
  to pool/main/g/glibc/libnss-dns-udeb_2.3.6.ds1-1_amd64.udeb
libnss-files-udeb_2.3.6.ds1-1_amd64.udeb
  to pool/main/g/glibc/libnss-files-udeb_2.3.6.ds1-1_amd64.udeb
locales-all_2.3.6.ds1-1_amd64.deb
  to pool/main/g/glibc/locales-all_2.3.6.ds1-1_amd64.deb
locales_2.3.6.ds1-1_all.deb
  to pool/main/g/glibc/locales_2.3.6.ds1-1_all.deb
nscd_2.3.6.ds1-1_amd64.deb
  to pool/main/g/glibc/nscd_2.3.6.ds1-1_amd64.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 367656@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Aurelien Jarno <aurel32@debian.org> (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: Tue, 15 Aug 2006 23:01:43 +0200
Source: glibc
Binary: libc0.1-prof libc6-dev-amd64 locales-all libc6-i686 libc6-dev-ppc64 libc0.3-pic glibc-doc libc0.3 libc0.1-i686 libc6.1-dev libc6-s390x libnss-files-udeb libc6-dev-sparc64 libc6-i386 libc0.3-dev libc6-udeb libc6-dbg libc6.1-pic libc6-dev libc0.3-prof libc6-sparcv9 libc0.1-udeb libc6-dev-i386 libc6.1-prof libc0.1-dev locales libc6-pic libc0.3-udeb libc6-dev-powerpc libc0.1-pic libc6-ppc64 libc0.3-dbg libc0.1-dbg libc6-amd64 libc0.1 libc6-prof libc6-xen libc6-powerpc libc6 libc6-sparcv9b libc6.1-udeb libc6.1-dbg nscd libc6-sparc64 libnss-dns-udeb libc6.1 libc6-dev-s390x
Architecture: source amd64 all
Version: 2.3.6.ds1-1
Distribution: unstable
Urgency: low
Maintainer: GNU Libc Maintainers <debian-glibc@lists.debian.org>
Changed-By: Aurelien Jarno <aurel32@debian.org>
Description: 
 glibc-doc  - GNU C Library: Documentation
 libc6      - GNU C Library: Shared libraries
 libc6-dbg  - GNU C Library: Libraries with debugging symbols
 libc6-dev  - GNU C Library: Development Libraries and Header Files
 libc6-dev-i386 - GNU C Library: 32bit development libraries for AMD64
 libc6-i386 - GNU C Library: 32bit shared libraries for AMD64
 libc6-pic  - GNU C Library: PIC archive library
 libc6-prof - GNU C Library: Profiling Libraries
 libc6-udeb - GNU C Library: Shared libraries - udeb (udeb)
 libnss-dns-udeb - GNU C Library: NSS helper for DNS - udeb (udeb)
 libnss-files-udeb - GNU C Library: NSS helper for files - udeb (udeb)
 locales    - GNU C Library: National Language (locale) data [support]
 locales-all - GNU C Library: Precompiled locale data
 nscd       - GNU C Library: Name Service Cache Daemon
Closes: 181494 365628 367656 378151 382136 383168
Changes: 
 glibc (2.3.6.ds1-1) unstable; urgency=low
 .
   [ Denis Barbier ]
   * New all/submitted-uninitialized-byte-LC_CTYPE.diff patch to fix
     uninitialized bytes or misaligned words in locale files.
   * debian/debhelper.in/locales-all.postinst: Make localedef silent, and
     fix an error, this script could not be run more than once.
   * debian/debhelper.in/locales-all.prerm: New file, to remove
     /usr/lib/locale/locale-archive.  Thanks Lars Wirzenius.
     (Closes: #382136)
   * debian/debhelper.in/locales.postinst: Pass --no-checks to update-locale
     to not break installation of this package even if non working locales
     are selected.  Thanks Robert Millan.  (Closes: #365628)
   * debian/patches/locale/cvs-iso4217.diff: Update to CVS 2006-08-12.
   * debian/patches/localedata/cvs-localedata.diff: Update to CVS 2006-08-12
     Among other changes:
     * New locale files: as_IN, ca_AD, csb_PL, el_CY, fr_AD, it_AD, nr_ZA,
       or_IN, pa_PK and tr_CY.
     * charmaps/MIK: New file.
     * Sync bg_BG bs_BA es_MX ru_RU tg_TJ tt_RU with latest iso-4217.def
     * Add transliateration support to LC_CTYPE for most locales.
     * Fix date fields for several *_IN locales.
     * locales/{*_ZA,ro_RO,vi_VN}: Various fixes
     * locales/de_DE: Fix date_fmt.
     * locales/hu_HU: Better month name abbreviations.
     * locales/pl_PL: Don't ignore U0020 in collation.
     * locales/ru_RU: Use U2002 for thousands_sep and mon_throusands_sep.
     * locales/es_UY: Change currency_symbol. Closes: #378151
     * locales/de_CH: Change thousand separator to '.
   * The following patches have been merged into localedata/cvs-localedata.diff
     and are dropped:
       locale/iso4217-RON.diff               localedata/locale-ro_RO.diff
       localedata/new-catalan-locales.diff   localedata/locale-te_IN.diff
       localedata/locale-nr_ZA.diff          localedata/update-ZA.diff
 .
   [ Aurelien Jarno ]
   * sysdeps/{powerpc,s390,ia64}.mk: make the NPTL version buildable on 2.4
     kernels.
   * New any/local-sysctl.diff patch to remove the annoying warning messages
     that appear with 2.6.18+ kernels, and to warn users to not use sysctl().
   * debian/debhelper.in/libc.postinst: update list of optimized glibc
     packages.  Thanks Petr Salinger.  (Closes: #383168).
   * New any/cvs-static-getpid.diff patch from upstream to fix getpid() in
     statically linked programs on some architectures.  (Closes: #367656).
   * Backport from experimental (thanks Denis):
     - Remove the GNU Libc Reference manual from glibc-doc because it is
       not DFSG-free. (Closes: #181494)
       The whole glibc-2.3.6/manual directory is removed from glibc-2.3.6.ds1.tar.bz2.
     - debian/control: Drop Build-Depends: texinfo, texi2html.
     - debian/control: Drop references to the antique libc-doc package.
     - all/cvs-manual-memory.diff: removed.
     - all/cvs-manual-string.diff: removed.
Files: 
 44089f0a72f3c6c6b27370711c8a97b9 2111 libs required glibc_2.3.6.ds1-1.dsc
 d5e6ffe51e49ab29d513e600fb87cf54 13307585 libs required glibc_2.3.6.ds1.orig.tar.gz
 76cf39c22b441cf65b07bed9c41db94f 874075 libs required glibc_2.3.6.ds1-1.diff.gz
 9964507c5afc4d26f41eaf767ed4b0f3 1477102 doc optional glibc-doc_2.3.6.ds1-1_all.deb
 ec779fcc8dde411aa2ae4faccabcedc5 3952934 libs standard locales_2.3.6.ds1-1_all.deb
 c1c59032339c48e5fd977bca3f55b8de 4069224 libs required libc6_2.3.6.ds1-1_amd64.deb
 96209b6f9f43bc920b36ec3839df76bb 2106842 libdevel standard libc6-dev_2.3.6.ds1-1_amd64.deb
 264fea74dab59ba13373a23813f24735 1575848 libdevel extra libc6-prof_2.3.6.ds1-1_amd64.deb
 412ab2857ddab1bbd8042bbf85198cdf 1402118 libdevel optional libc6-pic_2.3.6.ds1-1_amd64.deb
 71d8db72ea6cc75605d5688b45c67130 6094592 libs extra locales-all_2.3.6.ds1-1_amd64.deb
 1da17e907307087489a32953eb0d1c18 2968972 libs standard libc6-i386_2.3.6.ds1-1_amd64.deb
 178c6b43b422b6534f61db541ba933c8 1568960 libdevel optional libc6-dev-i386_2.3.6.ds1-1_amd64.deb
 a36f0aab0427c08bbb764b75fb52d46e 143510 admin optional nscd_2.3.6.ds1-1_amd64.deb
 1250718826b53e395e675d6fefb4f208 2344982 libdevel extra libc6-dbg_2.3.6.ds1-1_amd64.deb
 c73982a648eb722b9ed045f31b306aac 1042616 debian-installer extra libc6-udeb_2.3.6.ds1-1_amd64.udeb
 08edb2c8ab4ee9c53d0dfa6007a62043 9544 debian-installer extra libnss-dns-udeb_2.3.6.ds1-1_amd64.udeb
 695771b619260dd4b2368eb682630b04 17276 debian-installer extra libnss-files-udeb_2.3.6.ds1-1_amd64.udeb
Package-Type: udeb

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

iD8DBQFE4kATw3ao2vG823MRArKgAJ4ik/eYKjKTpDdYduwl3FbxLUpPzwCfa+kO
l4hETIBGGtnymVuLMVRx0OA=
=AgJx
-----END PGP SIGNATURE-----




Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Mon, 25 Jun 2007 23:57:47 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Wed Apr 23 15:21:29 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.