Debian Bug report logs - #581707
gdb: refuses to print errno

version graph

Package: gdb; Maintainer for gdb is Héctor Orón Martínez <zumbi@debian.org>; Source for gdb is src:gdb.

Reported by: "brian m. carlson" <sandals@crustytoothpaste.net>

Date: Sat, 15 May 2010 05:21:01 UTC

Severity: important

Found in versions gdb/7.1-1, 7.2-1ubuntu3

Fixed in version gdb/7.6-3

Done: Héctor Orón Martínez <zumbi@debian.org>

Bug is archived. No further changes may be made.

Forwarded to http://sourceware.org/bugzilla/show_bug.cgi?id=13582, merged-upstream: http://sourceware.org/bugzilla/show_bug.cgi?id=11795

Toggle useless messages

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


Report forwarded to debian-bugs-dist@lists.debian.org, Daniel Jacobowitz <dan@debian.org>:
Bug#581707; Package gdb. (Sat, 15 May 2010 05:21:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to "brian m. carlson" <sandals@crustytoothpaste.ath.cx>:
New Bug report received and forwarded. Copy sent to Daniel Jacobowitz <dan@debian.org>. (Sat, 15 May 2010 05:21:04 GMT) Full text and rfc822 format available.

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

From: "brian m. carlson" <sandals@crustytoothpaste.ath.cx>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: gdb: refuses to print errno on amd64
Date: Sat, 15 May 2010 05:18:22 +0000
[Message part 1 (text/plain, inline)]
Package: gdb
Version: 7.1-1
Severity: important

gdb refuses to print errno on amd64, regardless of whether the program
in question is 32-bit or 64-bit.  libc6-dbg is installed.

In my opinion, not being able to print errno makes gdb significantly
less useful.  errno is an essential and important part of libc6, and not
supporting it is a really, really bad idea.

If gdb has never worked on errno, ever, then you may feel free to
downgrade this to wishlist.

I have determined, though, that gdb does work if you issue the command
"set environment LD_PRELOAD /usr/lib/libefence.so" before "run" to use
Electric Fence.  This is bizarre.

