Bug 66013 - fcntl failed to lock fileid for RedHat Linux7.1 on IA64
Summary: fcntl failed to lock fileid for RedHat Linux7.1 on IA64
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: kernel
Version: 7.1
Hardware: ia64
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Arjan van de Ven
QA Contact: Brian Brock
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2002-06-04 19:40 UTC by xindong.peng
Modified: 2007-04-18 16:42 UTC (History)
0 users

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2003-06-09 12:48:56 UTC
Embargoed:


Attachments (Terms of Use)

Description xindong.peng 2002-06-04 19:40:48 UTC
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 07:50:44 UTC
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 12:55:20 UTC
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 18:15:18 UTC
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.