public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* [Bug runtime/4633] New: backtracing broken
@ 2007-06-12 19:57 fche at redhat dot com
  2007-06-12 20:56 ` [Bug runtime/4633] " fche at redhat dot com
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: fche at redhat dot com @ 2007-06-12 19:57 UTC (permalink / raw)
  To: systemtap

Bug #3050 may have been closed but the bug did not stay dead.  The same code on
current fc7 kernels gives the usual single line of backtrace info.
The kernel backtracer always seems to do a better job than the code in the runtime.

There are several problems with the code.  It uses unprotected dereference code
like "*stack++", even though the stack values are not completely reliable.  It
does not know how to distinguish between alternative stacks such as the trap stack,
the normal kernel stack, or whatever happens to come in pt_regs.  This is key
because backtrace() should from both kprobes and from ordinary hook calls
such as timers, begin/end, and markers.  The backtrace() function should not
include the "Inexact backtrace:" string, as this breaks subsequent tokenizing 
with print_stack().

-- 
           Summary: backtracing broken
           Product: systemtap
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: runtime
        AssignedTo: systemtap at sources dot redhat dot com
        ReportedBy: fche at redhat dot com
  GCC host triplet: x86-64


http://sourceware.org/bugzilla/show_bug.cgi?id=4633

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug runtime/4633] backtracing broken
  2007-06-12 19:57 [Bug runtime/4633] New: backtracing broken fche at redhat dot com
@ 2007-06-12 20:56 ` fche at redhat dot com
  2007-08-20 17:40 ` mhiramat at redhat dot com
  2007-08-20 21:39 ` fche at redhat dot com
  2 siblings, 0 replies; 4+ messages in thread
From: fche at redhat dot com @ 2007-06-12 20:56 UTC (permalink / raw)
  To: systemtap


------- Additional Comments From fche at redhat dot com  2007-06-12 20:56 -------
Further information... an analogous problem exists even on i386.
Here, a stack traceback from a kprobe includes a lot of the kprobes
invocation path, but none actually from (above) the context of the
int3 itself.


-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=4633

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug runtime/4633] backtracing broken
  2007-06-12 19:57 [Bug runtime/4633] New: backtracing broken fche at redhat dot com
  2007-06-12 20:56 ` [Bug runtime/4633] " fche at redhat dot com
@ 2007-08-20 17:40 ` mhiramat at redhat dot com
  2007-08-20 21:39 ` fche at redhat dot com
  2 siblings, 0 replies; 4+ messages in thread
From: mhiramat at redhat dot com @ 2007-08-20 17:40 UTC (permalink / raw)
  To: systemtap


------- Additional Comments From mhiramat at redhat dot com  2007-08-20 15:34 -------
Created an attachment (id=1972)
 --> (http://sourceware.org/bugzilla/attachment.cgi?id=1972&action=view)
x86-64 backtracing fix patch

This patch fixes this bug.
AFAIK, the value (not the address) of rsp is specifying the original stack
address on x86-64.


-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=4633

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug runtime/4633] backtracing broken
  2007-06-12 19:57 [Bug runtime/4633] New: backtracing broken fche at redhat dot com
  2007-06-12 20:56 ` [Bug runtime/4633] " fche at redhat dot com
  2007-08-20 17:40 ` mhiramat at redhat dot com
@ 2007-08-20 21:39 ` fche at redhat dot com
  2 siblings, 0 replies; 4+ messages in thread
From: fche at redhat dot com @ 2007-08-20 21:39 UTC (permalink / raw)
  To: systemtap


------- Additional Comments From fche at redhat dot com  2007-08-20 19:50 -------
> This patch fixes this bug.
> AFAIK, the value (not the address) of rsp is specifying the original stack
> address on x86-64.

Unfortunately, it's not so easy.  Sometimes (kprobes versus other
event sources?) the &REG_SP value is more correct.  We lack a convincing
set of test cases either way.  Would you mind collecting a set?

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|systemtap at sources dot    |mhiramat at redhat dot com
                   |redhat dot com              |
             Status|NEW                         |ASSIGNED


http://sourceware.org/bugzilla/show_bug.cgi?id=4633

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-08-20 19:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-06-12 19:57 [Bug runtime/4633] New: backtracing broken fche at redhat dot com
2007-06-12 20:56 ` [Bug runtime/4633] " fche at redhat dot com
2007-08-20 17:40 ` mhiramat at redhat dot com
2007-08-20 21:39 ` fche at redhat dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).