This service will be undergoing maintenance at 20:00 UTC, 2017-04-03. It is expected to last about 30 minutes
Bug 66013 - fcntl failed to lock fileid for RedHat Linux7.1 on IA64
fcntl failed to lock fileid for RedHat Linux7.1 on IA64
Status: CLOSED CURRENTRELEASE
Product: Red Hat Linux
Classification: Retired
Component: kernel (Show other bugs)
7.1
ia64 Linux
medium Severity medium
: ---
: ---
Assigned To: Arjan van de Ven
Brian Brock
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2002-06-04 15:40 EDT by xindong.peng
Modified: 2007-04-18 12:42 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2003-06-09 08:48:56 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)

  None (edit)
Description xindong.peng 2002-06-04 15:40:48 EDT
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)

Description of problem:
I have written a very simple sample which uses fcntl(..), the same sample works 
fine on i386 RedHat Linux system but failed on Itanium RedHat linux system.

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


How reproducible:
Always

Steps to Reproduce:
1.I created sample tfcntl.c

#include <stdio.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/file.h>
#include <sys/stat.h>
#include <fcntl.h>

int main( )
{

        int fd;
        struct flock   farg;

        farg.l_type   = F_WRLCK;
   farg.l_whence = 0;
   farg.l_start  = 0;
   farg.l_len    = 0;



        fd=open("/yourpath/tt", O_RDWR | O_CREAT, S_IRWXU | S_IRWXG | S_IRWXO);

        if (fd > 0) {
                printf("fd=%d\n",fd);

                if ((fcntl (fd, F_SETLK, & farg)) != -1)
                        printf("Locked\n");
                else
                        printf("Failed to lock\n");
        }

        return 0;
}
2.Compile: >gcc -o tf tfcntl.c
3.Run: >tf
	

Actual Results:  On IA64:
fd=3
Failed to lock

On i386 (or i686):
fd=3
Locked

Expected Results:  fd=3
Locked

Additional info:

>uname -a 
Linux lcialnx1 2.4.3-12smp #1 SMP Fri Jun 8 13:06:07 EDT 2001 ia64 unknown
Comment 1 Arjan van de Ven 2002-06-05 03:50:44 EDT
Have you tried the 2.4.9-31 kernel that is released as erratum for 7.1/IA64 ?
Comment 2 xindong.peng 2002-06-05 08:55:20 EDT
I will try the 2.4.9-31 kernel and let you know the result when I am done.
Comment 3 xindong.peng 2002-06-07 14:15:18 EDT
It seems the new kernel fixed my problem. My sample works fine now. Thanks.

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