Bug 173986

Summary: tracing doesn't work on 32-bit binary
Product: Red Hat Enterprise Linux 3 Reporter: Bastien Nocera <bnocera>
Component: straceAssignee: Stepan Kasal <kasal>
Status: CLOSED ERRATA QA Contact: Brian Brock <bbrock>
Severity: medium Docs Contact:
Priority: medium    
Version: 3.0CC: tao
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: RHBA-2006-0408 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-07-20 14:56:39 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:
Bug Depends On: 174798    
Bug Blocks: 181405    
Attachments:
Description Flags
hello.c
none
strace-4.5.13-alt-qual_flags.patch none

Description Bastien Nocera 2005-11-23 13:52:32 UTC
strace-4.5.12-0.EL3.1 on x86-64

hello is an x86 32-bit binary.

On a RHEL3 x86:
$ strace -f -e trace=open ./hello32
open("/etc/ld.so.preload", O_RDONLY)    = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 3
open("/lib/tls/libc.so.6", O_RDONLY)    = 3
open("hello.txt", O_RDWR|O_APPEND|O_CREAT, 0700) = 3
open("hello.txt", O_RDWR|O_APPEND|O_CREAT, 0700) = 3
etc.

On a RHEL3 x86-64:
$ strace -f -e trace=open ./hello32
[ Process PID=586 runs in 32 bit mode. ]
(and nothing happens...)

Comment 1 Bastien Nocera 2005-11-23 13:52:39 UTC
Created attachment 121395 [details]
hello.c

Comment 2 Dmitry V. Levin 2005-12-02 11:40:50 UTC
Created attachment 121738 [details]
strace-4.5.13-alt-qual_flags.patch

I apparently independently discovered and fixed this issue two weeks ago.
Here is a proposed change.

Comment 3 Dmitry V. Levin 2005-12-02 12:26:53 UTC
The patch should be applied on top of the patch attached to #174798.

Comment 4 Bryan Mason 2005-12-08 07:49:09 UTC
I re-built strace with the alt-qual_flags patch uploaded here as well as the
alt-qual_syscall patch attached to BZ #174798.  I re-tested strace, and the
problem appears to have been fixed:

[root@x336 dw-83557]# BUILD/strace-4.5.12/strace -f -e trace=open ./hello32 
[ Process PID=9357 runs in 32 bit mode. ]
open("/etc/ld.so.preload", O_RDONLY)    = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 3
open("/lib/tls/libc.so.6", O_RDONLY)    = 3
open("hello.txt", O_RDWR|O_APPEND|O_CREAT, 0700) = 3
open("hello.txt", O_RDWR|O_APPEND|O_CREAT, 0700) = 3
open("hello.txt", O_RDWR|O_APPEND|O_CREAT, 0700) = 3
[etc.]



Comment 5 Roland McGrath 2006-01-12 09:49:01 UTC
I've put the changes in upstream, an obvious and useful addition to the
multipersonality support (such as it is).  Thanks.

Comment 6 Roland McGrath 2006-01-12 10:29:31 UTC
*** Bug 171397 has been marked as a duplicate of this bug. ***

Comment 9 Bob Johnson 2006-04-11 16:26:55 UTC
This issue is on Red Hat Engineering's list of planned work items 
for the upcoming Red Hat Enterprise Linux 3.8 release.  Engineering 
resources have been assigned and barring unforeseen circumstances, Red 
Hat intends to include this item in the 3.8 release.

Comment 14 Red Hat Bugzilla 2006-07-20 14:56:39 UTC
An advisory 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/RHBA-2006-0408.html