Bug 493341 - fcntl call fails in emulation mode on IA64 when provided with >2GB values in 'struct flock'
Summary: fcntl call fails in emulation mode on IA64 when provided with >2GB values in ...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: ia32el
Version: 4.7
Hardware: ia64
OS: Linux
low
urgent
Target Milestone: rc
: ---
Assignee: Petr Machata
QA Contact: BaseOS QE
URL:
Whiteboard:
Depends On:
Blocks: 494004
TreeView+ depends on / blocked
 
Reported: 2009-04-01 13:58 UTC by Subramanyam Doguparthi
Modified: 2015-05-05 01:34 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 494004 (view as bug list)
Environment:
Last Closed: 2012-06-20 16:08:35 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
patch for ia32el btlib linux, v7 (7022to7023) (4.08 KB, text/plain)
2009-04-03 07:08 UTC, Xiaolan
no flags Details
patch for ia32el btlib linux, v6u1(6639to6640) (4.09 KB, text/plain)
2009-04-03 07:10 UTC, Xiaolan
no flags Details
patch for ia32el btlib linux, v6(6100to6101) (4.08 KB, text/plain)
2009-04-03 07:11 UTC, Xiaolan
no flags Details
btlib binary of 6101 (204.99 KB, application/x-gzip-compressed)
2009-04-03 07:15 UTC, Xiaolan
no flags Details

Description Subramanyam Doguparthi 2009-04-01 13:58:53 UTC
Description of problem:

Fcntl call fails when "struct flock" fields are filed with >2GB value and program compiled with -D_LARGEFILE64_SOURCE=1 -D_FILE_OFFSET_BITS=64

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


How reproducible:


Steps to Reproduce:
1.
2.
3.

 I have the following program,

#include <stdio.h>
#include <unistd.h>
#include <string.h>
#include <fcntl.h>
#include <errno.h>
#include <limits.h>
#include <sys/types.h>
#include <sys/stat.h>

int main()
{
  unsigned int Bytes;
  struct flock64 lockdes;
  int fd;
  if ( (fd =open("/tmp/test", O_RDWR|O_CREAT|O_EXCL|O_SYNC|O_LARGEFILE)) == -1){
   printf("OPEN Failed %d %s\n",errno,strerror(errno));
  }
  else {
  printf("open PASS :%u %u\n",UINT_MAX,sizeof(lockdes));
    Bytes = UINT_MAX-3-260;
  //lockdes.l_pid = 0;
   lockdes.l_type =  F_WRLCK;
   lockdes.l_whence = SEEK_SET;
   lockdes.l_start = (UINT_MAX-1);
   lockdes.l_len = 1;
   if (fcntl(fd,  F_SETLK64 , &lockdes) == -1) {
   printf("fcntl Failed %d %s\n",errno,strerror(errno));
   }else{
     printf("fcntl PASS\n");
   }
   unlink("/tmp/test");
  }
}


 Compiled using :  gcc  -D_LARGEFILE64_SOURCE=1 -D_FILE_OFFSET_BITS=64 -o test test.c  on RHEL4 x86 system

 Executed the problem on RHEL4U7 IA64 system which got emulation layer working. Program fails with the following error,

  open PASS :4294967295 24
fcntl Failed 22 Invalid argument
  
Actual results:


Expected results:
fcntl call should pass

Additional info:

Comment 1 Subramanyam Doguparthi 2009-04-01 14:30:51 UTC
Presently our product is supported on RHEL4U7. We modified the fcntl calls inorder to support a new feature of the product which inturn created this problem. As we are not able to release the product into the market request to consider this issue with high priority.

Comment 2 Eric Lin 2009-04-01 23:57:49 UTC
Doguparthi, 

our engineer will take a look it and back to you this week.

Eric.

Comment 3 Xiaolan 2009-04-02 01:34:33 UTC
It's IA-32EL's bug. we will provide the patch soon.

Thanks
Xiaolan

Comment 4 Subramanyam Doguparthi 2009-04-02 08:01:28 UTC
Any estimates on timelines of the fix.

Comment 5 Xiaolan 2009-04-02 08:13:10 UTC
The fix is under validation now. I think it will be ready this week.

Doguparthi, could you tell the version of ia32-el on RHEL4.7? so that I can prepare a patch for your version.

you can get the version vi following command
/usr/lib/ia32el/ia32x_loader -v

Thanks
Xiaolan

