Article View: comp.sys.sun
Article #6640fcntl/F_RSETLK crashing 4.1 Sparcs ?? [lockd problem ??]
From: Eric Ho
Date: Wed, 23 Jan 1991 14:47
Date: Wed, 23 Jan 1991 14:47
45 lines
2094 bytes
2094 bytes
Have anyone out there seen fcntl() calls with F_RSETLK crashing 4.1
Sparc's ? I've seen this under vanilla 4.1 as well as 4.1 with the lockd
patch [i.e. patch id 100075 or something like that -- that patch replaces
ufs_lockf.o, klm_lockmgr.o and rpc.lockd].
Here are ~20 lines of code that can crash a 4.1 Sparc.
Note that the file, /holodeck/eric/yoyo is nfs-mounted from a fileserver.
I hand mounted it rw,soft,intr. I tried the code on most 4.1 Sparcs that
has local disks -- don't know what happen for other archs or with diskless
clients though. It crashes the system during the fcntl() call.
==========================================
#include <stdio.h>
#include <fcntl.h>
int lock_val;
#define READLOCK_FILE(fd1) \
{ \
struct flock flock; \
flock.l_type = F_RDLCK; \
flock.l_whence = 0; \
flock.l_start = flock.l_len = 0L; \
lock_val = fcntl (fd1, F_RSETLK, &flock); \
}
main()
{
int fd;
/* Make sure that /holodeck is nfs-mounted */
fd = open("/holodeck/eric/yoyo",O_RDONLY,0000644);
printf("fd = %d\n",fd); fflush(stdout);
READLOCK_FILE(fd);
printf("lock_val = %d\n",lock_val); fflush(stdout);
close(fd);
}
==========================================
The strange thing is that if I use F_SETLK instead of F_RSETLK then
everything went ok. So I pressume that there is still some kernel bugs
related to rpc.lockd.
Any pointers much appreciated.
+ Eric Ho Email: eric@sbi.com
+ Salomon Brothers, Inc. [SISS] Phone: (212) 855-3003
Technical Details
Message-ID:
<1388@brchh104.bnr.ca>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!cunews!bnrgate!brtph3!brchh104!brchs1!bnr.ca!rice.edu!sun-spots-requestShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!cunews!bnrgate!brtph3!brchh104!brchs1!bnr.ca!rice.edu!sun-spots-request From: eric@picard.sbi.com (Eric Ho) Newsgroups: comp.sys.sun Subject: fcntl/F_RSETLK crashing 4.1 Sparcs ?? [lockd problem ??] Keywords: SunOS Message-ID: <1388@brchh104.bnr.ca> Date: 23 Jan 91 14:47:58 GMT Sender: news@brchh104.bnr.ca Organization: Sun-Spots Lines: 45 Approved: Sun-Spots@rice.edu X-Sun-Spots-Digest: Volume 10, Issue 12, message 20 X-Note: Submissions: sun-spots@rice.edu, Admin: sun-spots-request@rice.edu