public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* [Bug uprobes/6828] New: uprobe presence interferes with dd signal handling
@ 2008-08-10 20:50 fche at redhat dot com
  2008-08-21 23:27 ` [Bug uprobes/6828] " jkenisto at us dot ibm dot com
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: fche at redhat dot com @ 2008-08-10 20:50 UTC (permalink / raw)
  To: systemtap

On RHEL5 x86-64:

# stap -e 'probe process("dd").function("iread") { log(pp()) }' &
# dd
foo
<echoes foo>
^C
segmentation fault (core dumped) dd

Without stap/uprobes, ^C works fine for dd.

-- 
           Summary: uprobe presence interferes with dd signal handling
           Product: systemtap
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: uprobes
        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=6828

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

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

* [Bug uprobes/6828] uprobe presence interferes with dd signal handling
  2008-08-10 20:50 [Bug uprobes/6828] New: uprobe presence interferes with dd signal handling fche at redhat dot com
@ 2008-08-21 23:27 ` jkenisto at us dot ibm dot com
  2008-08-22  0:15 ` roland at gnu dot org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: jkenisto at us dot ibm dot com @ 2008-08-21 23:27 UTC (permalink / raw)
  To: systemtap


------- Additional Comments From jkenisto at us dot ibm dot com  2008-08-21 23:26 -------
Created an attachment (id=2919)
 --> (http://sourceware.org/bugzilla/attachment.cgi?id=2919&action=view)
utrace-based module that afflicts dd similarly

I see this same failure in the absence of uprobes and SystemTap, just by
tracing dd with the attached module (using old utrace, at least -- haven't
tried the new one).  The use of a report_signal callback is the most obvious
common denominator.

Roland, could you take a look at sigtrace.c and let me know if it's doing
anything obviously wrong?  If so, uprobes may have the same problem.

In any case, it looks like the SEGV is because dd is trying to execute at
address 0 instead of at the handler address.  Everything looks pretty good up
to handle_signal(), but if I put a probepoint on the handler, it doesn't get
hit.

-- 


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

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

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

* [Bug uprobes/6828] uprobe presence interferes with dd signal handling
  2008-08-10 20:50 [Bug uprobes/6828] New: uprobe presence interferes with dd signal handling fche at redhat dot com
  2008-08-21 23:27 ` [Bug uprobes/6828] " jkenisto at us dot ibm dot com
@ 2008-08-22  0:15 ` roland at gnu dot org
  2008-08-22  2:01 ` roland at gnu dot org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: roland at gnu dot org @ 2008-08-22  0:15 UTC (permalink / raw)
  To: systemtap


------- Additional Comments From roland at gnu dot org  2008-08-22 00:14 -------
I don't see anything wrong in that module that would explain the problem.
(The module looks fine off hand, though the use of NEWSTATE is superfluous.)

It would help to have report_signal print out what ka and return_ka point to,
along with action.  And of course, to have the output you get in the error case.

I tweaked the module to print those, and reproduced the problem on an old F8
kernel (what I have on hand that has old utrace).  That version of the code is
no longer maintained except in RHEL5, so this will have to be followed up via
RHEL5 kernel channels.

-- 


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

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

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

* [Bug uprobes/6828] uprobe presence interferes with dd signal handling
  2008-08-10 20:50 [Bug uprobes/6828] New: uprobe presence interferes with dd signal handling fche at redhat dot com
  2008-08-21 23:27 ` [Bug uprobes/6828] " jkenisto at us dot ibm dot com
  2008-08-22  0:15 ` roland at gnu dot org
@ 2008-08-22  2:01 ` roland at gnu dot org
  2008-09-18  7:50 ` srinivasa at in dot ibm dot com
  2008-09-23  2:52 ` fche at redhat dot com
  4 siblings, 0 replies; 6+ messages in thread
From: roland at gnu dot org @ 2008-08-22  2:01 UTC (permalink / raw)
  To: systemtap


------- Additional Comments From roland at gnu dot org  2008-08-22 01:59 -------
Inserting this code into a report_signal callback works around the bug:

	if ((action == UTRACE_SIGNAL_DELIVER ||
	     action == UTRACE_ACTION_RESUME) &&
	    (return_ka->sa.sa_flags & SA_ONESHOT)) {
		return_ka->sa.sa_flags &= ~SA_ONESHOT;
		((struct k_sigaction *) orig_ka)->sa.sa_handler = SIG_DFL;
	}

Current utrace code (Fedora rahwide) does not have this bug.

-- 


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

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

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

* [Bug uprobes/6828] uprobe presence interferes with dd signal handling
  2008-08-10 20:50 [Bug uprobes/6828] New: uprobe presence interferes with dd signal handling fche at redhat dot com
                   ` (2 preceding siblings ...)
  2008-08-22  2:01 ` roland at gnu dot org
@ 2008-09-18  7:50 ` srinivasa at in dot ibm dot com
  2008-09-23  2:52 ` fche at redhat dot com
  4 siblings, 0 replies; 6+ messages in thread
From: srinivasa at in dot ibm dot com @ 2008-09-18  7:50 UTC (permalink / raw)
  To: systemtap


------- Additional Comments From srinivasa at in dot ibm dot com  2008-09-18 07:49 -------
This bug has been fixed on latest RHEL5 kernels. We can close this bug.

Thanks
 Srinivasa DS

-- 


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

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

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

* [Bug uprobes/6828] uprobe presence interferes with dd signal handling
  2008-08-10 20:50 [Bug uprobes/6828] New: uprobe presence interferes with dd signal handling fche at redhat dot com
                   ` (3 preceding siblings ...)
  2008-09-18  7:50 ` srinivasa at in dot ibm dot com
@ 2008-09-23  2:52 ` fche at redhat dot com
  4 siblings, 0 replies; 6+ messages in thread
From: fche at redhat dot com @ 2008-09-23  2:52 UTC (permalink / raw)
  To: systemtap


------- Additional Comments From fche at redhat dot com  2008-09-23 02:51 -------
utrace bug fixed in rhel5.3 beta and later; bug not present in fresh utrace.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


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

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

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

end of thread, other threads:[~2008-09-23  2:52 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-08-10 20:50 [Bug uprobes/6828] New: uprobe presence interferes with dd signal handling fche at redhat dot com
2008-08-21 23:27 ` [Bug uprobes/6828] " jkenisto at us dot ibm dot com
2008-08-22  0:15 ` roland at gnu dot org
2008-08-22  2:01 ` roland at gnu dot org
2008-09-18  7:50 ` srinivasa at in dot ibm dot com
2008-09-23  2:52 ` 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).