Bug 588945

Summary: sparse core files performance hit
Product: [Fedora] Fedora Reporter: Jan Kratochvil <jan.kratochvil>
Component: abrtAssignee: Denys Vlasenko <dvlasenk>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: 12CC: anton, dvlasenk, iprikryl, jmoskovc, keiths, kklic, mnowak, npajkovs
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: abrt-1.1.13-1.fc12 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 591504 (view as bug list) Environment:
Last Closed: 2010-08-17 05:28:06 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:
Bug Depends On:    
Bug Blocks: 591504    
Attachments:
Description Flags
Proposed fix none

Description Jan Kratochvil 2010-05-04 21:41:56 UTC
Description of problem:
When the core file is large and sparse abrtd slows down the system up to 240x.
GDB gdb.base/bigcore.exp explicitly exploits this problem but it can be seen in other real world core dumps.
If nothing else abrtd should at least optimize write(usercorefile,zeroes) to lseek().

Version-Release number of selected component (if applicable):
abrt-1.0.9-2.fc12.x86_64

How reproducible:
Always.

Steps to Reproduce:
Download some gdb.
./configure
make
cd gdb/testsuite
make site.exp
time runtest gdb.base/bigcore.exp
service abrtd stop
time runtest gdb.base/bigcore.exp

Actual results:
real	1m41.021s (Keith Seitz has reported ~8min on his box)
real	0m2.223s

Expected results:
real	<few secs>
real	0m2.223s

Additional info:
read(1, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 4096) = 4096
write(3, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 4096) = 4096
...
  PID TTY      STAT   TIME COMMAND
   12 ?        S      0:01  \_ [khelper]
21699 ?        D      0:02  |   \_ /usr/libexec/abrt-hook-ccpp /var/cache/abrt 21696 6 502 17179869184
...
/proc/21699/fd/
lr-x------ 1 root root 64 2010-05-04 23:31 0 -> pipe:[11399566]
lrwx------ 1 root root 64 2010-05-04 23:31 1 -> /var/cache/abrt/ccpp-1273008577-21696/coredump\ (deleted)
lrwx------ 1 root root 64 2010-05-04 23:31 2 -> socket:[11401038]
l-wx------ 1 root root 64 2010-05-04 23:31 3 -> /home/.../gdb/testsuite/core.21696

Comment 1 Jan Kratochvil 2010-05-04 21:55:56 UTC
Maybe some hardlink would also help etc., unaware what abrt does there.

Comment 2 Denys Vlasenko 2010-05-07 12:47:03 UTC
Created attachment 412336 [details]
Proposed fix

Run tested.

Comment 3 Denys Vlasenko 2010-05-07 13:15:20 UTC
"time runtest gdb.base/bigcore.exp" with this patch went down from 

real	9m23.708s
user	0m0.285s
sys	0m22.819s

to

real	0m35.821s
user	0m0.318s
sys	0m8.738s

Comment 4 Fedora Update System 2010-08-11 11:09:00 UTC
abrt-1.1.13-1.fc14 has been submitted as an update for Fedora 14.
http://admin.fedoraproject.org/updates/abrt-1.1.13-1.fc14

Comment 5 Fedora Update System 2010-08-12 12:57:44 UTC
abrt-1.1.13-1.fc13 has been submitted as an update for Fedora 13.
http://admin.fedoraproject.org/updates/abrt-1.1.13-1.fc13

Comment 6 Fedora Update System 2010-08-12 19:52:01 UTC
abrt-1.1.13-1.fc14 has been pushed to the Fedora 14 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update abrt'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/abrt-1.1.13-1.fc14

Comment 7 Fedora Update System 2010-08-16 14:06:21 UTC
abrt-1.1.13-1.fc12 has been submitted as an update for Fedora 12.
http://admin.fedoraproject.org/updates/abrt-1.1.13-1.fc12

Comment 8 Fedora Update System 2010-08-17 05:26:36 UTC
abrt-1.1.13-1.fc13 has been pushed to the Fedora 13 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 9 Fedora Update System 2010-08-20 13:30:55 UTC
abrt-1.1.13-2.fc14 has been submitted as an update for Fedora 14.
http://admin.fedoraproject.org/updates/abrt-1.1.13-2.fc14

Comment 10 Fedora Update System 2010-08-24 01:11:32 UTC
abrt-1.1.13-2.fc14 has been pushed to the Fedora 14 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 11 Fedora Update System 2010-08-24 21:17:14 UTC
abrt-1.1.13-1.fc12 has been pushed to the Fedora 12 stable repository.  If problems still persist, please make note of it in this bug report.