Comment 6 Subramanyam Doguparthi 2009-04-02 08:21:21 UTC
biavm4-4.ind.hp.com:/root # /usr/lib/ia32el/ia32x_loader -v
IA32X Loader:           version=09.release
IA32X Generic   :       version=6,5,6515,0      path=/usr/lib/ia32el/ia32exec.bin
IA32X OS-Wrapper:       version=6.5.100.29.22.release

Won't this problem exists on other versions?

Comment 7 Xiaolan 2009-04-02 08:57:35 UTC
yes, it does exist in other versions.

Comment 8 Xiaolan 2009-04-03 07:08:43 UTC
Created attachment 337984 [details]
patch for ia32el btlib linux, v7 (7022to7023)

Comment 9 Xiaolan 2009-04-03 07:10:12 UTC
Created attachment 337987 [details]
patch for ia32el btlib linux, v6u1(6639to6640)

Comment 10 Xiaolan 2009-04-03 07:11:12 UTC
Created attachment 337989 [details]
patch for ia32el btlib linux, v6(6100to6101)

Comment 11 Xiaolan 2009-04-03 07:15:54 UTC
Created attachment 337990 [details]
btlib binary of 6101

Doguparthi,

It's the binary of btlib v6 with the bug fixed. you may download it and update your system.

1. tar -xzf ia32el_btlib_lnx_6101.tgz
2. cd ia32el_btlib_lnx_6101
3. cp ia32x_loader  libia32x.so suid_ia32x_loader /usr/lib/ia32el/

libmme.so hasn't been touched. so it's ok to use the old version.

Please tell me if you have any problem with it.

thanks
Xiaolan

Comment 12 Subramanyam Doguparthi 2009-04-03 15:26:35 UTC
How to identify which version of library to get picked up as a fix for my system?

Whats the delivery mechanism of this for customers? Do you please to release a RPM for all the versions?

Comment 13 Xiaolan 2009-04-03 15:37:24 UTC
hi Doguparthi,

the first three attachments are ia32el's source level patch for redhat.
you can use the last package to update your system. it's a package of ia32el binaries.

Thanks
Xiaolan

Comment 14 Xiaolan 2009-04-03 15:49:58 UTC
in fact, ia32el is released with OS. rehdat guys can help to merge the source level patch for next OS release.

The update package(last attachment) is to fix the problem on EL4U7.

If you would like to fix the problem on other platform, please tell me. I will prepare the package for you.

btw, the last package is for ia32el v6. you can identify the version by the command "/usr/lib/ia32el/ia32x_loader -v" and check the version number of IA32X Generic.

v6 :             IA32X Generic   :       version=6,5,*,* 
v6u1:            IA32X Generic   :       version=6,6,*,* 
V7:              IA32X Generic   :       version=7,*,*,*

Comment 15 Petr Machata 2009-04-03 17:03:07 UTC
RHEL4 ships ia32el V6, RHEL5 ships ia32el V7.  Need fixing in both versions.  This bug is for RHEL4.

Comment 17 Subramanyam Doguparthi 2009-04-03 17:44:51 UTC
Is the version of ia32el is specific to version of OS or they have thier own vesioning strategy? If ia32el is going to have its own versioning strategy, is there any relationship bewteen OS release version and ia32el version?

Xiaolan,

 Your message is confusing. The fix you provided is for v6 version or v7 version.

Comment 18 Xiaolan 2009-04-03 18:03:16 UTC
Doguparthi,

The update package is for v6, the version of ia32el shipped in RHEL4.

ia32el has its own versioning strategy. Each major version (v6, v6u1, v7) of ia32el has its target OS platforms. We did full validation for ia32el on its target OS.

Theoretically, the latest version of ia32el can work with all the released redhat and suse. But we don't suggest you to do so, because we didn't validate the latest version of ia32el on the old OS.

That's why I asked the version of IA-32 EL on your platform and prepared the specific update package for it.

thanks
Xiaolan

Comment 19 Subramanyam Doguparthi 2009-04-07 08:50:07 UTC
Whats the delivery mechanism of this fix? Are we going to release as a RPM for the existing systems? Which version of OS is going to have this issue fixed with the OS release?

Problem:
  My product can get installed on the system but it can't come up because of the present issue. Hence, I need to validate the prerequestie before installing the fix. Can you please provide the tips on what all I need to check on the system before my product gets installed  so that the present fix is available on the system to make product up and running.

Request your help.

