staprun segmentation fault with module `fglrx' in use

Frank Ch. Eigler fche@redhat.com
Sun Mar 18 15:37:00 GMT 2007


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



More information about the Systemtap mailing list