This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: staprun segmentation fault with module `fglrx' in use
Hi -
On Sun, Mar 18, 2007 at 02:49:43PM +0000, Guanqun Lu wrote:
> I forgot to Cc the mailing list. Send again.
Thank you, that's much better information!
> I spend a lot of time to spot that it's the problem of the module
> fglrx. In the file `src/runtime/staprun/symbols.c', `do_module'
> function iterates through the `/sys/module' directory, and invoke
> `send_module' to every module.
That's right.
> So I add two statements in `send_module' function.
> void send_module(char *mname)
> {
> fprintf(stderr, "enter send_module() module_name is %s\n", mname);
>
> char data[8192]; int len = get_sections(mname, data,
> sizeof(data)); if (len) send_request(STP_MODULE, data, len);
>
> fprintf(stderr, "leave send_module() module_name is %s\n",mname);
> }
>
> Then when staprun command is invoked, the last line it output is:
> enter send_module() module_name is fglrx
> Segmentation fault
Very good debugging, thank you.
One final thing you might try for us: run staprun under gdb too:
# gdb -args staprun .....
When it crashes, show the backtrace. My guess is the same, that
get_sections() is doing something naughty when it doesn't receive
all the information it expects.
- FChE