This is the mail archive of the elfutils-devel@sourceware.org mailing list for the elfutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: Build IDs for finding packages


I'm confused as to how the first install method below (the yum based one) is supposed to work. Is the translation from the .build-id path to a package name supposed to happen on my machine or on the repository? My Fedora machine doesn't have a /usr/lib/debug/.build-id directory yet (I haven't installed any debug packages on it) and when I tried the syntax below for libc-2.16.so's build ID it said no package available.

There is also an additional limitation with this technique which I ran into when trying to install old versions of the libc6 symbols on Ubuntu. The Ubuntu package manager will not let me install old symbols. It says they are incompatible with my currently installed libc6. The solution I came up with is to download the debug packages and extract their contents, rather than installing them. Any fully formed solution needs to have this option -- a way to download a package based on a build ID without necessarily installing it.

The second technique, using abrt-action-install-debuginfo, worked for my libc-2.16.so test case. I haven't tested to see whether it will work for versions of packages that I don't have installed but it seems quite likely that it would. It's one weakness (compared to the theoretical value of darkserver) is that it seems to only work when run from Fedora. We do our development on Ubuntu and it is best when we can find symbols without having to install a different Linux version.

To be clear, the scenario that I am most interested in -- the challenging scenario which is not currently addressed and which build IDs could address -- is downloading symbols on my machine for a package that is installed on someone else's machine. This is necessary when analyzing core files or breakpad crashes coming from customers on a wide range of distributions. I've found pretty good techniques for doing this, but the lack of build-ID support means they are more ad-hoc than they need to be. Here's what I've written on this topic so far, including techniques for getting Fedora and ARCH symbols from my Ubuntu machine:

http://randomascii.wordpress.com/2013/01/19/symbols-on-linux-part-two-symbols-for-other-versions/

I come from a Windows background where I have seen the value of automatic symbol downloading through symbol servers and I think the Linux community would benefit from having similar capabilities, both for crash analysis and profiling.

-----Original Message-----
From: Mark Wielaard [mailto:mjw@redhat.com] 
Sent: Saturday, January 26, 2013 12:35 PM
To: Bruce Dawson
Cc: kushal@fedoraproject.org; 'elfutils-devel@lists.fedorahosted.org'
Subject: Re: Build IDs for finding packages

On Fri, Jan 25, 2013 at 07:02:53PM +0100, Mark Wielaard wrote:
> For Fedora there is Darkserver https://darkserver.fedoraproject.org/

I should have mentioned two other techniques which work at least on Fedora (and derived) systems:

If you have a build-id then getting the debuginfo package can be done by trying to install the build-id derived symlink. For example given build-id 8bd8064a80f57906f7e21504f13a86110cdb4535:

$ yum --enablerepo=fedora-debuginfo install /usr/lib/debug/.build-id/8b/d8064a80f57906f7e21504f13a86110cdb4535.debug

Will install zlib-debuginfo-1.2.7-9.fc18.x86_64. That package contains /usr/lib/debug/.build-id/8b/d8064a80f57906f7e21504f13a86110cdb4535.debug
which is a symlink to /usr/lib/debug/usr/lib64/libz.so.1.2.7.debug
(Note the slash after the first two hex-digits of the build-id.)

This only works for the latest/updated release and only for the primary architecture. But this is often what you want if you are working on the machine itself. gdb and systemtap for example will suggest that when they need symbol/debug info for a build-id for which the debuginfo package hasn't been installed yet.

Another option (that systemtap will use for unprivileged users) when abrt is installed (abrt is a crash catcher installed by default on fedora) is to use:

echo 8bd8064a80f57906f7e21504f13a86110cdb4535 \
  | abrt-action-install-debuginfo --ids=- --cache=/tmp

That will install the same debuginfo package files under /tmp/

Cheers,

Mark

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]