Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
For bugs related to Red Hat Enterprise Linux 5 product line. The current stable release is 5.10. For Red Hat Enterprise Linux 6 and above, please visit Red Hat JIRA https://issues.redhat.com/secure/CreateIssue!default.jspa?pid=12332745 to report new issues.

Bug 471169

Summary: [ biarch ] format fcntl64() system calls for 32 bit application incorrect.
Product: Red Hat Enterprise Linux 5 Reporter: Wade Mealing <wmealing>
Component: straceAssignee: Roland McGrath <roland>
Status: CLOSED ERRATA QA Contact: BaseOS QE <qe-baseos-auto>
Severity: medium Docs Contact:
Priority: medium    
Version: 5.2CC: dvlasenk, ebachalo, mnowak, pmuller, rlerch, tao
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 527223 661790 1483940 (view as bug list) Environment:
Last Closed: 2009-09-02 10:02:01 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:    
Bug Blocks: 527223, 661790, 1483940    
Attachments:
Description Flags
Testcase to exercise problem
none
Fix none

Description Wade Mealing 2008-11-12 05:15:31 UTC
Description of problem:

Analysis:  The problem with strace exists even upstream on the latest version of strace from sourceforge.net.  When running 64-bit version of strace on a 64-bit OS, it does not properly unpack the flock structure when tracing a 32-bit application.

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

strace-4.5.16-1.el5

How reproducible:

Every time


Steps to Reproduce:
1. Download file to be attached
2. run make test
3. Notice invalid parameters for fnctl args
  
Actual results:

Wildly inaccurate values.

Expected results:

Same between 32 and 64 bit applications.

Additional info:

File to be attached with testcases.

Comment 1 Wade Mealing 2008-11-12 05:20:45 UTC
Created attachment 323297 [details]
Testcase to exercise problem

%         strace  -e  trace=fcntl,fcntl64 ./testfnct32
[ Process PID=6710 runs in 32 bit mode. ]
File exists
fcntl64(3, F_SETLK, {type=F_WRLCK, whence=SEEK_SET, start=3352103089833246720, len=13027512328}) = 0
Lock worked

%         strace  -e  trace=fcntl,fcntl64 ./testfnct64
File exists
fcntl(3, F_SETLK, {type=F_WRLCK, whence=SEEK_SET, start=0, len=0}) = 0
Lock worked

Comment 2 Denys Vlasenko 2008-11-25 12:53:20 UTC
Created attachment 324600 [details]
Fix

Test run with patch applied:

# strace.t1/strace  -e  trace=fcntl,fcntl64 ./a32.out
[ Process PID=14216 runs in 32 bit mode. ]
File exists
fcntl(4, F_SETLK, {type=F_WRLCK, whence=SEEK_SET, start=0, len=0}) = 0
Lock worked

(btw your testcase tarball is gzipped twice over. how did you do that? :)

Comment 3 Denys Vlasenko 2008-11-25 16:05:42 UTC
Sent patch upstream to strace-devel.net

Subject line:
[PATCH] fix fcntl(F_SETLK) display for 32-bit apps on x86_64

Comment 4 Wade Mealing 2008-11-26 00:58:53 UTC
Re: double gzipped.. no idea.. I think i must have been distracted or something.

Comment 7 Denys Vlasenko 2009-01-06 15:16:32 UTC
Committed to upstream strace cvs.

Comment 8 Wade Mealing 2009-02-09 23:43:24 UTC
Tested on my end, works..

Comment 20 errata-xmlrpc 2009-09-02 10:02:01 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 therefore 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-2009-1317.html

Comment 22 Fedora Update System 2009-10-21 18:09:07 UTC
strace-4.5.19-1.fc10 has been submitted as an update for Fedora 10.
http://admin.fedoraproject.org/updates/strace-4.5.19-1.fc10

Comment 23 Fedora Update System 2009-10-21 18:09:51 UTC
strace-4.5.19-1.fc11 has been submitted as an update for Fedora 11.
http://admin.fedoraproject.org/updates/strace-4.5.19-1.fc11

Comment 24 Fedora Update System 2009-11-13 02:32:49 UTC
strace-4.5.19-1.fc11 has been pushed to the Fedora 11 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 25 Fedora Update System 2009-11-13 02:34:14 UTC
strace-4.5.19-1.fc10 has been pushed to the Fedora 10 stable repository.  If problems still persist, please make note of it in this bug report.