Bug 493341 - fcntl call fails in emulation mode on IA64 when provided with >2GB values in 'struct flock'
fcntl call fails in emulation mode on IA64 when provided with >2GB values in ...
Status: CLOSED WONTFIX
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: ia32el (Show other bugs)
4.7
ia64 Linux
low Severity urgent
: rc
: ---
Assigned To: Petr Machata
BaseOS QE
:
Depends On:
Blocks: 494004
  Show dependency treegraph
 
Reported: 2009-04-01 09:58 EDT by Subramanyam Doguparthi
Modified: 2015-05-04 21:34 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 494004 (view as bug list)
Environment:
Last Closed: 2012-06-20 12:08:35 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)
patch for ia32el btlib linux, v7 (7022to7023) (4.08 KB, text/plain)
2009-04-03 03:08 EDT, Xiaolan
no flags Details
patch for ia32el btlib linux, v6u1(6639to6640) (4.09 KB, text/plain)
2009-04-03 03:10 EDT, Xiaolan
no flags Details
patch for ia32el btlib linux, v6(6100to6101) (4.08 KB, text/plain)
2009-04-03 03:11 EDT, Xiaolan
no flags Details
btlib binary of 6101 (204.99 KB, application/x-gzip-compressed)
2009-04-03 03:15 EDT, Xiaolan
no flags Details

  None (edit)
Description Subramanyam Doguparthi 2009-04-01 09:58:53 EDT
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 10:30:51 EDT
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 19:57:49 EDT
Doguparthi, 

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

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

Thanks
Xiaolan
Comment 4 Subramanyam Doguparthi 2009-04-02 04:01:28 EDT
Any estimates on timelines of the fix.
Comment 5 Xiaolan 2009-04-02 04:13:10 EDT
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 04:21:21 EDT
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 04:57:35 EDT
yes, it does exist in other versions.
Comment 8 Xiaolan 2009-04-03 03:08:43 EDT
Created attachment 337984 [details]
patch for ia32el btlib linux, v7 (7022to7023)
Comment 9 Xiaolan 2009-04-03 03:10:12 EDT
Created attachment 337987 [details]
patch for ia32el btlib linux, v6u1(6639to6640)
Comment 10 Xiaolan 2009-04-03 03:11:12 EDT
Created attachment 337989 [details]
patch for ia32el btlib linux, v6(6100to6101)
Comment 11 Xiaolan 2009-04-03 03:15:54 EDT
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 11:26:35 EDT
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 11:37:24 EDT
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 11:49:58 EDT
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 13:03:07 EDT
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 13:44:51 EDT
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 14:03:16 EDT
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 04:50:07 EDT
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 06:03:27 EDT
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 08:24:39 EDT
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 09:37:39 EDT
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 10:09:17 EDT
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 12:40:14 EDT
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-07 22:30:19 EDT
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 00:24:00 EDT
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 01:00:34 EDT
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 00:54:39 EDT
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 Product and Program Management 2010-10-22 14:59:50 EDT
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 12:08:35 EDT
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.