Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Jan Kratochvil <jan.kratochvil@redhat.com>
To: Paul Pluzhnikov <ppluzhnikov@google.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [patch] Fix GNU/Linux core open: Can't read pathname for load map: Input/output error.
Date: Tue, 17 May 2011 17:09:00 -0000	[thread overview]
Message-ID: <20110517170849.GA2463@host1.jankratochvil.net> (raw)
In-Reply-To: <BANLkTikAoU9_nZJ9Khyvgx+ABa2tx1gbQQ@mail.gmail.com>

On Tue, 17 May 2011 03:06:11 +0200, Paul Pluzhnikov wrote:
> I see this all the time, and it causes end-user confusion.

(a)
The fix should be in glibc and not in gdb but it was rejected in glibc.

(b) 
Loading libraries for a core file from the inferior solist stored in the core
file does not work anyway.  If you have a crashed application with memory
corruption commonly the inferior solist is also corrupted, GDB fails to find
the libraries, therefore fails to load relocated symbols and therefore fails
to display symbols for the backtrace.

The right approach is to map symbols for libraries according to their
build-ids (when available).  This is no longer dependent on the corrupted
solist.  And it is also no longer dependent on this glibc bug as the solist
will no longer get used (it will - to check for libraries not having
build-id).

Unfortunately the whole build-id locating patch is not yet in FSF GDB.
	http://sourceware.org/ml/gdb-patches/2010-11/msg00353.html
	http://sourceware.org/ml/gdb-patches/2010-11/msg00354.html
or:
	http://pkgs.fedoraproject.org/gitweb/?p=gdb.git;a=blob_plain;f=gdb-6.6-buildid-locate.patch;hb=f15
	http://pkgs.fedoraproject.org/gitweb/?p=gdb.git;a=blob_plain;f=gdb-6.6-buildid-locate-rpm.patch;hb=f15
	http://pkgs.fedoraproject.org/gitweb/?p=gdb.git;a=blob_plain;f=gdb-6.6-buildid-locate-rpm-librpm-workaround.patch;hb=f15
	http://pkgs.fedoraproject.org/gitweb/?p=gdb.git;a=blob_plain;f=gdb-6.6-buildid-locate-core-as-arg.patch;hb=f15

I do not yet have written the build-id extension for mapping solibs but I will
do it soon as it affects Fedora ABRT backtracing a lot.


Thanks,
Jan


  reply	other threads:[~2011-05-17 17:09 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-06 21:46 Jan Kratochvil
2011-05-17  1:07 ` Paul Pluzhnikov
2011-05-17 17:09   ` Jan Kratochvil [this message]
2011-05-17 18:58     ` Paul Pluzhnikov
2011-05-17 19:03       ` Jan Kratochvil

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110517170849.GA2463@host1.jankratochvil.net \
    --to=jan.kratochvil@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=ppluzhnikov@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox