Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 851097

Summary: core_pattern with %e (executable filename) is not matched correctly in abrt-install-ccpp-hook
Product: Red Hat Enterprise Linux 6 Reporter: Jiri Moskovcak <jmoskovc>
Component: abrtAssignee: abrt <abrt-devel-list>
Status: CLOSED ERRATA QA Contact: Lukáš Zachar <lzachar>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.4CC: abrt-devel-list, bugzilla_redhat_com, dfediuck, dkutalek, dvlasenk, hkrzesin, iprikryl, jmoskovc, kklic, mmilata, mnowak, mtoman, nobody+abrt-devel-list, npajkovs, ovasik, pingale
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
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 07:54:15 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 832085    
Bug Blocks:    

Description Jiri Moskovcak 2012-08-23 08:56:02 UTC
+++ 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 on 2012-06-15 06:12:09 EDT ---

Fixed in git:

commit e8dff80c426978fed954e83787707e60bc6e7e89
Author: Denys Vlasenko <vda.linux>
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 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 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 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 14:00:54 UTC
*** Bug 849038 has been marked as a duplicate of this bug. ***

Comment 8 errata-xmlrpc 2013-02-21 07:54:15 UTC
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