Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 236120 - kernel packages dangling /lib/modules/.../build symlink
Summary: kernel packages dangling /lib/modules/.../build symlink
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: kernel-xen
Version: 5.0
Hardware: All
OS: Linux
Target Milestone: ---
: ---
Assignee: Rik van Riel
QA Contact: Brian Brock
Depends On:
TreeView+ depends on / blocked
Reported: 2007-04-12 00:29 UTC by Dave Malcolm
Modified: 2007-11-30 22:07 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2007-04-13 19:18:05 UTC
Target Upstream Version:

Attachments (Terms of Use)

Description Dave Malcolm 2007-04-12 00:29:26 UTC
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

[dmalcolm@cassandra stp]$ uname -a
Linux 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 ->

[dmalcolm@cassandra stp]$ ls /usr/src/kernels/

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):

How reproducible:

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-12 01:44:43 UTC
Indeed, looks like a kernel-xen-devel packaging bug.

Comment 2 Dave Malcolm 2007-04-12 14:35:51 UTC
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 14:54:02 UTC
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 19:09:43 UTC
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 ->
[dmalcolm@cassandra ~]$ rpm -qf /lib/modules/2.6.18-8.el5xen/build
[dmalcolm@cassandra ~]$ rpm -qf /usr/src/kernels/2.6.18-8.el5-xen-i686
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 19:18:05 UTC
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.