* [Bug translator/12498] New: systemtap.examples/process/noptrace hangs on RHEL4 because arguments are wrong
@ 2011-02-17 21:37 wcohen at redhat dot com
2011-02-18 15:19 ` [Bug translator/12498] " fche at redhat dot com
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: wcohen at redhat dot com @ 2011-02-17 21:37 UTC (permalink / raw)
To: systemtap
http://sourceware.org/bugzilla/show_bug.cgi?id=12498
Summary: systemtap.examples/process/noptrace hangs on RHEL4
because arguments are wrong
Product: systemtap
Version: unspecified
Status: NEW
Severity: normal
Priority: P2
Component: translator
AssignedTo: systemtap@sources.redhat.com
ReportedBy: wcohen@redhat.com
I was looking at why the tests were not completing on a i386 rhel4 system with
the linux 2.6.9-100.ELsmp kernel. Looking through the systemtap.log found that
noptrace.stp was the last running test. The end of systemtap.log would have the
following:
meta taglines 'test_installcheck: stap -g noptrace.stp -c 'strace -d ls'' tag
'test_installcheck' value 'stap -g noptrace.stp -c 'strace ls''
The tests hang there. If the "make installcheck" on the RHEL4 was put in the
background with a ^z and then put back in the foreground with "fg", the tests
would continue with:
attempting command stap -g noptrace.stp -c 'strace ls'
OUT strace[6259] ptrace(13082612) blocked: rc=0
strace[6257] ptrace(13082612) blocked: rc=0
strace[6257] ptrace(13082612) blocked: rc=0
strace[6257] ptrace(13082612) blocked: rc=0
chng_cpu.meta
chng_cpu.stp
cycle_thief.meta
cycle_thief.stp
...
RC 0
PASS: systemtap.examples/process/noptrace run
Commenting out the following line in syscall.ptrace seems to allow things to
continue:
$request=0xbeef # anything invalid should do
Get a lot of output like:
strace[11378] ptrace(13082612) blocked: rc=0
strace[11376] ptrace(13082612) blocked: rc=0
strace[11376] ptrace(13082612) blocked: rc=0
strace[11376] ptrace(13082612) blocked: rc=0
the 13082612 value looks suspect.
ran following on RHEL4:
stap -e 'probe syscall.ptrace{printf("%s\n", $$parms)}' -c 'strace ls'
The $$parms look very wrong. lots of things like the following in the output
request=0xc79ff4 pid=0xffffffffbff1cdb8 addr=0x1 data=0x0
request=0xc79ff4 pid=0xffffffffbff1cd08 addr=0x2c data=0xffffffffbff1ccf8
request=0xc79ff4 pid=0xffffffffbff1cd28 addr=0x18 data=0xffffffffbff1cd18
request=0xc79ff4 pid=0xffffffffbff1cd28 addr=0x0 data=0xffffffffbff1cd18
request=0xc79ff4 pid=0xffffffffbff1cd28 addr=0x4 data=0xffffffffbff1cd18
request=0xc79ff4 pid=0xffffffffbff1cdb8 addr=0x1 data=0x0
On i386 rhel5 system the output looks much more reasonable:
request=0x3 pid=0x32d4 addr=0x2c data=0xffffffffbf8c63a8
request=0x3 pid=0x32d4 addr=0x18 data=0xffffffffbf8c63d8
request=0x3 pid=0x32d4 addr=0x0 data=0xffffffffbf8c63d8
request=0x3 pid=0x32d4 addr=0x4 data=0xffffffffbf8c63d8
request=0x18 pid=0x32d4 addr=0x1 data=0x0
request=0x3 pid=0x32d4 addr=0x2c data=0xffffffffbf8c63d8
Maybe this is due to the debuginfo being bad on the RHEL4 kernel.
--
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] 4+ messages in thread
* [Bug translator/12498] systemtap.examples/process/noptrace hangs on RHEL4 because arguments are wrong
2011-02-17 21:37 [Bug translator/12498] New: systemtap.examples/process/noptrace hangs on RHEL4 because arguments are wrong wcohen at redhat dot com
@ 2011-02-18 15:19 ` fche at redhat dot com
2011-02-18 20:59 ` wcohen at redhat dot com
2011-02-25 16:18 ` wcohen at redhat dot com
2 siblings, 0 replies; 4+ messages in thread
From: fche at redhat dot com @ 2011-02-18 15:19 UTC (permalink / raw)
To: systemtap
http://sourceware.org/bugzilla/show_bug.cgi?id=12498
Frank Ch. Eigler <fche at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |fche at redhat dot com
--- Comment #1 from Frank Ch. Eigler <fche at redhat dot com> 2011-02-18 15:19:02 UTC ---
Perhaps the script could sanity-check incoming parameters and abort and/or
suppress its "$request=0xbeef" assignment.
--
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] 4+ messages in thread
* [Bug translator/12498] systemtap.examples/process/noptrace hangs on RHEL4 because arguments are wrong
2011-02-17 21:37 [Bug translator/12498] New: systemtap.examples/process/noptrace hangs on RHEL4 because arguments are wrong wcohen at redhat dot com
2011-02-18 15:19 ` [Bug translator/12498] " fche at redhat dot com
@ 2011-02-18 20:59 ` wcohen at redhat dot com
2011-02-25 16:18 ` wcohen at redhat dot com
2 siblings, 0 replies; 4+ messages in thread
From: wcohen at redhat dot com @ 2011-02-18 20:59 UTC (permalink / raw)
To: systemtap
http://sourceware.org/bugzilla/show_bug.cgi?id=12498
--- Comment #2 from William Cohen <wcohen at redhat dot com> 2011-02-18 20:59:17 UTC ---
On RHEL5 puts the probe at the first instruction of sys_ptrace function. On the
i686 RHEL4 system the probe in put farther into the function. RHEL4:
[wcohen@slingshot obj]$ stap -p2 -e 'probe syscall.ptrace{printf("%s\n",
$$parms)}' -c 'strace ls'
# functions
_dwarf_tvar_get_addr_6:long ()
_dwarf_tvar_get_data_7:long ()
_dwarf_tvar_get_pid_5:long ()
_dwarf_tvar_get_request_4:long ()
# probes
kernel.function("sys_ptrace@arch/i386/kernel/ptrace.c:235").call? /*
pc=_stext+0x985c */ /* <- syscall.ptrace = kernel.function("sys_ptrace").call?
<- syscall.ptrace */
using the _stext from System.Map-`uname -r`
pc=_stext+0x985c = c0100298 + 0x985c = C0109AF4
c0109af2 <sys_ptrace>:
c0109af2: 55 push %ebp
c0109af3: 57 push %edi
c0109af4: bf 00 f0 ff ff mov $0xfffff000,%edi #<-probe here
c0109af9: 56 push %esi
c0109afa: 53 push %ebx
c0109afb: 53 push %ebx
c0109afc: 53 push %ebx
c0109afd: 8b 5c 24 24 mov 0x24(%esp),%ebx
c0109b01: 21 e7 and %esp,%edi
Due to the eu-readelf being really old on RHEL-4, I copied the vmlinux over to
RHEL-5 and did the following:
eu-readelf --debug-dump=info vmlinux > /tmp/debug
section of interest:
[ 862dd] subprogram
sibling [ 86b9f]
external
name "sys_ptrace"
decl_file 1
decl_line 235
prototyped
type [ 7d202]
low_pc 0xc0109af2 <sys_ptrace>
high_pc 0xc010a0ea <do_syscall_trace>
frame_base location list [ 13a48]
[ 862fa] formal_parameter
name "request"
decl_file 1
decl_line 234
type [ 7d231]
location 2 byte block
[ 0] breg4 28
[ 86308] formal_parameter
name "pid"
decl_file 1
decl_line 234
type [ 7d231]
location 2 byte block
[ 0] breg4 32
[ 86316] formal_parameter
name "addr"
decl_file 1
decl_line 234
type [ 7d231]
location location list [ 13b40]
[ 86325] formal_parameter
name "data"
decl_file 1
decl_line 234
type [ 7d231]
location location list [ 13bc7]
Are the "location" fields for request and pid parameters reasonable?
--
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] 4+ messages in thread
* [Bug translator/12498] systemtap.examples/process/noptrace hangs on RHEL4 because arguments are wrong
2011-02-17 21:37 [Bug translator/12498] New: systemtap.examples/process/noptrace hangs on RHEL4 because arguments are wrong wcohen at redhat dot com
2011-02-18 15:19 ` [Bug translator/12498] " fche at redhat dot com
2011-02-18 20:59 ` wcohen at redhat dot com
@ 2011-02-25 16:18 ` wcohen at redhat dot com
2 siblings, 0 replies; 4+ messages in thread
From: wcohen at redhat dot com @ 2011-02-25 16:18 UTC (permalink / raw)
To: systemtap
http://sourceware.org/bugzilla/show_bug.cgi?id=12498
William Cohen <wcohen at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
--- Comment #3 from William Cohen <wcohen at redhat dot com> 2011-02-25 16:17:53 UTC ---
Added work around to avoid running the test on RHEL4 system.
commit ca23376536effd5ed935cde660c06d51b7334657
Author: William Cohen <wcohen@redhat.com>
Date: Thu Feb 24 14:02:21 2011 -0500
Disable systemtap.examples/process/noptrace.stp on RHEL4 systems (PR12498)
The debug information on RHEL4 kernels appears to be wrong. This causes
the noptrace.stp example to write into the wrong location. Rather than the
ptrace syscall exiting immediately, the ptrace syscall continues and the
test hangs on RHEL4 systems. The noptrace.stp test is disabled on RHEL4
systems to work around this issue.
--
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] 4+ messages in thread
end of thread, other threads:[~2011-02-25 16:18 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-17 21:37 [Bug translator/12498] New: systemtap.examples/process/noptrace hangs on RHEL4 because arguments are wrong wcohen at redhat dot com
2011-02-18 15:19 ` [Bug translator/12498] " fche at redhat dot com
2011-02-18 20:59 ` wcohen at redhat dot com
2011-02-25 16:18 ` 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).