Bug 832085 - core_pattern with %e (executable filename) is not matched correctly in abrt-install-ccpp-hook
core_pattern with %e (executable filename) is not matched correctly in abrt-i...
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: abrt (Show other bugs)
17
x86_64 Linux
unspecified Severity medium
: ---
: ---
Assigned To: abrt
Fedora Extras Quality Assurance
:
Depends On:
Blocks: 851097
  Show dependency treegraph
 
Reported: 2012-06-14 09:30 EDT by Richard Jørgensen
Modified: 2012-08-29 20:56 EDT (History)
9 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 851097 (view as bug list)
Environment:
Last Closed: 2012-08-29 20:56:59 EDT
Type: Bug
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 Richard Jørgensen 2012-06-14 09:30:22 EDT
Description of problem:
Including executable filename in coredump dumpfile pattern name only produces a "e" in place of the filename.

The problem stems from this line in /usr/sbin/abrt-install-ccpp-hook:
        if test x"${cur#.*%e}" = x"${cur}"; then
which should have been:
        if test x"${cur#*%e}" = x"${cur}"; then

'.*' is regexp for matching all but bash variable expansion uses shell expansion where '*' matches all. abrt-install-ccpp-hook only works correct on %e if /proc/sys/kernel/core_pattern starts with '.'.

Version-Release number of selected component (if applicable):
abrt-addon-ccpp-2.0.10-4.fc17.x86_64

How reproducible:
100%

Steps to Reproduce:
1. Stop abrt-ccpp.service
2. Set core_pattern to core.%e
3. Start abrt-ccpp.service
4. Make a coredump
  
Actual results:
# systemctl stop abrt-ccpp.service
# echo "core.%e" >/proc/sys/kernel/core_pattern 
# systemctl start abrt-ccpp.service
# cat /proc/sys/kernel/core_pattern
|/usr/libexec/abrt-hook-ccpp %s %c %p %u %g %t e
# ulimit -c unlimited
# cat &
[1] 8487
# kill -11 %1

[1]+  Stopped                 cat
# fg
cat
Segmentation fault (core dumped)
# ls -l core*
-rw------- 1 root root 376832 Jun 14 15:27 core.e


Expected results:
# systemctl stop abrt-ccpp.service
# echo "core.%e" >/proc/sys/kernel/core_pattern 
# systemctl start abrt-ccpp.service
# cat /proc/sys/kernel/core_pattern
|/usr/libexec/abrt-hook-ccpp %s %c %p %u %g %t %e
# ulimit -c unlimited
# cat &
[1] 8487
# kill -11 %1

[1]+  Stopped                 cat
# fg
cat
Segmentation fault (core dumped)
# ls -l core*
-rw------- 1 root root 376832 Jun 14 15:27 core.cat

Additional info:
Same bug also verified in Red Hat Enterprise Linux 6.2
Comment 1 Denys Vlasenko 2012-06-15 06:12:09 EDT
Fixed in git:

commit e8dff80c426978fed954e83787707e60bc6e7e89
Author: Denys Vlasenko <vda.linux@googlemail.com>
Date:   Fri Jun 15 12:10:35 2012 +0200

    abrt-install-ccpp-hook: fix the check for %e presense. Closes rhbz#832085
Comment 2 Fedora Update System 2012-08-03 06:27:21 EDT
abrt-2.0.11-1.fc17,libreport-2.0.11-1.fc17,btparser-0.18-2.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/abrt-2.0.11-1.fc17,libreport-2.0.11-1.fc17,btparser-0.18-2.fc17
Comment 3 Fedora Update System 2012-08-05 17:34:25 EDT
Package abrt-2.0.11-1.fc17, btparser-0.18-2.fc17, libreport-2.0.12-1.fc17:
* should fix your issue,
* was pushed to the Fedora 17 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.11-1.fc17 btparser-0.18-2.fc17 libreport-2.0.12-1.fc17'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-11529/abrt-2.0.11-1.fc17,libreport-2.0.12-1.fc17,btparser-0.18-2.fc17
then log in and leave karma (feedback).
Comment 4 Fedora Update System 2012-08-09 19:09:39 EDT
Package libreport-2.0.12-2.fc17, abrt-2.0.11-1.fc17, btparser-0.18-2.fc17:
* should fix your issue,
* was pushed to the Fedora 17 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing libreport-2.0.12-2.fc17 abrt-2.0.11-1.fc17 btparser-0.18-2.fc17'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-11529/abrt-2.0.11-1.fc17,libreport-2.0.12-2.fc17,btparser-0.18-2.fc17
then log in and leave karma (feedback).
Comment 5 Fedora Update System 2012-08-23 19:28:09 EDT
Package abrt-2.0.12-1.fc17, libreport-2.0.13-1.fc17, btparser-0.18-2.fc17:
* should fix your issue,
* was pushed to the Fedora 17 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.12-1.fc17 libreport-2.0.13-1.fc17 btparser-0.18-2.fc17'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-11529/abrt-2.0.12-1.fc17,libreport-2.0.13-1.fc17,btparser-0.18-2.fc17
then log in and leave karma (feedback).
Comment 6 Fedora Update System 2012-08-29 20:56:59 EDT
abrt-2.0.12-1.fc17, libreport-2.0.13-2.fc17, btparser-0.18-2.fc17 has been pushed to the Fedora 17 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.