public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
From: Josh Stone <jistone@redhat.com>
To: "Richard W.M. Jones" <rjones@redhat.com>
Cc: systemtap@sourceware.org
Subject: Re: Rapidly running systemtap causing hangs or oops
Date: Wed, 22 Jun 2011 23:52:00 -0000	[thread overview]
Message-ID: <4E028028.4010603@redhat.com> (raw)
In-Reply-To: <20110622230025.GG18438@amd.home.annexia.org>

On 06/22/2011 04:00 PM, Richard W.M. Jones wrote:
> Me again.  I can get something involving systemtap, ext2, the loop
> device, Linux 3.0 to oops very easily.  I'm not quite sure exactly
> what factor causes it, but here's an easy reproducer:
> 
> $ mkdir /tmp/mnt
> 
> $ truncate -s 1G /tmp/fs
> $ mkfs.ext2 -F /tmp/fs
> 
> $ cat > /tmp/test.sh 
> #!/bin/sh -
> echo mount
> mount -o loop /tmp/fs /tmp/mnt
> echo unmount
> umount /tmp/mnt
> 
> $ chmod +x /tmp/test.sh
> 
> $ while sudo stap -e 'probe module("ext2").statement ("*@*.c:*") { printf ("%s\n", pp()); }' -c /tmp/test.sh ; do : ; done
> 
> The final command usually either hangs the machine, or produces a long
> oops like the one attached, after just a few iterations.  It takes
> just a few seconds on my VM to get a hang or oops.

Can you try running stap with "-D STP_ALIBI"?  This alibi mode compiles
out most of stap's code, so each probe handler is reduced to just an
atomic increment, then a final hit count is reported on exit.

Another test might be to move the loop inside test.sh, so stap is left
running the whole time, and we might tell if the issue is timed around
stap's probe registration or unregistration.

> [  342.037017]  [<ffffffff8100b0ce>] show_registers+0xbd/0x206
> [  342.037017]  [<ffffffff814f6cba>] ? atomic_notifier_call_chain+0x14/0x16
> [  342.037017]  [<ffffffff814f4941>] __die+0x97/0xd8
> [  342.037017]  [<ffffffff8100be1c>] die+0x47/0x63
> [  342.037017]  [<ffffffff81009d79>] do_double_fault+0x65/0x67
> [  342.037017]  [<ffffffff814fb1aa>] double_fault+0x2a/0x30
> [  342.037017]  [<ffffffffa00ca6a6>] ? ext2_get_inode+0x6d/0x130 [ext2]

Is the Oops always this minimal?  Does it always (questionably) point to
the same ext2_get_inode location?

I'll play with this tomorrow and see if I can reproduce it myself...

Josh

  reply	other threads:[~2011-06-22 23:52 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-22 23:00 Richard W.M. Jones
2011-06-22 23:52 ` Josh Stone [this message]
2011-06-23  7:51   ` Richard W.M. Jones
2011-06-23 10:12     ` Flushing systemtap output without restarting (was: Re: Rapidly running systemtap causing hangs or oops) Richard W.M. Jones
2011-06-23 12:45       ` Richard W.M. Jones
2011-06-23 14:13     ` Rapidly running systemtap causing hangs or oops Frank Ch. Eigler
2011-06-23 16:16     ` Josh Stone
2011-06-23 16:28       ` Richard W.M. Jones

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4E028028.4010603@redhat.com \
    --to=jistone@redhat.com \
    --cc=rjones@redhat.com \
    --cc=systemtap@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).