Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
From: HAIMO@wisconsin.cern.ch <HAIMO@wisconsin.cern.ch>
Subject: Miata hangs during NFS IO
Date: Wed, 20 Aug 1997 2:57:15 +0200 (CET-DST)	[thread overview]
Message-ID: <693d4dd7eece9587f0fc405958dcb85e.axp-list@archive.invalid> (raw)

system:	  DEC Personal Workstation 433a (Miata), 160 MB, no L3 cache installed
linux:	  RedHat 4.2 (kernel 2.0.30)
ethernet: tulip.c v0.76 w/ #define SKBUFF_RX_COPYBREAK 16384
problem:  nfs client apparently causes system freeze during heavy IO

Hello,

A colleague of mine, Chris Lishka, discovered an apparent connection between
the freeze/hang situations we have seen on this system and nfs IO. These seem 
to happen when reading or writing an nfs-mounted file system. The file systems 
involved are served by servers running DU V3.2b, DU 4.0b or VMS V6.2 (using 
Multinet NFS server). We have about 40-50 such filesystems and many of them are
larger than 2 or 4 GBytes. The hangs happen during transfers with cp, dd and
other commands, as well as when reading large files from user programs, and they
appear fairly reliably when doing such IO. Frequently enough to make this Miata
nearly useless for serious work :-( 

I have made some complementary tests to see if I can generate such hangs when 
the machine was booted without mounting any nfs file systems - no hangs observed
despite heavy IO on local disks. This is of course not conclusive, but it seems
to strongly indicate a problem with the linux nfs client on Alpha. 

I do seem to remember having seen remarks about patches for Alpha that deal
with file systems > 2 GB, but I have no specific pointers.
Are there any known fixes for this? 

Below I include the 2 emails Chris sent me about his findings. 
Especially intriguing is mail #2, since he seems to find inconsistencies in
the type of fileid ( u_int vs. int ) used in some routines, which could 
have an effect for large filesystems. (btw we don't have extremely large files,
just very many of them, up to ca. 200 MB each )

I hope someone can help here. Maybe some of this has been fixed in one of the
2.1.xx kernels ? 

- Haimo Zobernig

  haimo@wisconsin.cern.ch
 

Mail #1:
========
>
>Hey Haimo,
>
>I was doing more speed tests today with un-striped/striped AdvFS files and
>NFS3.  If you recall, yesterday while doing the speed test with pcuw04 you came
>in, were unable to log into pcuw04, and rebooted the node.  My suspicion was
>that the ethernet line to pcuw04 was so flooded that telnet requests were not
>getting through.  So, since you were not in, I thought I would retry the pcuw04
>speed test and see what kind of throughput I can achieve.
>
>Bad news.  A simple command-line such as the following (reading from an
>NFS-mounted disk served by afuw09) causes pcuw04 to lock up so bad I had to
>reboot:
>
>  cd /mnt/test1
>  date ; time dd bs=32040 if=data_1996_161_dst_55.epio of=/dev/null ; date
>
>My next thought was that either "dd" had a bug or the ethernet driver had a
>bug.  (The ethernet on my PC portable hangs occasionally with
>Netscape/IExplorer.)  To figure out which, I copied over the
>data_1996_161_dst_55.epio to my ~lishka/tmp directory with the command:
>
>  cd ~lishka/tmp
>  cp /mnt/test1/data_1996_161_dst_55.epio .
>
>This hung pcuw04 as well!!!  I rebooted again.  I was very suspicious that the
>ethernet driver was at fault.  I checked to see how much of the file had copied
>over -- 68meg had.  To add support to my theory, I then tried:
>
>  cd ~lishka/tmp  # i.e. Run the same dd command on my 68M file in ~lishka/tmp
>  date ; time dd bs=32040 if=data_1996_161_dst_55.epio
>
>pcuw04 hung again!!!  I rebooted and at this point left pcuw04 alone.
>
>To sanity check that loss of network bandwidth (due to high-speed transfers)
>was NOT the cause of the problem, I logged into afuw23 (a DUnix v4.0b node on
>ethernet) and did the same dd and cp tests from the NFS-mounted directory to
>/dev/null.  No crashes on the DUnix node (or with any other nodes on the
>network).  Plus, I achieved 0.981 megabytes/second throughput in one case --
>the fastest ethernet throughput I have ever seen.
>
>This appears to be a serious problem with Linux/Alpha.  Consider the following:
>
>	* Test 1: pcuw04 locks up while doing a "dd" transfer of a large file
>	          over ethernet from an NFS mounted directory to /dev/null.
>
>	* Test 2: pcuw04 locks up while doing a "cp" transfer of a large file
>	          over ethernet from an NFS mounted directory to disk.
>
>	* Test 3: pcuw04 locks up while doing a "dd" transfer of a large file
>	          >LOCALLY<  from disk to /dev/null!!!
>
>The general pattern here seems to be any fast I/O (whether over ethernet or
>not, to disk or /dev/null) causes pcuw04 to hang.  Obviously more tests need to
>be done.  I leave this up to you, as I do not know what I am damaging (if
>anything) by hanging pcuw04 so much.
>
>Please let me know what you turn up.  You can feel free to use or remove my
>~lishka/tmp/data* file which is 68meg -- it was only there for testing.
>
>					Cheers,
>						.oO Chris Oo.
>

Mail #2:
========

>I was poking around some of the configurable kernel constants on DUnix when I
>came across some of the NFS header files.  This gave me an idea, so I looked at
>the definitions in Linux on pcuw04.
>
>Here is the appropriate NFS structure for file attributes from
>/usr/include/linux/nfs.h:
>
>	struct nfs_fattr {
>	        enum nfs_ftype type;
>        	u_int mode;
>	        u_int nlink;
>	        u_int uid;
>	        u_int gid;
>	        u_int size;
>	        u_int blocksize;
>	        u_int rdev;
>	        u_int blocks;
>	        u_int fsid;
>--->	        u_int fileid;
>	        struct nfs_time atime;
>	        struct nfs_time mtime;
>	        struct nfs_time ctime;
>	};
>
>Notice the line marked by an arrow.  On DUnix's nfs.h, the like field (called
>na_nodeid) in the like structure (called nfsfattr.h there) has a comment
>stating that this field is the inode number.  Also note that it is declared as
>an unsigned int.
>
>Next I did some poking around /usr/src/linux/fs/nfs.  In particular, I grepped
>for all *.c files that use the fileid field.  dir.c has a lot of hits. 
>Furthermore, dir.c contains lines that look like:
>
>	dir.c:  int fileid;
>
>	dir.c:  int fileid = file->i_ino;
>
>Bingo!  dir.c is declaring temporary variables to hold inode numbers, but is
>improperly using "int" as the type.  Hence, the sign bit is misinterpreted. 
>Just for kicks, I checked the declaration for file->i_ino, which is in
>/usr/include/linux/fs.h:
>
>	/usr/include/linux/fs.h:        unsigned long   i_ino;
>
>Finally, I ran the command "grep -E 'inode|fileid' *.c | grep int" in
>/usr/src/linux/fs/nfs and manually searched for instances where inode and
>fileid are declared as "int":
>
>	dir.c:  int inode;
>	dir.c:  int fileid;
>	dir.c:  int fileid = file->i_ino;
>	dir.c:  slen = sprintf(silly, ".nfs%ld", inode->i_ino);
>	dir.c:  slen = sprintf(silly, ".nfs%ld", inode->i_ino);
>
>Uggh.
>
>This is by no means an exhaustive test.  It does however show that there are
>obvious bugs (at least obvious enough for me to locate) in Linux's NFS code.  I
>do not get a warm fuzzy feeling from this.
>
>					Cheers,
>						.oO Chris Oo

--
To unsubscribe: send e-mail to axp-list-request@redhat.com with
'unsubscribe' as the subject.  Do not send it to axp-list@redhat.com

                 reply	other threads:[~1997-08-20  0:57 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox