public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* [Bug uprobes/27260] New: uprobes is unstable on centos6 x86_64 when running the same script repeatedly against the same target process
@ 2021-01-28  2:07 agentzh at gmail dot com
  2023-10-30 15:26 ` [Bug uprobes/27260] " wcohen at redhat dot com
  0 siblings, 1 reply; 2+ messages in thread
From: agentzh at gmail dot com @ 2021-01-28  2:07 UTC (permalink / raw)
  To: systemtap

https://sourceware.org/bugzilla/show_bug.cgi?id=27260

            Bug ID: 27260
           Summary: uprobes is unstable on centos6 x86_64 when running the
                    same script repeatedly against the same target process
           Product: systemtap
           Version: unspecified
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: uprobes
          Assignee: systemtap at sourceware dot org
          Reporter: agentzh at gmail dot com
  Target Milestone: ---

We noted that use of uprobes on centos6 x86_64 is very unstable even with the
simplest script and the simplest target C program. Below is a minimal example
that can reliably reproduce the issue:

First of all, we create a simple C program as the target:


```
#include <stdio.h>

void foo(int i) {
    printf("hello %d\n", i);
}

int main(void) {
    int i = 0;
    while (1) {
        foo(i++);
    }
    return 0;
}
```

And then compile this C program without inlining:

```
gcc -O -fno-inline -g a.c
```

Run the target program forever:

```
./a.out > /dev/null
```

Finally, run a stap oneliner in a bash loop:

```
$ while true; do /opt/stap/bin/stap -d ~/a.out -e 'probe
process("/home/agentzh/a.out").function("foo") { println("Hit"); exit() }';
done
Hit
Hit
Hit
Hit
Hit
Hit
Hit
Hit
Hit
```

This loop will quickly hang sooner or later. Some times after 3 Hits, some
times after about 10.

And in the terminal running the ./a.out, we can see the target is already
killed:

```
[agentzh@centos6-pkg ~]$ ./a.out > /dev/null
Trace/breakpoint trap
[agentzh@centos6-pkg ~]$
```

I'm using the latest stap master (commit a790dc64a9d8d9):

```
[agentzh@centos6-pkg systemtap]$ /opt/stap/bin/stap -V
Systemtap translator/driver (version 4.5/0.177, commit
release-4.4-74-ga790dc64a9d8 + changes)
Copyright (C) 2005-2020 Red Hat, Inc. and others
This is free software; see the source for copying conditions.
tested kernel versions: 2.6.32 ... 5.10.0-rc
enabled features: JAVA LIBXML2 READLINE
```

Using the following centos6 stock kernel:

```
[agentzh@centos6-pkg systemtap]$ uname -r
2.6.32-754.18.2.el6.x86_64
```

Tested all the centos 6 kernels in the official repo. Same thing.

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

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

* [Bug uprobes/27260] uprobes is unstable on centos6 x86_64 when running the same script repeatedly against the same target process
  2021-01-28  2:07 [Bug uprobes/27260] New: uprobes is unstable on centos6 x86_64 when running the same script repeatedly against the same target process agentzh at gmail dot com
@ 2023-10-30 15:26 ` wcohen at redhat dot com
  0 siblings, 0 replies; 2+ messages in thread
From: wcohen at redhat dot com @ 2023-10-30 15:26 UTC (permalink / raw)
  To: systemtap

https://sourceware.org/bugzilla/show_bug.cgi?id=27260

William Cohen <wcohen at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |WONTFIX
             Status|UNCONFIRMED                 |RESOLVED
                 CC|                            |wcohen at redhat dot com

--- Comment #1 from William Cohen <wcohen at redhat dot com> ---
RHEL6 is out of support November 2020
(https://access.redhat.com/discussions/4768501) and support for 2.6.32 was
recently removed from systemtap (pr30434), so this is being closed.

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

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

end of thread, other threads:[~2023-10-30 15:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-28  2:07 [Bug uprobes/27260] New: uprobes is unstable on centos6 x86_64 when running the same script repeatedly against the same target process agentzh at gmail dot com
2023-10-30 15:26 ` [Bug uprobes/27260] " wcohen 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).