Bug 236120 - kernel packages dangling /lib/modules/.../build symlink
kernel packages dangling /lib/modules/.../build symlink
Status: CLOSED NOTABUG
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: kernel-xen (Show other bugs)
5.0
All Linux
medium Severity medium
: ---
: ---
Assigned To: Rik van Riel
Brian Brock
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-04-11 20:29 EDT by Dave Malcolm
Modified: 2007-11-30 17:07 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-04-13 15:18:05 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Dave Malcolm 2007-04-11 20:29:26 EDT
Description of problem:
Attempting to run stap whilst running kernel-xen, rather than kernel

[dmalcolm@cassandra stp]$ rpm -q kernel kernel-xen kernel-devel systemtap
kernel-2.6.18-8.el5
kernel-xen-2.6.18-1.3002.el5
kernel-xen-2.6.18-8.el5
kernel-devel-2.6.18-8.el5
systemtap-0.5.12-1.el5

[dmalcolm@cassandra stp]$ uname -a
Linux cassandra.boston.redhat.com 2.6.18-8.el5xen #1 SMP Fri Jan 26 14:42:21 EST
2007 i686 i686 i386 GNU/Linux

[dmalcolm@cassandra stp]$ stap -v ansi_colors.stp 
Pass 1: parsed user script and 53 library script(s) in 350usr/0sys/441real ms.
Pass 2: analyzed script: 1 probe(s), 1 function(s), 0 embed(s), 0 global(s) in
10usr/0sys/8real ms.
Pass 3: translated to C into
"/tmp/staphSz9rp/stap_62ee253afbbdc5722f5661662c8f666c_688.c" in 0usr/0sys/1real ms.
Module directory /lib/modules/2.6.18-8.el5xen/build check failed: No such file
or directory
Make sure kernel devel is installed.
Pass 4: compiled C into "stap_62ee253afbbdc5722f5661662c8f666c_688.ko" in
0usr/0sys/1real ms.
Pass 4: compilation failed.  Try again with more '-v' (verbose) options.

[dmalcolm@cassandra stp]$ ll /lib/modules/2.6.18-8.el5xen/build
lrwxrwxrwx 1 root root 46 Feb 12 14:03 /lib/modules/2.6.18-8.el5xen/build ->
../../../usr/src/kernels/2.6.18-8.el5-xen-i686

[dmalcolm@cassandra stp]$ ls /usr/src/kernels/
2.6.18-8.el5-i686

It looks like the "module directory check" is failing because
/lib/modules/2.6.18-8.el5xen/build is a dangling symlink.

Version-Release number of selected component (if applicable):
kernel-xen-2.6.18-8.el5
kernel-devel-2.6.18-8.el5
systemtap-0.5.12-1.el5

How reproducible:
100%

Steps to Reproduce:
1. boot into kernel-xen, with kernel-devel installed
2. "stap hello-world.stp"
  
Actual results:
stap fails, with error message:
Module directory /lib/modules/2.6.18-8.el5xen/build check failed: No such file
or directory

Possibly a xen bug, rather than a systemtap bug? looks like the kernel-xen
/lib/modules/2.6.18-8.el5xen/build symlink is incorrect
Comment 1 Frank Ch. Eigler 2007-04-11 21:44:43 EDT
Indeed, looks like a kernel-xen-devel packaging bug.
Comment 2 Dave Malcolm 2007-04-12 10:35:51 EDT
Aha: I didn't have kernel-xen-devel installed, only kernel-devel

Upon installing kernel-xen-devel it works.

So this was user error.

(Perhaps the "Make sure kernel devel is installed." error handling could detect
xen and suggest installing kernel-xen-devel vs kernel-devel?  Or is this a
knowledgebase issue?)
Comment 3 Frank Ch. Eigler 2007-04-12 10:54:02 EDT
We'll tweak the systemtap error message, but this bug should stay open in order
to track the packaging of the dangling /build symlink with kernel base packages.
Comment 4 Dave Malcolm 2007-04-13 15:09:43 EDT
The dangling symlink isn't a bug:
[dmalcolm@cassandra ~]$ ll /lib/modules/2.6.18-8.el5xen/build
lrwxrwxrwx 1 root root 46 Feb 12 14:03 /lib/modules/2.6.18-8.el5xen/build ->
../../../usr/src/kernels/2.6.18-8.el5-xen-i686
[dmalcolm@cassandra ~]$ rpm -qf /lib/modules/2.6.18-8.el5xen/build
kernel-xen-2.6.18-8.el5
[dmalcolm@cassandra ~]$ rpm -qf /usr/src/kernels/2.6.18-8.el5-xen-i686
kernel-xen-devel-2.6.18-8.el5
It was only dangling because I didn't have kernel-xen-devel installed at the
time; I only had kernel-devel installed.

So I think this was purely user error (on my part), exploring how these two
things work together, which a smarter error message/knowledgebase article on
"systemtap with xen" could address (is there potential to snoop on xen-specific
stats in a dom0/domU with systemtap?)
Comment 5 Rik van Riel 2007-04-13 15:18:05 EDT
The dangling symlink is necessary because Fedora builds both i686 and i586
kernels.  The symlink contains i586 or i686, which is in the /usr/src/...
pathname, while it is not present in the /lib/modules pathnames.

Having the symlink part of the kernel-*-devel package would make it possible for
the user to accidentally use the i586 kernel-devel package with the i686 kernel,
resulting in broken 3rd party modules, etc...

This is why the symlink is part of the kernel package.

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