Bug 113072
Summary: | [PATCH] RHEL3/ia64: strace -f on multithreaded 32 bit applications doesn't work | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | Red Hat Enterprise Linux 3 | Reporter: | Arun Sharma <arun-public> | ||||||||||
Component: | kernel | Assignee: | Jason Baron <jbaron> | ||||||||||
Status: | CLOSED ERRATA | QA Contact: | |||||||||||
Severity: | medium | Docs Contact: | |||||||||||
Priority: | medium | ||||||||||||
Version: | 3.0 | CC: | knoel, petrides, riel, rperkins, tao | ||||||||||
Target Milestone: | --- | ||||||||||||
Target Release: | --- | ||||||||||||
Hardware: | ia64 | ||||||||||||
OS: | Linux | ||||||||||||
Whiteboard: | ia32el fujitsu nec | ||||||||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||||||||
Doc Text: | Story Points: | --- | |||||||||||
Clone Of: | Environment: | ||||||||||||
Last Closed: | 2004-05-12 01:08:14 UTC | Type: | --- | ||||||||||
Regression: | --- | Mount Type: | --- | ||||||||||
Documentation: | --- | CRM: | |||||||||||
Verified Versions: | Category: | --- | |||||||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||||||
Embargoed: | |||||||||||||
Attachments: |
|
Description
Arun Sharma
2004-01-07 23:55:55 UTC
Created attachment 96822 [details]
el3-strace.patch
The problem happens because the ia64 kernel loads system call arguments from
the memory on to the register stack. strace, when used with the -f flag
modifies some of the system call arguments in memory. Because we're not
reloading the system call arguments from memory, those changes are lost.
The attached patch reloads the system call arguments from the register stack.
The patch is also accepted in 2.6.
Arun, is there an Issue Tracker associated with this bug? Issue Tracker 31437 opened as sev 3 Arun, what NPTL test programs are you referring to? Any IA-32 NPTL program. Such as glibc/nptl/tst-basic1.c. However, to run ia32 NPTL programs on ia64, you'll need the patch attached to Bug #107059. It might be simpler to reproduce the problem with a non-NPTL multithreaded program such as glibc/linuxthreads/Examples/ex1.c The fix is not specific to NPTL. Upstream strace just got a patch from David Mosberger that should fix this. If the reporter can build strace from the cvs sources on strace.sourceforge.net, testing that would be helpful. I'm not sure off hand where things are set up for IA32 emulation on an RHEL3/IA64 machine in house for me to test. Are you talking about: 2003-12-31 David Mosberger <davidm.com> * process.c (struct_user_offsets) [IA64]: Fix up register name list. I can't compile this on RHEL3/ia64. But any user level change can't possibly fix this problem because the kernel is failing to modify system call arguments as requested by strace. Created attachment 98052 [details]
thread test
thread teset case
Created attachment 98053 [details]
strace -f output
The 'strace -f' still seems to fail for me with this patch, as shown in the output in comment 16 with the test case from comment 15. Not sure what's going on, but i did notice that this patch is different from the current 2.4 version The patch is different from 2.4 and 2.6, because of the differences in the ptregs layout. The base kernels have the kernel entry/exit optimization patch. ok, but you get a correct trace with the program from comment #15? Created attachment 98059 [details] strace output Can't reproduce. Here's how I tested: - 2.4.21-9.EL - NPTL patch - ia32-syscalls-el3.patch (bug #107744) - sigwait.patch - missing-paren.patch - el3-strace.patch And everything seems to work fine. Jason, it looks like you're using the 64 bit strace. Can you try the 32 bit strace ? yes that was the problem. thanks. Setting state to modified as Ernie included into U2 on 2/29. An errata has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on the solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHSA-2004-188.html |