Bug 173986 - tracing doesn't work on 32-bit binary
tracing doesn't work on 32-bit binary
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: strace (Show other bugs)
3.0
x86_64 Linux
medium Severity medium
: ---
: ---
Assigned To: Stepan Kasal
Brian Brock
:
: 171397 (view as bug list)
Depends On: 174798
Blocks: RHEL3U8CanFix
  Show dependency treegraph
 
Reported: 2005-11-23 08:52 EST by Bastien Nocera
Modified: 2007-11-30 17:07 EST (History)
1 user (show)

See Also:
Fixed In Version: RHBA-2006-0408
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-07-20 10:56:39 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
hello.c (455 bytes, text/plain)
2005-11-23 08:52 EST, Bastien Nocera
no flags Details
strace-4.5.13-alt-qual_flags.patch (7.26 KB, patch)
2005-12-02 06:40 EST, Dmitry V. Levin
no flags Details | Diff

  None (edit)
Description Bastien Nocera 2005-11-23 08:52:32 EST
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 08:52:39 EST
Created attachment 121395 [details]
hello.c
Comment 2 Dmitry V. Levin 2005-12-02 06:40:50 EST
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 07:26:53 EST
The patch should be applied on top of the patch attached to #174798.
Comment 4 Bryan Mason 2005-12-08 02:49:09 EST
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 04:49:01 EST
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 05:29:31 EST
*** Bug 171397 has been marked as a duplicate of this bug. ***
Comment 9 Bob Johnson 2006-04-11 12:26:55 EDT
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 10:56:39 EDT
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

Note You need to log in before you can comment on or make changes to this bug.