View Issue Details

IDProjectCategoryView StatusLast Update
0008334CentOS-7kmodpublic2016-09-11 16:51
Reportergordan 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version7.0-1406 
Target VersionFixed in Version 
Summary0008334: kmod (via dkms/dracut?) uses an extremely inefficient way to update weak-modules (ibs=1)
DescriptionWhen initrd needs to be rebuilt due to a module update, dracut issues a command like the following:

dd if=/boot/initramfs-<version>.img of=/tmp/weak-modules.yO0aaE/post_early_cpio.img ibs=1 skip=21504

This is painfully slow - it can take minutes on reasonably fast machine fast machine when it should be taking seconds. It would be much more sensible to express this as:

dd if=/boot/initramfs-<version>.img of=/tmp/weak-modules.yO0aaE/post_early_cpio.img ibs=21504 skip=1

and that would achieve the exact same thing

Version-Release number of selected component (if applicable):
dracut-033-161
Steps To ReproduceSteps to Reproduce:
Remove/rebuild/update a weak-module kernel driver that triggers the rebuild of initramfs.
Additional InformationThe offending line seems to be 121 here:

https://git.centos.org/blob/rpms!kmod.git/1cb8b8b152633db5b49f48518ee4075f9d480722/SOURCES!weak-modules;jsessionid=15amjfachw3863korqvvrasf4

TagsNo tags attached.
abrt_hash
URL

Activities

toracat

toracat

2015-03-24 15:37

manager   ~0022575

In other words, change line 121 to:

dd if="$input" of="${tmpdir}/post_early_cpio.img" ibs="$(cpio_len "$input")" skip=1 2>/dev/null

is the correct fix?
gordan

gordan

2015-03-24 15:41

reporter   ~0022576

I believe that would indeed fix the problem. Is this a CentOS specific issue or whether it needs to be pushed upstream to PNAELV?
toracat

toracat

2015-03-24 15:44

manager   ~0022577

This is an upstream issue. It would be great if you could file a bug report at http://bugzilla.redhat.com.
gordan

gordan

2015-03-24 15:49

reporter   ~0022578

I don't use RHEL7, though, and I am somewhat reluctant to file bugs upstream without actually having tested on that. Is there no process for the CentOS project to feed this kind of thing back?
toracat

toracat

2015-03-24 15:52

manager   ~0022579

Although I'm sure it's the same, I will try testing this on RHEL7 a little later.
toracat

toracat

2015-03-24 16:31

manager   ~0022581

On a RHEL 7.1 box,

(1) dd with 'ibs=1 skip=21504'

real 0m3.812s
user 0m0.507s
sys 0m3.306s

(2) dd with 'ibs=21504 skip=1'

real 0m0.041s
user 0m0.005s
sys 0m0.036s
gordan

gordan

2015-03-24 16:41

reporter   ~0022582

Can you please confirm which rpm package "owns" the file in question?
toracat

toracat

2015-03-24 16:48

manager   ~0022583

Sure.

$ rpm -qf `which weak-modules`
kmod-14-10.el7.x86_64
toracat

toracat

2016-09-11 16:51

manager   ~0027491

For the record, gordan filed a report:

https://bugzilla.redhat.com/show_bug.cgi?id=1210449

and it was resolved in:

https://rhn.redhat.com/errata/RHBA-2015-2119.html

Issue History

Date Modified Username Field Change
2015-03-24 12:31 gordan New Issue
2015-03-24 15:37 toracat Note Added: 0022575
2015-03-24 15:41 gordan Note Added: 0022576
2015-03-24 15:44 toracat Note Added: 0022577
2015-03-24 15:49 gordan Note Added: 0022578
2015-03-24 15:52 toracat Note Added: 0022579
2015-03-24 16:31 toracat Note Added: 0022581
2015-03-24 16:41 gordan Note Added: 0022582
2015-03-24 16:48 toracat Note Added: 0022583
2016-09-11 16:51 toracat Note Added: 0027491
2016-09-11 16:51 toracat Status new => resolved
2016-09-11 16:51 toracat Resolution open => fixed