Bug 326891 - readahead-collector doesn't collect binaries
Summary: readahead-collector doesn't collect binaries
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: readahead   
(Show other bugs)
Version: 8
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Karel Zak
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: bzcl34nup
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-10-10 19:54 UTC by Eric Sandeen
Modified: 2008-04-04 15:58 UTC (History)
1 user (show)

Fixed In Version: 1.4.2-3
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-04-04 15:58:09 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

Description Eric Sandeen 2007-10-10 19:54:45 UTC
booting with init=/sbin/readahead-collector doesn't result in any binaries in
the custom readahead lists.  This is because the audit logs like:

type=SYSCALL msg=audit(1191960691.470:14691): arch=40000003 syscall=11
success=yes exit=0 a0=a4fc9b8 a1=a229760 a2=9b89fd0 a3=0 items=2 ppid=3868
pid=24236 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0
fsgid=0 tty=pts1 comm="kudzu" exe="/sbin/kudzu" key=(null)

type=CWD msg=audit(1191960691.470:14691): 
cwd="/usr/src/redhat/BUILD/readahead-1.4.2"

type=PATH msg=audit(1191960691.470:14691): item=0 name="/sbin/kudzu"
inode=6029476 dev=fd:00 mode=0100755 ouid=0 ogid=0 rdev=00:00

type=PATH msg=audit(1191960691.470:14691): item=1 name=(null) inode=720971
dev=fd:00 mode=0100755 ouid=0 ogid=0 rdev=00:00 

and the "(null)" name in the 2nd PATH line overwrites the "/sbin/kudzu" name.

This patch seems to fix it up, and the resulting boot with new readahead lists
is faster for me:

--- readahead-1.4.2/src/readahead-collector.c	2007-10-01 16:15:48.000000000 -0500
+++ readahead-1.4.2-fixed/src/readahead-collector.c	2007-10-10
12:15:58.000000000 -0500
@@ -1039,8 +1039,11 @@
 					(p = auparse_find_field(au, "cwd")))
 				strncpy(cwd, p + 1, sizeof(cwd));
 			else if (type == AUDIT_PATH &&
-					(p = auparse_find_field(au, "name")))
+					(p = auparse_find_field(au, "name"))) {
+				if (!strcmp("(null)", p))
+					continue;
 				strncpy(path, p + 1, sizeof(path));
+			}
 
 		} while(auparse_next_record(au) > 0);
 

... though you might want to run it by sgrubb to be sure it's enough.

-Eric

Comment 1 Bug Zapper 2008-04-04 14:02:45 UTC
Based on the date this bug was created, it appears to have been reported
during the development of Fedora 8. In order to refocus our efforts as
a project we are changing the version of this bug to '8'.

If this bug still exists in rawhide, please change the version back to
rawhide.
(If you're unable to change the bug's version, add a comment to the bug
and someone will change it for you.)

Thanks for your help and we apologize for the interruption.

The process we're 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.

Comment 2 Eric Sandeen 2008-04-04 15:58:09 UTC
Changelog says:

* Wed Oct 17 2007 Karel Zak <kzak@redhat.com> 1:1.4.2-3
- update default lists
- fix #327041 - readahead --sort generates file with "(null)"
- fix #326891 - readahead-collector doesn't collect binaries



Note You need to log in before you can comment on or make changes to this bug.