Bug 191348

Summary: performance problem due to unneeded stat64() calls
Product: [Fedora] Fedora Reporter: David Woodhouse <dwmw2>
Component: rpmAssignee: Panu Matilainen <pmatilai>
Status: CLOSED RAWHIDE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 9CC: triage
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard: bzcl34nup
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-03-07 08:38:32 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description David Woodhouse 2006-05-11 01:22:39 UTC
Running 'rpm -e --allmatches --justdb kernel-devel' I naïvely expected it to
complete relatively quickly. It only had two packages to 'remove', and didn't
even need to touch the file system.

It's been running for 7 minutes now, and strace seems to show it's doing
something pointless...

stat64("/usr/src/kernels/2.6.15-1.2054_FC5-i586/include/config/usb", 0xbfa3f0d4)
= -1 ENOENT (No such file or directory)
stat64("/usr/src/kernels/2.6.15-1.2054_FC5-i586/include/config", 0xbfa3f0d4) =
-1 ENOENT (No such file or directory)
stat64("/usr/src/kernels/2.6.15-1.2054_FC5-i586/include", 0xbfa3f0d4) = -1
ENOENT (No such file or directory)
stat64("/usr/src/kernels/2.6.15-1.2054_FC5-i586", 0xbfa3f0d4) = -1 ENOENT (No
such file or directory)
stat64("/usr/src/kernels/2.6.15-1.2054_FC5-i586/sound", 0xbfa3f0d4) = -1 ENOENT
(No such file or directory)
stat64("/usr/src/kernels/2.6.15-1.2054_FC5-i586", 0xbfa3f0d4) = -1 ENOENT (No
such file or directory)
stat64("/usr/src/kernels/2.6.15-1.2054_FC5-i586/security", 0xbfa3f0d4) = -1
ENOENT (No such file or directory)
stat64("/usr/src/kernels/2.6.15-1.2054_FC5-i586", 0xbfa3f0d4) = -1 ENOENT (No
such file or directory)
stat64("/usr/src/kernels/2.6.15-1.2054_FC5-i586/security/keys", 0xbfa3f0d4) = -1
ENOENT (No such file or directory)
stat64("/usr/src/kernels/2.6.15-1.2054_FC5-i586/security", 0xbfa3f0d4) = -1
ENOENT (No such file or directory)
stat64("/usr/src/kernels/2.6.15-1.2054_FC5-i586", 0xbfa3f0d4) = -1 ENOENT (No
such file or directory)
stat64("/usr/src/kernels/2.6.15-1.2054_FC5-i586/security/selinux", 0xbfa3f0d4) =
-1 ENOENT (No such file or directory)
stat64("/usr/src/kernels/2.6.15-1.2054_FC5-i586/security", 0xbfa3f0d4) = -1
ENOENT (No such file or directory)
stat64("/usr/src/kernels/2.6.15-1.2054_FC5-i586", 0xbfa3f0d4) = -1 ENOENT (No
such file or directory)
stat64("/usr/src/kernels/2.6.15-1.2054_FC5-i586/security/selinux/ss",
0xbfa3f0d4) = -1 ENOENT (No such file or directory)
stat64("/usr/src/kernels/2.6.15-1.2054_FC5-i586/security/selinux", 0xbfa3f0d4) =
-1 ENOENT (No such file or directory)
stat64("/usr/src/kernels/2.6.15-1.2054_FC5-i586/security", 0xbfa3f0d4) = -1
ENOENT (No such file or directory)
stat64("/usr/src/kernels/2.6.15-1.2054_FC5-i586", 0xbfa3f0d4) = -1 ENOENT (No
such file or directory)
stat64("/usr/src/kernels/2.6.15-1.2054_FC5-i586/sound/core/oss", 0xbfa3f0d4) =
-1 ENOENT (No such file or directory)
stat64("/usr/src/kernels/2.6.15-1.2054_FC5-i586/sound/core", 0xbfa3f0d4) = -1
ENOENT (No such file or directory)
stat64("/usr/src/kernels/2.6.15-1.2054_FC5-i586/sound", 0xbfa3f0d4) = -1 ENOENT
(No such file or directory)
stat64("/usr/src/kernels/2.6.15-1.2054_FC5-i586", 0xbfa3f0d4) = -1 ENOENT (No
such file or directory)
stat64("/usr/src/kernels/2.6.15-1.2054_FC5-i586/include/asm-i386", 0xbfa3f0d4) =
-1 ENOENT (No such file or directory)
stat64("/usr/src/kernels/2.6.15-1.2054_FC5-i586/include", 0xbfa3f0d4) = -1
ENOENT (No such file or directory)
stat64("/usr/src/kernels/2.6.15-1.2054_FC5-i586", 0xbfa3f0d4) = -1 ENOENT (No
such file or directory)
stat64("/usr/src/kernels/2.6.15-1.2054_FC5-i586/include/config/acpi/battery",
0xbfa3f0d4) = -1 ENOENT (No such file or directory)
stat64("/usr/src/kernels/2.6.15-1.2054_FC5-i586/include/config/acpi",
0xbfa3f0d4) = -1 ENOENT (No such file or directory)
stat64("/usr/src/kernels/2.6.15-1.2054_FC5-i586/include/config", 0xbfa3f0d4) =
-1 ENOENT (No such file or directory)
stat64("/usr/src/kernels/2.6.15-1.2054_FC5-i586/include", 0xbfa3f0d4) = -1
ENOENT (No such file or directory)

