Bug 102418 - 'strace -e read=n' fails with 'invalid descriptor'
Summary: 'strace -e read=n' fails with 'invalid descriptor'
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: strace
Version: 9
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Roland McGrath
QA Contact: Brian Brock
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2003-08-14 22:22 UTC by Justin Mason
Modified: 2007-04-18 16:56 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2003-08-21 09:54:43 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2003:361 0 normal SHIPPED_LIVE New strace package fixes numerous bugs 2003-11-18 05:00:00 UTC

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



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