[Crash-utility] modules loaded from wrong directory

Olaf Hering olaf at aepfle.de
Fri Mar 16 14:20:04 UTC 2018


When trying to run crash 7.2 like this, the 'mod -s $mod' command loads
the modules from the running system instead of the specified directory:

d=${0%/*}
tee $t <<_EOF_
mod -s xen-kbdfront
mod -s xen_kbdfront
exit
_EOF_

strace -f -s 123 -tt -o /dev/shm/crash.trace.txt \
crash \
        -i $t \
        --mod "${d}" \
        "${d}"/boot/vmlinux-*-default.gz \
        "$1" \
        "${d}"/usr/lib/debug/boot/vmlinux-*-default.debug

In the strace log I see a search for xen_kbdfront.ko, later for
xen-kbdfront.ko. Unfortunately /lib/modules/`uname -r` is searched before $d.

Now that I read the man page once more I noticed that --mod is just for
debug info?

It seems $d/boot is considered as well, likely because the kernel is
stored in that directory.

I wonder why there is no option to tell crash to only operate below a
certain directory when looking for module related things.
"--mod" seems to have an effect, if the directory exists it is searched.

How can I tell crash to only operate below $d?

Olaf
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/crash-utility/attachments/20180316/1514ca2a/attachment.sig>


More information about the Crash-utility mailing list