Transcript:

  lakeview no % gdb --args ./readdir libpst-0.6.45 
  GNU gdb (GDB) 7.1-debian
  Copyright (C) 2010 Free Software Foundation, Inc.
  License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
  This is free software: you are free to change and redistribute it.
  There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
  and "show warranty" for details.
  This GDB was configured as "x86_64-linux-gnu".
  For bug reporting instructions, please see:
  <http://www.gnu.org/software/gdb/bugs/>...
  Reading symbols from /tmp/readdir...done.
  (gdb) run
  Starting program: /tmp/readdir libpst-0.6.45
  
  Program received signal SIGSEGV, Segmentation fault.
  0x00007ffff7ad2092 in _IO_vfprintf_internal (s=0x7fffffffc870, format=<value optimized out>, ap=0x7fffffffd060) at vfprintf.c:1601
  1601	vfprintf.c: No such file or directory.
  	in vfprintf.c
  (gdb) bt
  #0  0x00007ffff7ad2092 in _IO_vfprintf_internal (s=0x7fffffffc870, format=<value optimized out>, ap=0x7fffffffd060) at vfprintf.c:1601
  #1  0x00007ffff7ad3d00 in buffered_vfprintf (s=0x7ffff7ddb880, format=0x400970 ": %s\n", args=0x20) at vfprintf.c:2241
  #2  0x00007ffff7acebce in _IO_vfprintf_internal (s=0x7ffff7ddb880, format=0x400960 "Error reading %s: %s\n", ap=0x7fffffffd060)
      at vfprintf.c:1306
  #3  0x00007ffff7ad9368 in __fprintf (stream=0xf7ba4cd6, format=0x400970 ": %s\n") at fprintf.c:33
  #4  0x00000000004007ef in main (argc=2, argv=0x7fffffffe268) at readdir.c:20
  (gdb) frame 4
  #4  0x00000000004007ef in main (argc=2, argv=0x7fffffffe268) at readdir.c:20
  20					fprintf(stderr, "Error reading %s: %s\n", argv[i],
  (gdb) print argv[i]
  $1 = 0x7fffffffe67a "libpst-0.6.45"
  (gdb) print errno
  Cannot find thread-local variables on this target
  (gdb) 


-- System Information:
Debian Release: squeeze/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.32-5-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages gdb depends on:
ii  gdbserver               7.1-1            The GNU Debugger (remote server)
ii  libc6                   2.10.2-8         Embedded GNU C Library: Shared lib
ii  libexpat1               2.0.1-7          XML parsing C library - runtime li
ii  libncurses5             5.7+20100313-2   shared libraries for terminal hand
ii  libreadline6            6.1-2            GNU readline and history libraries
ii  python2.5               2.5.5-6          An interactive high-level object-o
ii  zlib1g                  1:1.2.3.4.dfsg-3 compression library - runtime

gdb recommends no packages.

Versions of packages gdb suggests:
pn  gdb-doc                       <none>     (no description available)

-- no debconf information

-- 
brian m. carlson / brian with sandals: Houston, Texas, US
+1 832 623 2791 | http://www.crustytoothpaste.net/~bmc | My opinion only
OpenPGP: RSA v4 4096b: 88AC E9B2 9196 305B A994 7552 F1BA 225C 0223 B187
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Daniel Jacobowitz <dan@debian.org>:
Bug#581707; Package gdb. (Wed, 19 May 2010 19:39:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Daniel Jacobowitz <drow@false.org>:
Extra info received and forwarded to list. Copy sent to Daniel Jacobowitz <dan@debian.org>. (Wed, 19 May 2010 19:39:04 GMT) Full text and rfc822 format available.

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

From: Daniel Jacobowitz <drow@false.org>
To: "brian m. carlson" <sandals@crustytoothpaste.ath.cx>, 581707@bugs.debian.org
Subject: Re: Bug#581707: gdb: refuses to print errno on amd64
Date: Wed, 19 May 2010 15:07:15 -0400
On Sat, May 15, 2010 at 05:18:22AM +0000, brian m. carlson wrote:
> gdb refuses to print errno on amd64, regardless of whether the program
> in question is 32-bit or 64-bit.  libc6-dbg is installed.

Does linking with -lpthread help?  It will, if I remember the problem
correctly.

This may be fixed upstream; I think Jan K. posted a patch for it at
some point.

-- 
Daniel Jacobowitz
CodeSourcery




Information forwarded to debian-bugs-dist@lists.debian.org, Daniel Jacobowitz <dan@debian.org>:
Bug#581707; Package gdb. (Wed, 19 May 2010 23:30:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to "brian m. carlson" <sandals@crustytoothpaste.ath.cx>:
Extra info received and forwarded to list. Copy sent to Daniel Jacobowitz <dan@debian.org>. (Wed, 19 May 2010 23:30:04 GMT) Full text and rfc822 format available.

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

From: "brian m. carlson" <sandals@crustytoothpaste.ath.cx>
To: Daniel Jacobowitz <drow@false.org>
Cc: 581707@bugs.debian.org
Subject: Re: Bug#581707: gdb: refuses to print errno on amd64
Date: Wed, 19 May 2010 23:27:49 +0000
[Message part 1 (text/plain, inline)]
On Wed, May 19, 2010 at 03:07:15PM -0400, Daniel Jacobowitz wrote:
> On Sat, May 15, 2010 at 05:18:22AM +0000, brian m. carlson wrote:
> > gdb refuses to print errno on amd64, regardless of whether the program
> > in question is 32-bit or 64-bit.  libc6-dbg is installed.
> 
> Does linking with -lpthread help?  It will, if I remember the problem
> correctly.

Yes.  errno becomes accessible.

> This may be fixed upstream; I think Jan K. posted a patch for it at
> some point.

If it's not, a simple entry in README.Debian might be appropriate until
it's fixed.

-- 
brian m. carlson / brian with sandals: Houston, Texas, US
+1 832 623 2791 | http://www.crustytoothpaste.net/~bmc | My opinion only
OpenPGP: RSA v4 4096b: 88AC E9B2 9196 305B A994 7552 F1BA 225C 0223 B187
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Daniel Jacobowitz <dan@debian.org>:
Bug#581707; Package gdb. (Sun, 23 Jan 2011 18:24:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Reuben Thomas <rrt@sc3d.org>:
Extra info received and forwarded to list. Copy sent to Daniel Jacobowitz <dan@debian.org>. (Sun, 23 Jan 2011 18:24:04 GMT) Full text and rfc822 format available.

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

From: Reuben Thomas <rrt@sc3d.org>
To: Debian Bug Tracking System <581707@bugs.debian.org>
Subject: gdb: Still a problem, and on x86 as well as amd64
Date: Sun, 23 Jan 2011 18:20:00 +0000
Package: gdb
Version: 7.2-1ubuntu3
Severity: normal

This bug is still present.

The patches from Jan Kratochvil that were referred to are at:

https://bugzilla.redhat.com/show_bug.cgi?id=185337

The most important patch seems to have been applied, but there’s a
useful diagnostic patch that seems not to have been applied upstream,
which gives advice on this very common case, namely trying
unsuccessfully to print the value of errno:

https://bugzilla.redhat.com/attachment.cgi?id=134903&action=diff

Since this patch appears not to have been applied upstream, can we
please at least have it in Debian? It would have instantly told me all
I needed to know...

-- System Information:
Debian Release: squeeze/sid
  APT prefers maverick-updates
  APT policy: (500, 'maverick-updates'), (500, 'maverick-security'), (500, 'maverick-backports'), (500, 'maverick')
Architecture: i386 (i686)

Kernel: Linux 2.6.35-24-generic (SMP w/2 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages gdb depends on:
ii  libc6            2.12.1-0ubuntu10.1      Embedded GNU C Library: Shared lib
ii  libexpat1        2.0.1-7ubuntu1          XML parsing C library - runtime li
ii  libncurses5      5.7+20100626-0ubuntu1   shared libraries for terminal hand
ii  libpython2.6     2.6.6-5ubuntu1          Shared Python runtime library (ver
ii  libreadline6     6.1-3                   GNU readline and history libraries
ii  zlib1g           1:1.2.3.4.dfsg-3ubuntu1 compression library - runtime

gdb recommends no packages.

Versions of packages gdb suggests:
ii  gdb-doc                       7.2-1      The GNU Debugger Documentation
pn  gdbserver                     <none>     (no description available)

-- no debconf information




Changed Bug submitter to '"brian m. carlson" <sandals@crustytoothpaste.net>' from '"brian m. carlson" <sandals@crustytoothpaste.ath.cx>' Request was from "brian m. carlson" <sandals@crustytoothpaste.net> to control@bugs.debian.org. (Thu, 03 Feb 2011 20:52:08 GMT) Full text and rfc822 format available.

Changed Bug title to 'gdb: refuses to print errno' from 'gdb: refuses to print errno on amd64' Request was from Samuel Bronson <naesten@gmail.com> to control@bugs.debian.org. (Tue, 29 Jan 2013 23:06:08 GMT) Full text and rfc822 format available.

Set Bug forwarded-to-address to 'http://sourceware.org/bugzilla/show_bug.cgi?id=13582'. Request was from Samuel Bronson <naesten@gmail.com> to control@bugs.debian.org. (Tue, 29 Jan 2013 23:06:08 GMT) Full text and rfc822 format available.

Changed Bug forwarded-to-address to 'http://sourceware.org/bugzilla/show_bug.cgi?id=13582, merged-upstream: http://sourceware.org/bugzilla/show_bug.cgi?id=11795' from 'http://sourceware.org/bugzilla/show_bug.cgi?id=13582' Request was from bts-link-upstream@lists.alioth.debian.org to control@bugs.debian.org. (Mon, 04 Feb 2013 17:09:07 GMT) Full text and rfc822 format available.

Reply sent to Héctor Orón Martínez <zumbi@debian.org>:
You have taken responsibility. (Fri, 24 May 2013 15:36:04 GMT) Full text and rfc822 format available.

Notification sent to "brian m. carlson" <sandals@crustytoothpaste.net>:
Bug acknowledged by developer. (Fri, 24 May 2013 15:36:05 GMT) Full text and rfc822 format available.

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

From: Héctor Orón Martínez <zumbi@debian.org>
To: 581707-close@bugs.debian.org
Subject: Bug#581707: fixed in gdb 7.6-3
Date: Fri, 24 May 2013 15:33:08 +0000
Source: gdb
Source-Version: 7.6-3

We believe that the bug you reported is fixed in the latest version of
gdb, which is due to be installed in the Debian FTP archive.

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 581707@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Héctor Orón Martínez <zumbi@debian.org> (supplier of updated gdb 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: SHA512

Format: 1.8
Date: Fri, 24 May 2013 11:37:49 +0200
Source: gdb
Binary: gdb gdb-minimal gdb64 gdb-multiarch gdbserver gdb-source
Architecture: source all 
Version: 7.6-3
Distribution: unstable
Urgency: low
Maintainer: Héctor Orón Martínez <zumbi@debian.org>
Changed-By: Héctor Orón Martínez <zumbi@debian.org>
Description: 
 gdb        - The GNU Debugger
 gdb-minimal - The GNU Debugger
 gdb-multiarch - The GNU Debugger (with support for multiple architectures)
 gdb-source - The GNU Debugger (source)
 gdb64      - The GNU Debugger (64-bit)
 gdbserver  - The GNU Debugger (remote server)
Closes: 581707 709232 709508
Changes: 
 gdb (7.6-3) unstable; urgency=low
 .
   [ Héctor Orón Martínez ]
   * d/gbp.conf:
     - switch debian-branch to master
   * d/control{,.in}:
     - add replaces gdb-multiarch (<< 7.6-1). (Closes: #709232)
   * d/p/gdb-6.5-bz185337-resolve-tls-without-debuginfo-v2.patch:
     - fix refuses to print errno. (Closes: #581707)
   * d/rules:
     - check if gdb.sum exists before installing in shared doc.
 .
   [ Svante Signell ]
   * d/p/solve_PATH_MAX_issue.patch:
     - new patch fixes FTBFS on hurd. (Closes: #709508)
Checksums-Sha1: 
 c33bab1a2f1a7826b9a5a26779736524d04bab7d 2584 gdb_7.6-3.dsc
 56e26a30f5cc1c18513ed564d5e2c13d8a23fc72 50366 gdb_7.6-3.debian.tar.gz
 843799671d5e073987fbbdfde84de834acf2a900 22950956 gdb-source_7.6-3_all.deb
Checksums-Sha256: 
 d170006edf7374e859baa41cce48a77c8636908297a567d307e2ac136f75f404 2584 gdb_7.6-3.dsc
 232810f0c8e1ed37098cf44bc2e22553e9890e77035013b2ae8f6f21810eb8f8 50366 gdb_7.6-3.debian.tar.gz
 f54c2b4b7695e2488dc7b8ebceb8987b04a3c7b980bf882c7de68fd8f82707ed 22950956 gdb-source_7.6-3_all.deb
Files: 
 9d20406754aaec60154a1534a077bb33 2584 devel optional gdb_7.6-3.dsc
 9d4120cf3e6a48b2f4e9f8fff3a4484e 50366 devel optional gdb_7.6-3.debian.tar.gz
 9e97d80af2a83215c1e6f7b00f8170b6 22950956 devel optional gdb-source_7.6-3_all.deb

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

iQIcBAEBCgAGBQJRn4UtAAoJEK8ig6p24qx7soIQALZx8AZ347cZKkKh2qzatdGD
RiBdxcsY3U8klOjQcw7ucrbjXBhvE8FYjmD56eSbVU2KVByCs6jTeK4KFXMdpQsS
mNvSW0MLAQFpRyymkpCCP8Gz2beG8vA3hIqUhQAdErsp9CbTzltj69i5lNMFBTks
r+X2+14UdWqG0pvrdpuBUAUbumfSG+5awon4/48jI8XkeOn5WA+0QvztY/F6DRI4
ntotzo3Ux6Zvghsqqk9IwVFmFdtMPV6kpNDKHmbpJa08a1ADVzs7JQ2DyDo4lUrB
BsbUuisrH1Ws0NByNnCCgIummt7grLZ7o+jdAxNNLJ8RNxWp9zZ288BOEVaqLL+M
C2oRvZOCGxdJI88SKFAEXLiXUmh/kv64qDJO1985O2OKBDjZI+ZQG0V8+kSNljw/
7WuaapMeUJf7QPAxRng7eusVQB+VkzohrCFQR+1Sqxf10lEEc8JpJyxrgLpsKP2R
M9y7p5RE7Twh4pxV1Hy/Wm1qe0LDwZQJZw+g/6gokExWFUUc83Z+ZIv360DvoSt2
FRM9EQuOuveCS6GtpLLoVTiG+vaAgjm9Q/Pkt+AgFxvqcRV5tyyQi1wlzbscj45a
Lwy1kWNRCedP+P93Ouqv0yeCDG6AZjAoxMhPAGMGTjn+67+Ny2FghbptSN8k9e1j
o0gvi395BiCqA+rZd1F8
=qS+j
-----END PGP SIGNATURE-----




Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Sun, 07 Jul 2013 07:26: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: Mon Apr 21 02:25:24 2014; Machine Name: buxtehude.debian.org

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