public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* [Bug kprobes/2453] New: kernel panic when probe elv_dequeue_request
@ 2006-03-13  8:34 guanglei at cn dot ibm dot com
  2006-03-13 14:49 ` [Bug kprobes/2453] " fche at redhat dot com
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: guanglei at cn dot ibm dot com @ 2006-03-13  8:34 UTC (permalink / raw)
  To: systemtap

I am running ppc64/2.6.15.4, and the kernel will panic if I put probe on entry
of elv_dequeue_request

output of xmon:
4:mon> e
cpu 0x4: Vector: 700 (Program Check) at [c00000000ffdf660]
    pc: c0000000001f15bc: .elv_dequeue_request+0x10/0x58
    lr: c0000000002fe764: .scsi_request_fn+0x164/0x3b8
    sp: c00000000ffdf8e0
   msr: 8000000000021032
  current = 0xc00000005c33c040
  paca    = 0xc00000000056ac00
    pid   = 15159, comm = 05-wait_for_sys
kernel BUG in elv_dequeue_request at block/elevator.c:514!


the stap file:
probe kernel.function("elv_dequeue_request")
{
        log("here")
}

the generated c file shows that systemtap put the probe point at:

static struct kprobe dwarf_kprobe_0[1]= {
  {.addr= (void *) 0xc0000000001f15bc}
};


objdump of the assembly codes:

c0000000001f15ac <.elv_dequeue_request>:
c0000000001f15ac:       e8 04 00 00     ld      r0,0(r4)
c0000000001f15b0:       7c 00 22 78     xor     r0,r0,r4
c0000000001f15b4:       21 20 00 00     subfic  r9,r0,0
c0000000001f15b8:       7c 09 01 14     adde    r0,r9,r0
c0000000001f15bc:       0b 00 00 00     tdnei   r0,0
c0000000001f15c0:       e9 24 00 00     ld      r9,0(r4)
c0000000001f15c4:       e9 64 00 08     ld      r11,8(r4)
c0000000001f15c8:       f9 2b 00 00     std     r9,0(r11)
c0000000001f15cc:       f9 69 00 08     std     r11,8(r9)
c0000000001f15d0:       60 00 00 00     nop
c0000000001f15d4:       e8 04 00 10     ld      r0,16(r4)
c0000000001f15d8:       f8 84 00 00     std     r4,0(r4)
c0000000001f15dc:       f8 84 00 08     std     r4,8(r4)

-- 
           Summary: kernel panic when probe elv_dequeue_request
           Product: systemtap
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: kprobes
        AssignedTo: systemtap at sources dot redhat dot com
        ReportedBy: guanglei at cn dot ibm dot com


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

------- 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 kprobes/2453] kernel panic when probe elv_dequeue_request
  2006-03-13  8:34 [Bug kprobes/2453] New: kernel panic when probe elv_dequeue_request guanglei at cn dot ibm dot com
@ 2006-03-13 14:49 ` fche at redhat dot com
  2006-03-14  4:27   ` Ananth N Mavinakayanahalli
  2006-03-14  4:27 ` ananth at in dot ibm dot com
  2006-03-16  0:30 ` jkenisto at us dot ibm dot com
  2 siblings, 1 reply; 6+ messages in thread
From: fche at redhat dot com @ 2006-03-13 14:49 UTC (permalink / raw)
  To: systemtap


------- Additional Comments From fche at redhat dot com  2006-03-13 14:49 -------
To my powerpc-inexperienced eyes, it looks like the kprobe breakpoint ended up
on top of a tdnei (conditional trap) instruction.

-- 


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

------- 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

* Re: [Bug kprobes/2453] kernel panic when probe elv_dequeue_request
  2006-03-13 14:49 ` [Bug kprobes/2453] " fche at redhat dot com
@ 2006-03-14  4:27   ` Ananth N Mavinakayanahalli
  0 siblings, 0 replies; 6+ messages in thread
From: Ananth N Mavinakayanahalli @ 2006-03-14  4:27 UTC (permalink / raw)
  To: fche at redhat dot com; +Cc: systemtap

On Mon, Mar 13, 2006 at 02:49:19PM -0000, fche at redhat dot com wrote:
> 
> ------- Additional Comments From fche at redhat dot com  2006-03-13 14:49 -------
> To my powerpc-inexperienced eyes, it looks like the kprobe breakpoint ended up
> on top of a tdnei (conditional trap) instruction.

Well, that tdnei is what BUG() uses internally to cause a trap. Methinks,
we have hit a (possibly legitimate) BUG() while using the testcase.

Ananth

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

* [Bug kprobes/2453] kernel panic when probe elv_dequeue_request
  2006-03-13  8:34 [Bug kprobes/2453] New: kernel panic when probe elv_dequeue_request guanglei at cn dot ibm dot com
  2006-03-13 14:49 ` [Bug kprobes/2453] " fche at redhat dot com
