Bug 102418

Summary: 'strace -e read=n' fails with 'invalid descriptor'
Product: [Retired] Red Hat Linux Reporter: Justin Mason <jm>
Component: straceAssignee: Roland McGrath <roland>
Status: CLOSED ERRATA QA Contact: Brian Brock <bbrock>
Severity: medium Docs Contact:
Priority: medium    
Version: 9   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2003-08-21 09:54:43 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:

Description Justin Mason 2003-08-14 22:22:33 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4b) Gecko/20030618
Mozilla Firebird/0.6

Description of problem:
On RH9:

/usr/bin/strace -e write=1 /bin/echo
strace: invalid descriptor `1'

It *should* trace the process and dump output on fd 1 -- but it won't for some
reason...


Version-Release number of selected component (if applicable):
strace-4.4.95-2

How reproducible:
Always

Steps to Reproduce:
1. run:  /usr/bin/strace -e write=1 /bin/echo
2. look at error message
    

Actual Results:  strace: invalid descriptor `1'

Expected Results:  execve("/bin/echo", ["/bin/echo"], [/* 40 vars */]) = 0
uname({sys="Linux", node="merlin", ...}) = 0
etc. etc. etc.

Additional info:

My LANG is set to "C", all other locale vars are unset, running vanilla 2.4.21
kernel (not the rpm version with NPTL).   I'm fully up-to-date with 'updates'.

On debian sid:
ii  strace         4.4.99-1       A system call tracer

 >    /usr/bin/strace -e write=1 /bin/echo 
execve("/bin/echo", ["/bin/echo"], [/* 40 vars */]) = 0
uname({sys="Linux", node="merlin", ...}) = 0
brk(0)                                  = 0x804b80c
.... etc. etc.

Comment 1 Roland McGrath 2003-08-21 09:54:43 UTC
As you've noted, this is already fixed in the upstream current version.
Rawhide contains a newer upstream version and there will be an RHL9 errata
version at some point.  You can use the Rawhide version now (if the binary rpm
doesn't work for you rpmbuild --rebuild the src.rpm instead).


Comment 2 Jay Turner 2004-01-16 17:04:39 UTC
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/RHBA-2003-361.html