Bug 615279

Summary: directory size check should use st_blocks, not st_size
Product: [Fedora] Fedora Reporter: Jan Kratochvil <jan.kratochvil>
Component: abrtAssignee: Denys Vlasenko <dvlasenk>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: 15CC: anton, dvlasenk, iprikryl, jmoskovc, kklic, mtoman, npajkovs
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-06-07 13:59:09 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jan Kratochvil 2010-07-16 10:50:55 UTC
Description of problem:
I had a valid still not reported bugreport.
bigcore.exp sparse core file needlessly deleted it.

Version-Release number of selected component (if applicable):
abrt-1.1.1-1.fc13.x86_64

How reproducible:
Seen in the log.

Steps to Reproduce:
1. Generate valid crash for ABRT.
2. cd gdb/testsuite; runtest gdb.base/bigcore.corefile

Actual results:
Jul 16 12:38:40 host1 abrt[28006]: saved core dump of pid 27881 (/var/lib/mock/fedora-13-x86_64/root/home/jkratoch/hammock/20100716Build-gdbcvsgcc44-f13/fedora-13-x86_64/build/src/gdb/testsuite.unix.-m32/gdb.base/bigcore) to /var/cache/abrt/ccpp-1279276718-27881.new/coredump (1023840256 bytes)
Jul 16 12:38:40 host1 abrtd: Directory 'ccpp-1279276718-27881' creation detected
Jul 16 12:38:40 host1 abrtd: Size of '/var/cache/abrt' >= 1000 MB, deleting 'ccpp-1279275118-13562'

Expected results:
No need to delete anything as the second core file has just 1.9MB.

Additional info:
$ du -sh gdb.base/bigcore.corefile
1.9M	gdb.base/bigcore.corefile
$ du -sh --apparent-size gdb.base/bigcore.corefile
977M	gdb.base/bigcore.corefile
$ stat gdb.base/bigcore.corefile
  File: `gdb.base/bigcore.corefile'
  Size: 1023840256	Blocks: 3736       IO Block: 4096   regular file
Device: fd01h/64769d	Inode: 14909576    Links: 1
Access: (0600/-rw-------)  Uid: (  502/jkratoch)   Gid: (  502/jkratoch)
Access: 2010-07-16 12:45:35.000000000 +0200
Modify: 2010-07-16 12:45:35.000000000 +0200
Change: 2010-07-16 12:45:35.000000000 +0200

Comment 1 Jan Kratochvil 2011-02-22 15:44:24 UTC
ping, still cannot use ABRT.

I got an advice about blacklists but it does not work, it gets applied too late:

BlackListedPaths = ..., */gdb/testsuite*

abrt[21705]: saved core dump of pid 21702 (/home/.../gdb/testsuite/gdb.base/bigcore) to /var/spool/abrt/ccpp-1298389302-21702.new/coredump (1019277312 bytes)
abrtd: Directory 'ccpp-1298389302-21702' creation detected
abrtd: Size of '/var/spool/abrt' >= 1000 MB, deleting 'ccpp-1298389278-21604'
abrtd: Blacklisted executable '/home/jkratoch/redhat/gdb-clean/gdb/testsuite/gdb.base/bigcore'
abrtd: Corrupted or bad crash /var/spool/abrt/ccpp-1298389302-21702 (res:2), deleting

Verified on: abrt-1.1.17-1.fc14.x86_64

Comment 2 Jiri Moskovcak 2011-02-22 16:11:22 UTC
Actually the workaround is to increase the max report size in /etc/abrt/abrt.conf:

MaxCrashReportsSize = <YOUR NEW MAXIMUM>

the default is 1000 MB and with the wrong size check in abrt it will decide to delete your core.

Comment 3 Jan Kratochvil 2011-02-22 16:18:25 UTC
(In reply to comment #2)
> MaxCrashReportsSize = <YOUR NEW MAXIMUM>

This workaround works, thanks.  BTW it is still just a workaround.

Comment 4 Bug Zapper 2011-06-01 13:43:56 UTC
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 5 Jiri Moskovcak 2011-06-01 13:51:04 UTC
This bug still exists, bumping to F15.

Comment 6 Denys Vlasenko 2011-06-07 13:59:09 UTC

*** This bug has been marked as a duplicate of bug 679720 ***