Bug 471169 - [ biarch ] format fcntl64() system calls for 32 bit application incorrect.
Summary: [ biarch ] format fcntl64() system calls for 32 bit application incorrect.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: strace
Version: 5.2
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Roland McGrath
QA Contact: BaseOS QE
URL:
Whiteboard:
Depends On:
Blocks: 527223 661790 1483940
TreeView+ depends on / blocked
 
Reported: 2008-11-12 05:15 UTC by Wade Mealing
Modified: 2018-10-20 03:37 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 527223 661790 1483940 (view as bug list)
Environment:
Last Closed: 2009-09-02 10:02:01 UTC
Target Upstream Version:


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


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2009:1317 normal SHIPPED_LIVE strace bug fix update 2009-09-01 10:26:37 UTC

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@lists.sourceforge.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.


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