Bug 480136
Summary: | mod: cannot find or load object file for dm_region_hash module | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 5 | Reporter: | Qian Cai <qcai> |
Component: | crash | Assignee: | Dave Anderson <anderson> |
Status: | CLOSED ERRATA | QA Contact: | Martin Jenner <mjenner> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 5.3 | CC: | alex.boudhou |
Target Milestone: | rc | ||
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: |
The "mod -[sS]" command would fail with the error message: "mod: cannot find or load object file for <name> module" if the target module object filename contains both underscore and dash characters. Crash now parses these filenames correctly.
|
Story Points: | --- |
Clone Of: | Environment: | ||
Last Closed: | 2009-09-02 09:40:29 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
Qian Cai
2009-01-15 11:11:53 UTC
The crash utility needs to take the "name" of the module as seen by "lsmod", and then search the local /lib/modules/<release> directory tree for the associated module. Sometimes modules are named with strings containing underscores ('_'), whereas their associated object file uses dashes ('-'). So in kernel version 2.6.18-92.el5, "lsmod" and the crash utility "mod" command will show dm_crypt, dm_emc, dm_hp_sw, dm_mirror, dm_mod, dm_multipath, dm_rdac, dm_round_robin, dm_stapshot, and dm_zero. When searching the local filesystem, the crash utility will first look for a module with the same name, and if can't find it, it will try again substituting "_" for "-", and so it finds them here: $ rpm -qpl kernel-2.6.18-92.el5.x86_64.rpm | grep dm- /lib/modules/2.6.18-92.el5/kernel/drivers/md/dm-crypt.ko /lib/modules/2.6.18-92.el5/kernel/drivers/md/dm-emc.ko /lib/modules/2.6.18-92.el5/kernel/drivers/md/dm-hp-sw.ko /lib/modules/2.6.18-92.el5/kernel/drivers/md/dm-mirror.ko /lib/modules/2.6.18-92.el5/kernel/drivers/md/dm-mod.ko /lib/modules/2.6.18-92.el5/kernel/drivers/md/dm-multipath.ko /lib/modules/2.6.18-92.el5/kernel/drivers/md/dm-rdac.ko /lib/modules/2.6.18-92.el5/kernel/drivers/md/dm-round-robin.ko /lib/modules/2.6.18-92.el5/kernel/drivers/md/dm-snapshot.ko /lib/modules/2.6.18-92.el5/kernel/drivers/md/dm-zero.ko $ So when crash looks for the module object file for "dm_crypt", it first searches for "dm_crypt.ko", and when it fails, it then tries for "dm-crypt.ko" and finds it OK. This later set of modules does not follow convention, specifically the "dm_region_hash" module. The crash utility first looks for "dm_region_hash.ko", and doesn't find it; so then it replaces the underscores with dashes, and looks for "dm-region-hash.ko" module. But it doesn't find that either: mod: cannot find or load object file for dm_region_hash module And that's because the driver writer did not follow convention for that particular module: $ rpm -qpl kernel-2.6.18-128.el5.x86_64.rpm | grep dm- /lib/modules/2.6.18-128.el5/kernel/drivers/md/dm-crypt.ko /lib/modules/2.6.18-128.el5/kernel/drivers/md/dm-emc.ko /lib/modules/2.6.18-128.el5/kernel/drivers/md/dm-hp-sw.ko /lib/modules/2.6.18-128.el5/kernel/drivers/md/dm-log.ko /lib/modules/2.6.18-128.el5/kernel/drivers/md/dm-mem-cache.ko /lib/modules/2.6.18-128.el5/kernel/drivers/md/dm-message.ko /lib/modules/2.6.18-128.el5/kernel/drivers/md/dm-mirror.ko /lib/modules/2.6.18-128.el5/kernel/drivers/md/dm-mod.ko /lib/modules/2.6.18-128.el5/kernel/drivers/md/dm-multipath.ko /lib/modules/2.6.18-128.el5/kernel/drivers/md/dm-raid45.ko /lib/modules/2.6.18-128.el5/kernel/drivers/md/dm-rdac.ko /lib/modules/2.6.18-128.el5/kernel/drivers/md/dm-region_hash.ko <<<<<< /lib/modules/2.6.18-128.el5/kernel/drivers/md/dm-round-robin.ko /lib/modules/2.6.18-128.el5/kernel/drivers/md/dm-snapshot.ko /lib/modules/2.6.18-128.el5/kernel/drivers/md/dm-zero.ko $ Note the module name uses both underscores and dashes, i.e., "dm-region_hash.ko". So the crash utility cannot find it automatically using its current search algorithm. It's certainly easy enough to work around: crash> mod -s dm_region_hash /lib/modules/2.6.18-128.el5/kernel/drivers/md/dm-region_hash.ko MODULE NAME SIZE OBJECT FILE ffffffff88152200 dm_region_hash 46145 /lib/modules/2.6.18-128.el5/kernel/drivers/md/dm-region_hash.ko crash> But I note that the current set of 128.el5 modules for x86_64 has these modules containing both '_' and '-' characters: aes-x86_64.ko dm-region_hash.ko nls_euc-jp.ko nls_iso8859-1.ko nls_iso8859-13.ko nls_iso8859-14.ko nls_iso8859-15.ko nls_iso8859-2.ko nls_iso8859-3.ko nls_iso8859-4.ko nls_iso8859-5.ko nls_iso8859-6.ko nls_iso8859-7.ko nls_iso8859-9.ko nls_koi8-r.ko nls_koi8-ru.ko nls_koi8-u.ko And so for example, if I insmod aes-x86_64.ko, the module is named "aes_x86_64": $ insmod /lib/modules/2.6.18-92.el5/kernel/arch/x86_64/crypto/aes-x86_64.ko $ lsmod Module Size Used by aes_x86_64 58601 0 ... And not surprisingly, if try to load it on the live system with crash: crash> mod -S ... mod: cannot find or load object file for aes_x86_64 module ... So let me revisit the crash utility's search scheme. Good catch! Thanks, Dave Release note added. If any revisions are required, please set the "requires_release_notes" flag to "?" and edit the "Release Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. New Contents: The "mod -[sS]" command would fail with the error message: "mod: cannot find or load object file for <name> module" if the target module object filename contains both underscore and dash characters. Crash now parses these filenames correctly. Release note looks fine. An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHBA-2009-1283.html |