Hi Richard, folks,
Jiri said to me on IRC:
<jmoskovc> the debuginfo-install support in PackageKit seems to be finally working <jmoskovc> so if you want, you can change the old debuginfo-install script for pk-debuginfo-install
Here is a quick recap how we currently do it, what's wrong with it, and how it can be improved.
When we process a crash, we have a core file. We just run gdb on it in batch mode by running
gdb -batch -x FILE
where FILE contains:
file BINARY code COREFILE thread apply all backtrace full q
This produces a backtrace. gdb tries to produce better backtrace (with line numbers, variable names and so on) using debug info.
It tries to locate debuginfo by finding executable's build id, and uses debuginfo if it is found.
example: # ls -l /usr/lib/debug/.build-id/00/5af5b5e7d6ab560825b0747fcbe41112431b8c.debug lrwxrwxrwx 1 root root 28 2009-07-20 18:08 /usr/lib/debug/.build-id/00/5af5b5e7d6ab560825b0747fcbe41112431b8c.debug -> ../../usr/bin/makestrs.debug
However, we (abrt) do not know whether debuginfo is installed, so currently we just run "debuginfo-install -y -- PACKAGE".
This is a simple approach, but it has several drawbacks.
* we install debuginfo packages even if debuginfo files are present. For example, some people in large installations mount a network filesystem on /usr/lib/debug/ with *all* debuginfos installed, in order to reduce unneeded downloads. Running debuginfo-install in this case is not only unproductive, it will likely fail.
* we install all debuginfos, even those not needed for this particular crash. There may be dozens of libraries linked in, yet the stacktrace processing may not need debuginfo for most of them.
* Jiri pointed out another problem: we may be installing debuginfos for a wrong version of the executable. It does not mess up stacktrace, it just does not help gdb at all.
So, Richard, what is this pk-debuginfo-install thing, and how it can help us here? In what ways is it different from debuginfo-install?
----- "Denys Vlasenko" dvlasenk@redhat.com wrote:
So, Richard, what is this pk-debuginfo-install thing, and how it can help us here? In what ways is it different from debuginfo-install?
The main difference is that it uses PackageKit, so it:
* can be used by a non-root user * doesn't take the yum lock * integrates with other software using PackageKit * error granularity, so you don't have to parse stdout to find out why the command failed
This is the output from --help:
[hughsie@hughsie-laptop ~]$ pk-debuginfo-install --help Usage: pk-debuginfo-install [OPTION...]
PackageKit Debuginfo Installer
Help Options: -h, --help Show help options
Application Options: -v, --verbose Show extra debugging information -s, --simulate Don't actually install any packages, only simulate what would be installed -n, --no-depends Do not install dependencies of the core packages -q, --quiet Do not display information or progress
And in the man page (man pk-debuginfo-install) more details are exposed:
RETURN VALUES 0 Success, at least one package was installed 1 Failed with miscellaneous internal error. 3 Failed to get software sources list. 4 Failed to enable software sources. 5 Failed as nothing to do. 6 Failed to find dependant packages. 7 Failed to install. 8 Failed to disable software sources.
But it's pretty much a drop in replacement for debuginfo-install from an end-user perspective.
Richard.
On Thu, 2009-09-03 at 12:07 -0400, Richard Hughes wrote:
----- "Denys Vlasenko" dvlasenk@redhat.com wrote:
So, Richard, what is this pk-debuginfo-install thing, and how it can help us here? In what ways is it different from debuginfo-install?
The main difference is that it uses PackageKit, so it:
- can be used by a non-root user
- doesn't take the yum lock
- integrates with other software using PackageKit
- error granularity, so you don't have to parse stdout to find out why the command failed
This is the output from --help:
[hughsie@hughsie-laptop ~]$ pk-debuginfo-install --help Usage: pk-debuginfo-install [OPTION...]
PackageKit Debuginfo Installer
Help Options: -h, --help Show help options
Application Options: -v, --verbose Show extra debugging information -s, --simulate Don't actually install any packages, only simulate what would be installed -n, --no-depends Do not install dependencies of the core packages -q, --quiet Do not display information or progress
Something is missing. You probably meant
pk-debuginfo-install [OPTION...] PACKAGE_NAME
And in the man page (man pk-debuginfo-install) more details are exposed:
RETURN VALUES 0 Success, at least one package was installed 1 Failed with miscellaneous internal error. 3 Failed to get software sources list. 4 Failed to enable software sources. 5 Failed as nothing to do. 6 Failed to find dependant packages. 7 Failed to install. 8 Failed to disable software sources.
But it's pretty much a drop in replacement for debuginfo-install from an end-user perspective.
Can you implement an -y switch to be even more compatible?
Currently it is accepted but ignored, I still get confirmation prompt:
# pk-debuginfo-install -y -- unzip-5.52-10.fc11.x86_64 1. Getting sources list...OK. Found 10 enabled and 34 disabled sources. 2. Finding debugging sources...OK. Found 6 disabled debuginfo repos. 3. Enabling debugging sources...OK. Enabled 6 debugging sources. 4. Finding debugging packages...Failed to find the package : more than one package found for Failed to find the package : more than one package found for OK. Found 1 packages: 5. Finding packages that depend on these packages...OK. Found 2 extra packages. Found 3 packages to install: 1 unzip-debuginfo-5.52-10.fc11(x86_64) fedora-debuginfo 2 bash-debuginfo-4.0-8.fc11(x86_64) updates-debuginfo 3 bash-debuginfo-4.0-8.fc11(x86_64) updates-debuginfo 6. Installing packages... Starting install [=========================] The following packages have to be installed: unzip-debuginfo-5.52-10.fc11.x86_64 bash-debuginfo-4.0-8.fc11.x86_64 Proceed with changes? [N/y]
----- "Denys Vlasenko" dvlasenk@redhat.com wrote:
Something is missing. You probably meant pk-debuginfo-install [OPTION...] PACKAGE_NAME
Patch welcome :-)
But it's pretty much a drop in replacement for debuginfo-install
from an end-user perspective.
Can you implement an -y switch to be even more compatible?
Sure, I'll stick it on my TODO. It should only take a few minutes.
Richard.
----- "Richard Hughes" rhughes@redhat.com wrote:
Sure, I'll stick it on my TODO. It should only take a few minutes.
commit 0c5c33dde299e018818a568f9756c0215239ba83 Author: Richard Hughes richard@hughsie.com Date: Wed Sep 30 16:18:56 2009 +0100
debuginfo-install: add a --noninteractive (short option -y) command line option to supress the simulate-before-install behaviour
You can find the code in PackageKit git master. Yell if you want a F12 rpm.
Richard.
crash-catcher@lists.fedorahosted.org