From: Haakon Riiser <haakon.riiser@fys.uio.no>
To: nfs@lists.sourceforge.net
Subject: read(2) hangs on the client side
Date: Sun, 8 May 2005 13:33:43 +0200 [thread overview]
Message-ID: <20050508113343.GA629@fox> (raw)
I have noticed that there is a specific case that can lock up the
client while doing read(2), and it seems to be a race condition that
only occures in a very specific situation. I will try to describe
this in as much detail as possible, since it is unlikely that you'll
be able to reproduce the bug for yourselves:
A big file (~ 250 MB) is shared on the NFS server. The NFS server
also acts as a Samba server, so that Windows machines can use it.
One of the Windows machines is running the eMule P2P client,
and it makes some of the Samba-hosted files available on the
eMule network.
The hang has _only_ happened when I try to access a shared file
via NFS while it is _simultaneously_ being accessed (via Samba)
by the eMule machine. To reproduce the hang from the NFS client's
side, I use this C program:
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
int main(int argc, char *argv[])
{
for (;;) {
char buf[4096];
int fd = open(argv[1], O_RDONLY);
read(fd, buf, 4096);
close(fd);
}
return 0;
}
It always hangs in the read() call, usually in the first iteration,
and after it does, _nothing_ can kill it, not even SIGKILL,
and until the next reboot, _any_ NFS operation -- even stat() --
on the accessed file will now hang.
I have no idea how Samba + eMule's access patterns look like,
but I know with 100 % certainty that it is the cause. If I move
the file in question out of eMule's shared directory, I can never
hang the NFS client no matter how long I run the above program.
If I move it back in, it hangs almost instantly. :-(
Note that only the Linux NFS client machine is seemingly affected by
this -- both the NFS/Samba server and the eMule-running Samba client
are doing just fine while the hang happens on the Linux client.
Some system info:
NFS client:
Slackware 10.1
Linux 2.6.11
nfs-utils 1.0.7
glibc 2.3.4
util-linux 2.12p
NFS server:
Fedora Core 3 (fully updated)
Linux 2.6.11-1.14_FC3
nfs-utils-1.0.6-52
glibc-2.3.5-0.fc3.1
Samba 3.0.15pre2-1
util-linux-2.12a-24.2
Any help in further analysis would be greatly appreciated!
--
Haakon
-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.
Get your fingers limbered up and give it your best shot. 4 great events, 4
opportunities to win big! Highest score wins.NEC IT Guy Games. Play to
win an NEC 61 plasma display. Visit http://www.necitguy.com/?r=20
_______________________________________________
NFS maillist - NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs
next reply other threads:[~2005-05-08 11:33 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-05-08 11:33 Haakon Riiser [this message]
2005-05-08 12:54 ` read(2) hangs on the client side Trond Myklebust
2005-05-08 13:21 ` Haakon Riiser
2005-05-08 13:59 ` Trond Myklebust
2005-05-08 14:37 ` Haakon Riiser
2005-05-09 10:38 ` Trond Myklebust
2005-05-09 14:13 ` Haakon Riiser
2005-05-11 14:23 ` Trond Myklebust
2005-05-14 22:39 ` Haakon Riiser
2005-05-14 23:38 ` Trond Myklebust
2005-05-15 6:21 ` Haakon Riiser
2005-05-15 6:39 ` Trond Myklebust
2005-05-15 6:54 ` Haakon Riiser
2005-05-15 7:00 ` Trond Myklebust
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20050508113343.GA629@fox \
--to=haakon.riiser@fys.uio.no \
--cc=nfs@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.