public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* [Bug uprobes/14537] New: Use of usymname() makes strace crash user processes
@ 2012-08-31 22:28 agentzh at gmail dot com
  2012-08-31 23:01 ` [Bug uprobes/14537] " agentzh at gmail dot com
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: agentzh at gmail dot com @ 2012-08-31 22:28 UTC (permalink / raw)
  To: systemtap

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

             Bug #: 14537
           Summary: Use of usymname() makes strace crash user processes
           Product: systemtap
           Version: unspecified
            Status: NEW
          Severity: critical
          Priority: P2
         Component: uprobes
        AssignedTo: systemtap@sourceware.org
        ReportedBy: agentzh@gmail.com
    Classification: Unclassified


Hello!

I've noticed that using the standard usymname() tapset function in my systemtap
scripts will make the user processes crash if I run the "strace" utility on the
user process that has been probed by my systemtap scripts.

I've tried both systemtap 1.8 release tarball and systemtap 2.0 (git master
HEAD, gaec884c) and got the same bad result.

I'm using Fedora 17 x86_64

    $ uname -a
    Linux w530 3.5.2-3.fc17.x86_64 #1 SMP Tue Aug 21 19:06:52 UTC 2012 x86_64
x86_64 x86_64 GNU/Linux

as well as strace 4.7.

Steps to reproduce:

1. Compile and run the following dead simple C program with gcc:

    int main(void) {
        for (;;) {
            sleep(1);
        }
        return 0;
    }

    The command that I use is "gcc -g a.c && ./a.out". The process ID for this
run of ./a.out was 29617.

2. Run the following dead simple systemtap script named a.stp with the "stap"
utility:

    probe process("./a.out").function("main") {
        printf("%s\n", usymname(0x123456))
        exit()
    }

   On the command line, I got

    $ stap a.stp
    0x123456

    Note that at this point, the stap program existed normally.

3. Run the "strace" utility against the ./a.out process that is still running
(started in step 1):

    $ strace -p 29617
    Process 29617 attached
    --- SIGTRAP {si_signo=SIGTRAP, si_code=0x5, si_pid=29617, si_uid=1000} ---
    --- SIGTRAP {si_signo=SIGTRAP, si_code=SI_KERNEL} ---
    +++ killed by SIGTRAP (core dumped) +++

    And at this point the process 29617 died horribly.

Removing the usymname() invocation from my stp script cannot reproduce this
issue.

If you need any further information, please let me know :)

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

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

* [Bug uprobes/14537] Use of usymname() makes strace crash user processes
  2012-08-31 22:28 [Bug uprobes/14537] New: Use of usymname() makes strace crash user processes agentzh at gmail dot com
@ 2012-08-31 23:01 ` agentzh at gmail dot com
  2012-09-10  7:01 ` [Bug tapsets/14537] " agentzh at gmail dot com
  2012-10-11 22:30 ` agentzh at gmail dot com
  2 siblings, 0 replies; 5+ messages in thread
From: agentzh at gmail dot com @ 2012-08-31 23:01 UTC (permalink / raw)
  To: systemtap

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

agentzh <agentzh at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |agentzh at gmail dot com

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

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

* [Bug tapsets/14537] Use of usymname() makes strace crash user processes
  2012-08-31 22:28 [Bug uprobes/14537] New: Use of usymname() makes strace crash user processes agentzh at gmail dot com
  2012-08-31 23:01 ` [Bug uprobes/14537] " agentzh at gmail dot com
@ 2012-09-10  7:01 ` agentzh at gmail dot com
  2012-10-11 22:30 ` agentzh at gmail dot com
  2 siblings, 0 replies; 5+ messages in thread
From: agentzh at gmail dot com @ 2012-09-10  7:01 UTC (permalink / raw)
  To: systemtap

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

agentzh <agentzh at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|uprobes                     |tapsets
           Severity|critical                    |normal

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

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

* [Bug tapsets/14537] Use of usymname() makes strace crash user processes
  2012-08-31 22:28 [Bug uprobes/14537] New: Use of usymname() makes strace crash user processes agentzh at gmail dot com
  2012-08-31 23:01 ` [Bug uprobes/14537] " agentzh at gmail dot com
  2012-09-10  7:01 ` [Bug tapsets/14537] " agentzh at gmail dot com
@ 2012-10-11 22:30 ` agentzh at gmail dot com
  2012-10-12  0:24   ` Josh Stone
  2 siblings, 1 reply; 5+ messages in thread
From: agentzh at gmail dot com @ 2012-10-11 22:30 UTC (permalink / raw)
  To: systemtap


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

agentzh <agentzh at gmail dot com> changed:

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

--- Comment #1 from agentzh <agentzh at gmail dot com> 2012-10-11 22:29:58 UTC ---
git commit c5516866 seems to have fixed this issue. thanks!

*** This bug has been marked as a duplicate of bug 14659 ***

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

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

* Re: [Bug tapsets/14537] Use of usymname() makes strace crash user processes
  2012-10-11 22:30 ` agentzh at gmail dot com
@ 2012-10-12  0:24   ` Josh Stone
  0 siblings, 0 replies; 5+ messages in thread
From: Josh Stone @ 2012-10-12  0:24 UTC (permalink / raw)
  To: systemtap, agentzh

On 10/11/2012 03:29 PM, agentzh at gmail dot com wrote:
> git commit c5516866 seems to have fixed this issue. thanks!
> 
> *** This bug has been marked as a duplicate of bug 14659 ***

Oh wow, I must have missed it when you filed 14537, but it definitely
looks like the same issue.  Thanks for confirming the fix!

Josh

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

end of thread, other threads:[~2012-10-12  0:24 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-08-31 22:28 [Bug uprobes/14537] New: Use of usymname() makes strace crash user processes agentzh at gmail dot com
2012-08-31 23:01 ` [Bug uprobes/14537] " agentzh at gmail dot com
2012-09-10  7:01 ` [Bug tapsets/14537] " agentzh at gmail dot com
2012-10-11 22:30 ` agentzh at gmail dot com
2012-10-12  0:24   ` Josh Stone

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