[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Possible kernel bug in



This is technically a Whitebox bug, although it may also affect Redhat's kernel. We use Whitebox on a large Beowulf cluster. After we upgraded the cluster to 15.0.4 from 15.0.2, three of our users began to experience locking errors. Here's a bit of code that replicates the bug. The code works properly on a local filesystem, but fails on a NFS-mounted filesystem.

I also tested this against the lastest released kernel 2.4.21-20.ELsmp and experienced the same problem.


Mat --------------------------------------------------------------------------

#!/usr/bin/perl
use strict;
use warnings;

use Fcntl qw(:DEFAULT :flock);
sysopen(F,'test.file', O_RDWR | O_CREAT) or die "Can't open file. $!\n";
flock(F, LOCK_EX) or die "Can't lock. $!\n";
close(F);

--------------------------------------------------------------------------

Here's the relevent info from strace:

--------------------------------------------------------------------------

Test program on local drive:

flock(3, LOCK_EX) = 0

--------------------------------------------------------------------------

Test program on NFS-mounted drive:

flock(3, LOCK_EX) = -1 ENOLCK (No locks available)
open("/usr/share/locale/locale.alias", O_RDONLY) = 4
fstat64(4, {st_mode=S_IFREG|0644, st_size=2601, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb70ad000
read(4, "# Locale name alias data base.\n#"..., 4096) = 2601
read(4, "", 4096) = 0
close(4) = 0
munmap(0xb70ad000, 4096) = 0
open("/usr/share/locale/en_US/LC_MESSAGES/libc.mo", O_RDONLY) = -1 NOENT (No such file or directory)
open("/usr/share/locale/en/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
write(2, "Can\'t lock. No locks available\n", 31) = 31


--------------------------------------------------------------------------

We are currently using a Solaris 9 box to NFS-export our user's /home directories to the cluster.



Mat



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]