Bug 11229 - Error message for CONFIG_UTRACE could mention kernel development headers
Summary: Error message for CONFIG_UTRACE could mention kernel development headers
Status: RESOLVED FIXED
Alias: None
Product: systemtap
Classification: Unclassified
Component: runtime (show other bugs)
Version: unspecified
: P2 minor
Target Milestone: ---
Assignee: Charley
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-01-27 21:40 UTC by Charley
Modified: 2010-03-01 15:23 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments
Suggested patch for 11229 (752 bytes, text/plain)
2010-01-27 21:42 UTC, Charley
Details
Suggested patch for 11229 (714 bytes, text/plain)
2010-01-28 15:56 UTC, Charley
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Charley 2010-01-27 21:40:02 UTC
The error message encountered when kernel_config[CONFIG_UTRACE] != "y" could
mention the possibility that kernel development headers are not installed.

I have attached a suggested quick-fix. If the CONFIG_UTRACE is blank, the
semantic error will prompt the user to check that devel headers are installed.

e.g.: 
semantic error: process probes unavailable without kernel CONFIG_UTRACE, ensure
kernel devel headers are installed and CONFIG_UTRACE is enabled while resolving
probe point
process("/home/chwang/runtime-EclipseApplication/CallGraphDemo/Debug/eag").function("*").call
Comment 1 Charley 2010-01-27 21:42:50 UTC
Created attachment 4558 [details]
Suggested patch for 11229

Just makes a minor adjustment to the error messages... I was unable to disable
CONFIG_UTRACE in my kernel (only remove kernel-devel) so I am not sure if
CONFIG_UTRACE == "" is a valid check for CONFIG_UTRACE disabled vs.
kernel-devel not installed -- in the worst case scenario the longer error
message will display in both cases.
Comment 2 Roland McGrath 2010-01-27 21:44:21 UTC
Probably what it should do is if it gets any kind of "need CONFIG_*" kind of
situation, it should fall back to some more thorough basic sanity tests.  Then
it can figure out if e.g. it's impossible to build any module at all, and report
about that more clearly.
Comment 3 Frank Ch. Eigler 2010-01-27 22:00:46 UTC
CONFIG_UTRACE is not special in this respect.

We already have some heuristics that try to warn users of an inadequate
installation of kernel-devel.  Perhaps those heuristic messages can
instead be printed when we try to inhale the kernel_config[] list.
Comment 4 Alexander Kurtakov 2010-01-28 11:03:24 UTC
I want to just add that the error message shown is really confusing and made me
think that the problem was elsewhere(Eclipse callgraph plugin). From the given
error message there was no clue what went wrong once you see that your kernel is
compiled with CONFIG_UTRACE.
Comment 5 Charley 2010-01-28 15:56:49 UTC
Created attachment 4563 [details]
Suggested patch for 11229

Naive implementation of Frank's suggestion with the heuristics -- changes
parse_kernel_config from void to int. Returns non-zero if the kernel_config
file cannot be found.

With kernel-devel removed:

Checking "/lib/modules/2.6.31.12-174.2.3.fc12.x86_64/build/.config" failed: No
such file or directory
Ensure kernel development headers & makefiles are installed.

I don't have a kernel without CONFIG_UTRACE configured and I'm not sure atm how
to do this, but I will if you think I should proceed with testing.

-Charley
Comment 6 Frank Ch. Eigler 2010-03-01 01:41:16 UTC
(In reply to comment #5)
> Created an attachment (id=4563)
> Suggested patch for 11229

Looks good to me, please commit & close this bug.
Comment 7 Charley 2010-03-01 15:23:59 UTC
Committed just now