Bug 679720 - CORENAME_MAX_SIZE overflow, core files lost + not reported
Summary: CORENAME_MAX_SIZE overflow, core files lost + not reported
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: abrt
Version: 14
Hardware: x86_64
OS: Linux
high
high
Target Milestone: ---
Assignee: Denys Vlasenko
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 615279 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-02-23 10:35 UTC by Jan Kratochvil
Modified: 2011-06-24 03:24 UTC (History)
7 users (show)

Fixed In Version: abrt-2.0.3-1.fc15
Clone Of:
Environment:
Last Closed: 2011-06-24 03:24:44 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
Proposed fix. (4.15 KB, patch)
2011-06-07 14:46 UTC, Denys Vlasenko
no flags Details | Diff

Description Jan Kratochvil 2011-02-23 10:35:39 UTC
Description of problem:
Bug 530637 fix still does not work in some cases.
Core files are not detected/reported by ABRT either.

Version-Release number of selected component (if applicable):
abrt-1.1.17-1.fc14.x86_64
kernel-debug-2.6.35.11-83.fc14.x86_64

How reproducible:
Always

Steps to Reproduce:
cd .../gdb/testsuite; runtest gdb.base/corefile.exp
or
echo 'main(){abort();}'|gcc -o abort-with-very-very-long-filename -x c -
rm core.*
ulimit -c unlimited
./abort-with-very-very-long-filename
ls core.*

Actual results:
WARNING: can't generate a core file - core tests suppressed - check ulimit -c
Aborted (core dumped)
ls: cannot access core.*: No such file or directory

Expected results:
# of expected passes		25
core.28586

Additional info:
With the Bug 615279 Comment 2 workaround trying to start using ABRT.

With short executable filename the line is already 128 bytes long:
|/usr/libexec/abrt-hook-ccpp /var/spool/abrt 6 18446744073709551615 24694 502 502 1298453794 host1.dyn.jankratochvil.net abort 6

With long executable filename kernel omits the end part completely:
|/usr/libexec/abrt-hook-ccpp /var/spool/abrt 6 18446744073709551615 26555 502 502 1298454278 host1.dyn.jankratochvil.net

In such case ABRT does not write anything to the logs and it also does not create any regular corefile despite `ulimit -c unlimited'.

fs/exec.c format_corename() uses CORENAME_MAX_SIZE:
include/linux/binfmts.h:#define CORENAME_MAX_SIZE 128

Comment 1 Denys Vlasenko 2011-06-07 13:59:09 UTC
*** Bug 615279 has been marked as a duplicate of this bug. ***

Comment 2 Denys Vlasenko 2011-06-07 14:46:53 UTC
Created attachment 503506 [details]
Proposed fix.

The patch uses two ways to shorten core pattern:

(1) do not pass hostname - hook can determine it itself
(2) pass executable name only if we know old pattern had it (otherwise we don't need it)

Comment 3 Denys Vlasenko 2011-06-07 14:49:58 UTC
Pushed to git in this commit:

commit b0811dd6938902401a378b83ee9b123be7e7c228
Author: Denys Vlasenko <dvlasenk>
Date:   Tue Jun 7 16:48:16 2011 +0200

    abrt-hook-ccpp: never pass %h corename spec and avoid passing %e if possible

Comment 4 Fedora Update System 2011-06-21 13:44:45 UTC
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 23:55:42 UTC
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-24 03:22:39 UTC
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.