Bug 585039 - RFE: abrt-cli command to initiate abrt-download-debuginfo operation
RFE: abrt-cli command to initiate abrt-download-debuginfo operation
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: abrt (Show other bugs)
13
All Linux
low Severity medium
: ---
: ---
Assigned To: Denys Vlasenko
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-04-22 19:52 EDT by Frank Ch. Eigler
Modified: 2011-06-23 23:25 EDT (History)
8 users (show)

See Also:
Fixed In Version: abrt-2.0.3-1.fc15
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-06-23 23:25:12 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Frank Ch. Eigler 2010-04-22 19:52:35 EDT
For systemtap/gdb purposes, it would be handy if a user could initiate
automagic download of debuginfo on demand, without having to do
sudo debuginfo-install.  If abrtd is already running, its cache under
/var/cache/abrt-di would be a dandy place to find such goods.

For an unprivileged user to be able to request debuginfo downloading
probably does not represent a great hazard, since that user could
already launch the same program, and interfere with it to cause it
to SEGV, and go to abrtd indirectly that way.
Comment 1 Denys Vlasenko 2011-05-16 15:50:13 EDT
To generate a list of build-ids from coredump or a binary:

$ abrt-action-analyze-core.py -c /bin/bash | tee build_ids
Analyzing coredump '/bin/bash'
f9542634e0839b41de9e55a2abb17fe0fbf8c8c8

To perform the download of debuginfos:

$ abrt-action-install-debuginfo
Coredump references 1 debuginfo files, 1 of them are not installed
Could not parse metalink https://mirrors.fedoraproject.org/metalink?repo=updates-released-debug-f15&arch=i386 error was 
No repomd file
Looking for needed packages in repositories
Packages to download: 1
Downloading 1.24Mb, installed size: 4.86Mb
Is this ok? [y/N] y
Downloading (1 of 1) bash-debuginfo-4.2.10-2.fc15.i686.rpm: 100%
Extracting cpio from /tmp/abrt-tmp-debuginfo-2011-05-16-21:42:37.22176/bash-debuginfo-4.2.10-2.fc15.i686.rpm
Caching files from unpacked.cpio made from bash-debuginfo-4.2.10-2.fc15.i686.rpm
All downloaded packages have been extracted, removing /tmp/abrt-tmp-debuginfo-2011-05-16-21:42:37.22176

Noticed that abrt-action-install-debuginfo magically knew to look for file named "build_ids"?

Yes. The reason is that abrt-action-install-debuginfo is suid wrapper binary, therefore it is very paranoid about its params. Even though --help says:

$ abrt-action-install-debuginfo --help
Usage: abrt-action-install-debuginfo.py [-vy] [--ids=BUILD_IDS_FILE]
       [--tmpdir=TMPDIR] [--cache=CACHEDIR] [--size_mb=SIZE]

Installs debuginfos for all build-ids listed in BUILD_IDS_FILE
to CACHEDIR, using TMPDIR as temporary staging area.
Old files in CACHEDIR are deleted until it is smaller than SIZE.

    -v          Be verbose
    -y          Noninteractive, assume 'Yes' to all questions
    --ids       Default: build_ids
    --tmpdir    Default: /tmp/abrt-tmp-debuginfo-RANDOM_SUFFIX
    --cache     Default: /var/cache/abrt-di
    --size_mb   Default: 4096


you can't actually use --ids, --cache or --tmpdir: it won't allow you to pass them to the python wrapper (note abrt-action-install-debuginfo.***PY*** in the help output), to not allow you to access "wrong" files under abrt user it is suid'ed to.

You have to either use abrt-action-install-debuginfo with default params, as I show above, or call wrapped tool, abrt-action-install-debuginfo.py, directly. But then you'll have to specify --cache different from /var/cache/abrt-di - that one isn't writable to normal users.

I am going to improve the wrapper to allow --ids=- (meaning "take stdin").
Comment 2 Denys Vlasenko 2011-05-16 17:13:22 EDT
Fixed in git by the following commits:

commit 79085fda802056f096b61a526e95e08136faf95d
Author: Denys Vlasenko <dvlasenk@redhat.com>
Date:   Mon May 16 23:10:37 2011 +0200

    Remove .py from abrt-action-install-debuginfo.py

    Rename abrt-action-install-debuginfo to
    abrt-action-install-debuginfo-to-abrt-cache

    Yes, it's ugly long...

    Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>

commit 554dc681d36b7e1cb306eb8d7ce5958a87dfc397
Author: Denys Vlasenko <dvlasenk@redhat.com>
Date:   Mon May 16 22:27:59 2011 +0200

    abrt-action-install-debuginfo: support --ids=- (read from stdin)

    Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
Comment 3 Bug Zapper 2011-06-02 10:58:28 EDT
This message is a reminder that Fedora 13 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 13.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '13'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 13's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 13 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 4 Fedora Update System 2011-06-21 09:45:20 EDT
abrt-2.0.3-1.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/abrt-2.0.3-1.fc15
Comment 5 Fedora Update System 2011-06-21 19:56:14 EDT
Package abrt-2.0.3-1.fc15:
* should fix your issue,
* was pushed to the Fedora 15 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing abrt-2.0.3-1.fc15'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/abrt-2.0.3-1.fc15
then log in and leave karma (feedback).
Comment 6 Fedora Update System 2011-06-23 23:23:20 EDT
abrt-2.0.3-1.fc15 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.