Comment 20 Petr Machata 2009-04-07 10:03:27 UTC
Standard delivery mechanism for this kind of bugs is that Red Hat releases fixed package as an RPM in the next quarterly update.  I've requested this bug to be considered for inclusion in RHEL 4.9.  Your product would then either have RHEL 4.9 as a prerequisite, or particular N-V-R of ia32el package (in case the customer is willing to go unsupported and install fixed ia32el package on older system).

Comment 21 Subramanyam Doguparthi 2009-04-07 12:24:39 UTC
What do you mean by N-V-R of ia32el package? Whats the minimum level I need to check for N-V-R values?

Comment 22 Petr Machata 2009-04-07 13:37:39 UTC
Sorry, that was RPM lingo on my part.  N-V-R of a package is a name-version-release string of that package.  In RHEL 4.9 we currently ship ia32el-1.6-14.EL4 (that's the N-V-R string), fixed package would be ia32el-1.6-X.EL4, where X>14.  Likely 15, but if several iteration are needed internally to fix this, the number grows.

So for example if the fixed package got released for RHEL-4.9 as ia32el-1.6-15.EL4, you would tell your customers either to simply use RHEL-4.9, because that's the release that can support your product, or use any RHEL machine with ia32el-1.6-15.EL4.  But note installing newer package on old RHEL will render such system unsupported, as far as I know, so perhaps I shouldn't have brought up this topic at all.

Comment 23 Xiaolan 2009-04-07 14:09:17 UTC
yes, it's clean to update the system to rhel4.9.

If your customer has some special reason to use rhel4.7 now, the package "btlib binary of 6101" provide a workaround solution on old system.

Comment 24 Subramanyam Doguparthi 2009-04-07 16:40:14 UTC
But I need to support my product on RHEL U4, U5, U6, U7 and U8. I can't restrict the product only for U9 because we presently support the product on all the above mentioned  updates. 

If I want to check whether the system got a fix for this problem or not on all the above mentioned updates, what are the steps I need to follow. Our product installation is thru a shell script, hence I can use some shell commands based on suggestion.

Comment 25 Xiaolan 2009-04-08 02:30:19 UTC
hi Doguparthi ,

RHEL4U4, U5, U6, U7 are all using ia32el v6. 
To workaround the problem on these platforms. you may 
1. install ia32el rpm package shipped with the OS ISO files first. 
2. Then following the above tips to update the system with "btlib binary of 6101" package.

To make sure that the patch is applied:
3. start ia32el service
   service ia32el start
4. check the version of ia32el via "/usr/lib/ia32el/ia32x_loader -v"
the IA32X OS-Wrapper version should be 6.5.101.30.23.release
5. you may run your case to validate the fix.

Thanks
Xiaolan

Comment 26 Subramanyam Doguparthi 2009-04-08 04:24:00 UTC
Xiaolan,

 Than you for the update. 
 
 Whats the version os ia32el for U8 and U9 is planned?

 In one of our previous communication, its mentioned that RPM will get released. Can you please let me know the time lines of the same and also the rpm name?

Comment 27 Subramanyam Doguparthi 2009-04-08 05:00:34 UTC
Xiaolan,
 
 Can you please get the following command output from U4, U5, U6, U7 and U8 machines before and after the fix got installed,
 
 /usr/lib/ia32el/ia32x_loader -v

 This will help us me to get into conclusion on the checks I need to perform during installation and.

 Which version of OS ship ia32el v6u1?

Comment 28 Xiaolan 2009-04-09 04:54:39 UTC
hi Doguparthi,

for the version of ia32el. you may just focus on the version of IA32X OS-Wrapper.

after fix, it should be 6.5.101.30.23.release

following is a sample:

/root # /usr/lib/ia32el/ia32x_loader -v
IA32X Loader:           version=09.release
IA32X Generic   :       version=6,5,6515,0     
path=/usr/lib/ia32el/ia32exec.bin
IA32X OS-Wrapper:       version=6.5.101.30.23.release


Thanks
Xiaolan

Comment 29 RHEL Program Management 2010-10-22 18:59:50 UTC
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated in the
current release, Red Hat is unfortunately unable to address this
request at this time. Red Hat invites you to ask your support
representative to propose this request, if appropriate and relevant,
in the next release of Red Hat Enterprise Linux.

Comment 30 Jiri Pallich 2012-06-20 16:08:35 UTC
Thank you for submitting this issue for consideration in Red Hat Enterprise Linux. The release for which you requested us to review is now End of Life. 
Please See https://access.redhat.com/support/policy/updates/errata/

If you would like Red Hat to re-consider your feature request for an active release, please re-open the request via appropriate support channels and provide additional supporting details about the importance of this issue.


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