Bug 471169 - [ biarch ] format fcntl64() system calls for 32 bit application incorrect.
[ biarch ] format fcntl64() system calls for 32 bit application incorrect.
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: strace (Show other bugs)
5.2
x86_64 Linux
medium Severity medium
: rc
: ---
Assigned To: Roland McGrath
BaseOS QE
:
Depends On:
Blocks: 1483940 527223 661790
  Show dependency treegraph
 
Reported: 2008-11-12 00:15 EST by Wade Mealing
Modified: 2017-08-22 06:32 EDT (History)
6 users (show)

See Also:
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 06:02:01 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Testcase to exercise problem (8.45 KB, application/x-gzip)
2008-11-12 00:20 EST, Wade Mealing
no flags Details
Fix (1.11 KB, patch)
2008-11-25 07:53 EST, Denys Vlasenko
no flags Details | Diff

  None (edit)
Description Wade Mealing 2008-11-12 00:15:31 EST
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 00:20:45 EST
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 07:53:20 EST
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 11:05:42 EST
Sent patch upstream to strace-devel@lists.sourceforge.net

Subject line:
[PATCH] fix fcntl(F_SETLK) display for 32-bit apps on x86_64
Comment 4 Wade Mealing 2008-11-25 19:58:53 EST
Re: double gzipped.. no idea.. I think i must have been distracted or something.
Comment 7 Denys Vlasenko 2009-01-06 10:16:32 EST
Committed to upstream strace cvs.
Comment 8 Wade Mealing 2009-02-09 18:43:24 EST
Tested on my end, works..
Comment 20 errata-xmlrpc 2009-09-02 06:02:01 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 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 14:09:07 EDT
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 14:09:51 EDT
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-12 21:32:49 EST
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-12 21:34:14 EST
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.

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