Comment 1 David Woodhouse 2006-05-11 01:35:34 UTC
Still running...

stat64("/usr/src/kernels/2.6.16-1.2080_FC5-i586/drivers/xen/tpmfront",
0xbfa3f0d4) = -1 ENOENT (No such file or directory)
stat64("/usr/src/kernels/2.6.16-1.2080_FC5-i586/drivers/xen", 0xbfa3f0d4) = -1
ENOENT (No such file or directory)
stat64("/usr/src/kernels/2.6.16-1.2080_FC5-i586/drivers", 0xbfa3f0d4) = -1
ENOENT (No such file or directory)
stat64("/usr/src/kernels/2.6.16-1.2080_FC5-i586", 0xbfa3f0d4) = -1 ENOENT (No
such file or directory)
stat64("/usr/src/kernels/2.6.16-1.2080_FC5-i586/drivers/xen/tpmback",
0xbfa3f0d4) = -1 ENOENT (No such file or directory)
stat64("/usr/src/kernels/2.6.16-1.2080_FC5-i586/drivers/xen", 0xbfa3f0d4) = -1
ENOENT (No such file or directory)
stat64("/usr/src/kernels/2.6.16-1.2080_FC5-i586/drivers", 0xbfa3f0d4) = -1
ENOENT (No such file or directory)
stat64("/usr/src/kernels/2.6.16-1.2080_FC5-i586", 0xbfa3f0d4) = -1 ENOENT (No
such file or directory)
stat64("/usr/src/kernels/2.6.16-1.2080_FC5-i586/drivers/xen/privcmd", 
<unfinished ...>


Comment 2 Jeff Johnson 2006-05-11 11:50:30 UTC
Yep. rpm is insuring that paths are not utf-8 encoded.

Comment 3 David Woodhouse 2006-05-11 12:04:34 UTC
Heh. Don't start :)

Comment 4 Jeff Johnson 2006-05-11 17:30:34 UTC
;-)

Seriously though, "unneeded" in subject is highly subjective.

The stats are already optimized on directories by sorting paths.

The stats are necessary to compute fingerprints.

fingerprints are necessary to do disk accounting.

and the algorithm breaks when package monkeys arbitrarily
move large hunks of code with identical basenames to new
paths like /usr/src/kernel.

That's all the hints you get.

Comment 5 Jeff Johnson 2007-04-01 19:27:42 UTC
This problem is likely mostly fixed in rpm cvs, will be in rpm-4.4.9-0.3 when built.

UPSTREAM

Comment 6 Red Hat Bugzilla 2007-08-21 05:23:52 UTC
User pnasrat@redhat.com's account has been closed

Comment 7 Panu Matilainen 2007-08-22 06:32:11 UTC
Reassigning to owner after bugzilla made a mess, sorry about the noise...

Comment 8 Bug Zapper 2008-04-04 02:51:51 UTC
Fedora apologizes that these issues have not been resolved yet. We're
sorry it's taken so long for your bug to be properly triaged and acted
on. We appreciate the time you took to report this issue and want to
make sure no important bugs slip through the cracks.

If you're currently running a version of Fedora Core between 1 and 6,
please note that Fedora no longer maintains these releases. We strongly
encourage you to upgrade to a current Fedora release. In order to
refocus our efforts as a project we are flagging all of the open bugs
for releases which are no longer maintained and closing them.
http://fedoraproject.org/wiki/LifeCycle/EOL

If this bug is still open against Fedora Core 1 through 6, thirty days
from now, it will be closed 'WONTFIX'. If you can reporduce this bug in
the latest Fedora version, please change to the respective version. If
you are unable to do this, please add a comment to this bug requesting
the change.

Thanks for your help, and we apologize again that we haven't handled
these issues to this point.

The process we are following is outlined here:
http://fedoraproject.org/wiki/BugZappers/F9CleanUp

We will be following the process here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping to ensure this
doesn't happen again.

And if you'd like to join the bug triage team to help make things
better, check out http://fedoraproject.org/wiki/BugZappers

Comment 9 Panu Matilainen 2008-04-08 05:52:52 UTC
Still an issue.

Comment 10 Bug Zapper 2008-05-14 02:09:41 UTC
Changing version to '9' as part of upcoming Fedora 9 GA.
More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 12 Panu Matilainen 2009-03-07 08:38:32 UTC
This is fixed in rawhide now.