Bug 102418 - 'strace -e read=n' fails with 'invalid descriptor'
'strace -e read=n' fails with 'invalid descriptor'
Product: Red Hat Linux
Classification: Retired
Component: strace (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Roland McGrath
Brian Brock
Depends On:
  Show dependency treegraph
Reported: 2003-08-14 18:22 EDT by Justin Mason
Modified: 2007-04-18 12:56 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2003-08-21 05:54:43 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Justin Mason 2003-08-14 18:22:33 EDT
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

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

How reproducible:

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 05:54:43 EDT
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 12:04:39 EST
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.


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