Bug 3050 - print_backtrace() only prints one line of stack on x86_64
Summary: print_backtrace() only prints one line of stack on x86_64
Status: RESOLVED FIXED
Alias: None
Product: systemtap
Classification: Unclassified
Component: runtime (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: ---
Assignee: Martin Hunt
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-08-14 22:29 UTC by Mike Mason
Modified: 2006-11-20 13:38 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Mason 2006-08-14 22:29:58 UTC
print_backtrace() only prints one line of the stack on x86_64.  For example, the
following stap script:

probe kernel.function("schedule@kernel/sched.c") {
        print_backtrace();
}

prints the following output:

trace for 0 (swapper)
 0xffffffff802cdcb5 : __sched_text_start+0x15/0xd32 []
trace for 24322 (sshd)
 0xffffffff802cdcb5 : __sched_text_start+0x15/0xd32 []
trace for 0 (swapper)
 0xffffffff802cdcb5 : __sched_text_start+0x15/0xd32 []

... and so on

The same script on i386 produces the following output:

trace for 16419 (stpd)
 0xc0294616 : schedule+0x2/0xc9a []
 0xf8d3e77d : sit_cleanup+0xc358e/0x0 [ipv6]
 0xc0204955 : tty_write+0x1d3/0x1e4 []
 0xc013217b : autoremove_wake_function+0x0/0x2d []
 0xf8d3e6d7 : sit_cleanup+0xc34e8/0x0 [ipv6]
 0xc015f001 : vfs_read+0xa8/0x14d []
 0xc015f456 : sys_read+0x3c/0x63 []
 0xc0103cab : sysenter_past_esp+0x54/0x79 []
trace for 3658 (sshd)
 0xc0294616 : schedule+0x2/0xc9a []
 0xc0295a17 : schedule_timeout+0x13/0x8e []
 0xc0203d9f : tty_poll+0x53/0x60 []
 0xc016ebfd : do_select+0x352/0x3b8 []
 0xc016f12a : __pollwait+0x0/0x95 []
 0xc016eeb1 : core_sys_select+0x24e/0x26c []
 0xc016f488 : sys_select+0xd1/0x181 []
 0xc015f4b9 : sys_write+0x3c/0x63 []
 0xc0103cab : sysenter_past_esp+0x54/0x79 []

... and so on.

I tested using the CVS code as of 8/14/06.
Comment 1 Martin Hunt 2006-10-12 19:00:29 UTC
Should be fixed in CVS head. Works for me now.
Comment 2 Martin Hunt 2006-10-13 14:41:50 UTC
(In reply to comment #0)

> trace for 0 (swapper)
>  0xffffffff802cdcb5 : __sched_text_start+0x15/0xd32 []

The above line is very strange. It should be printing RIP and that should be
in the schedule function, not _sched_text_start+0x15, which would be before
where the kprobe was set.

Could you verify where the kprobe is actually placed and check /proc/kallsyms to
see if that is correct?
Comment 3 Martin Hunt 2006-11-09 18:32:23 UTC
If this is still a problem, I need more information to reproduce it.
Comment 4 Mike Mason 2006-11-18 00:16:24 UTC
print_backtrace() is working now for me, too.  This bug can be closed.
Comment 5 Martin Hunt 2006-11-20 13:38:20 UTC
(In reply to comment #4)
> print_backtrace() is working now for me, too.  This bug can be closed.

Closed.