@ 2006-03-14  4:27 ` ananth at in dot ibm dot com
  2006-03-16  0:30 ` jkenisto at us dot ibm dot com
  2 siblings, 0 replies; 6+ messages in thread
From: ananth at in dot ibm dot com @ 2006-03-14  4:27 UTC (permalink / raw)
  To: systemtap


------- Additional Comments From ananth at in dot ibm dot com  2006-03-14 04:27 -------
Subject: Re:  kernel panic when probe elv_dequeue_request

On Mon, Mar 13, 2006 at 02:49:19PM -0000, fche at redhat dot com wrote:
> 
> ------- Additional Comments From fche at redhat dot com  2006-03-13 14:49 -------
> To my powerpc-inexperienced eyes, it looks like the kprobe breakpoint ended up
> on top of a tdnei (conditional trap) instruction.

Well, that tdnei is what BUG() uses internally to cause a trap. Methinks,
we have hit a (possibly legitimate) BUG() while using the testcase.

Ananth


-- 


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

------- 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 kprobes/2453] kernel panic when probe elv_dequeue_request
  2006-03-13  8:34 [Bug kprobes/2453] New: kernel panic when probe elv_dequeue_request guanglei at cn dot ibm dot com
  2006-03-13 14:49 ` [Bug kprobes/2453] " fche at redhat dot com
  2006-03-14  4:27 ` ananth at in dot ibm dot com
@ 2006-03-16  0:30 ` jkenisto at us dot ibm dot com
  2006-03-16  3:18   ` Michael Ellerman
  2 siblings, 1 reply; 6+ messages in thread
From: jkenisto at us dot ibm dot com @ 2006-03-16  0:30 UTC (permalink / raw)
  To: systemtap


------- Additional Comments From jkenisto at us dot ibm dot com  2006-03-16 00:30 -------
Some questions come to mind:
a. Do we see the BUG only when there's a probepoint on elv_dequeue_request?
b. Is single-stepping the tdnei instruction somehow causing the BUG?
c. Should we be allowing probepoints on tdnei instructions?
d. Is the tdnei instruction really the first instruction after the function
prolog?  (This would make a difference if (b) or (c) comes into play.)

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|systemtap at sources dot    |ananth at in dot ibm dot com
                   |redhat dot com              |
             Status|NEW                         |ASSIGNED


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

------- 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

* Re: [Bug kprobes/2453] kernel panic when probe elv_dequeue_request
  2006-03-16  0:30 ` jkenisto at us dot ibm dot com
@ 2006-03-16  3:18   ` Michael Ellerman
  0 siblings, 0 replies; 6+ messages in thread
From: Michael Ellerman @ 2006-03-16  3:18 UTC (permalink / raw)
  To: sourceware-bugzilla; +Cc: systemtap

On 16 Mar 2006 00:30:35 -0000, jkenisto at us dot ibm dot com
<sourceware-bugzilla@sourceware.org> wrote:
>
> ------- Additional Comments From jkenisto at us dot ibm dot com  2006-03-16 00:30 -------
> Some questions come to mind:
> a. Do we see the BUG only when there's a probepoint on elv_dequeue_request?
> b. Is single-stepping the tdnei instruction somehow causing the BUG?
> c. Should we be allowing probepoints on tdnei instructions?
> d. Is the tdnei instruction really the first instruction after the function
> prolog?  (This would make a difference if (b) or (c) comes into play.)
>
> http://sourceware.org/bugzilla/show_bug.cgi?id=2453

Well I can answer d), that isn't the first instruction after the
prolog, there is no prolog. The probe should really be sitting on the
first ld instruction.

The first four instructions are evaluating
"list_empty(&rq->queuelist)", so the probe is in the wrong place
AFAICT.

cheers

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

end of thread, other threads:[~2006-03-16  3:18 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-03-13  8:34 [Bug kprobes/2453] New: kernel panic when probe elv_dequeue_request guanglei at cn dot ibm dot com
2006-03-13 14:49 ` [Bug kprobes/2453] " fche at redhat dot com
2006-03-14  4:27   ` Ananth N Mavinakayanahalli
2006-03-14  4:27 ` ananth at in dot ibm dot com
2006-03-16  0:30 ` jkenisto at us dot ibm dot com
2006-03-16  3:18   ` Michael Ellerman

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).