Bug 851097 - 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: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: abrt (Show other bugs)
6.4
x86_64 Linux
unspecified Severity medium
: rc
: ---
Assigned To: abrt
Lukas Zachar
:
: 849038 (view as bug list)
Depends On: 832085
Blocks:
  Show dependency treegraph
 
Reported: 2012-08-23 04:56 EDT by Jiri Moskovcak
Modified: 2015-02-01 17:55 EST (History)
16 users (show)

See Also:
Fixed In Version: abrt-2.0.8-8.el6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 832085
Environment:
Last Closed: 2013-02-21 02:54:15 EST
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 Jiri Moskovcak 2012-08-23 04:56:02 EDT
+++ This bug was initially created as a clone of Bug #832085 +++

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

--- Additional comment from dvlasenk@redhat.com on 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

--- Additional comment from updates@fedoraproject.org on 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

--- Additional comment from updates@fedoraproject.org on 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).

--- Additional comment from updates@fedoraproject.org on 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 4 Jiri Moskovcak 2012-08-23 10:00:54 EDT
*** Bug 849038 has been marked as a duplicate of this bug. ***
Comment 8 errata-xmlrpc 2013-02-21 02:54:15 EST
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2013-0290.html

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