[comp.unix.wizards] Errors that can't happen !

ray@sslvax.UUCP (03/31/87)

We are running a Sun 3/160 (3.2) with 2 Eagles as a server to a network
of Sun 2/50 & 3/50 ( some 3.2 most 2.0) and on random occasions
we get this message in the console window. 
rfs_read: attempt to read from non-file
rfs_read: attempt to read from non-file
...
....

We have been unable to correlate
the messages with any activity either on the server or any of the served 
machines (mixture or true clients, discfull and discless nodes).

Sun uk are unable to provide any suggestion other than it can't happen

Any ideas 


-- 
	Ray Saxton    ray@uk.co.ssl-macc  UK PSS 2342 62500104
		      mcvax!ukc!dcl-cs!sslvax!ray
	Telephone +(44) 625 29241

hedrick@topaz.UUCP (04/03/87)

A user reported a error
	rfs_read: attempt to read from non-file

from his Sun.  I saw that once when somebody tried to open a directory
over NFS and read it like a file, instead of using readdir.  Note that
I am talking kernel level.  User programs can read directories, but
the way this has to be implemented is that the kernel notices the
file being opend is a directory, issues readdir calls to the other
machine, and then gives the user program the data formatted so as
to look like a raw directory file.  This may seem arcane, but it's
the only way to handle a network where different machines have
different directory formats, but where applications insist on
reading the directories directly.  In Sun 3.0, the NFS server would
still let another machine's NFS read the directory as a file.
Presumably this would still be meaningful if both machines had the
same directory structure.  however it appears (based on experiment --
I didn't look at the code) that in 3.2, Sun's NFS server rejected
this with the error message quoted above, or something very close to
it.  I suppose it could also be that somebody tried to open a device
or socket over NFS.

adjg@otc.UUCP (04/06/87)

in article <535@ssl-macc.co.uk>, ray@ssl-macc.co.uk (Ray Saxton) says:
> We are running a Sun 3/160 (3.2) with 2 Eagles as a server to a network
> of Sun 2/50 & 3/50 ( some 3.2 most 2.0) and on random occasions
> we get this message in the console window. 
> rfs_read: attempt to read from non-file
> rfs_read: attempt to read from non-file
> ...
> ....
> 
> We have been unable to correlate
> the messages with any activity either on the server or any of the served 
> machines (mixture or true clients, discfull and discless nodes).

We get it on a small network of a Pyramid 90X and two sun 3/50s (one
server, one client). It seems to happen when the Pyramid mounts a sun
FS. We also have some other funnies with the Sun-Pyramid NFS since we
upgraded the Suns to Release 3.2 (Directories cannot be read by the ATT
universe read system call).
			      Andrew Gollan
UUCP:	{seismo,mcvax}!otc.oz!adjg		ACSnet:	adjg@otc.oz
		    Overseas Telecommunications Commission
-- 
			      Andrew Gollan
UUCP:	{seismo,mcvax}!otc.oz!adjg		ACSnet:	adjg@otc.oz
		    Overseas Telecommunications Commission

ray@sslvax.UUCP (04/06/87)

In article <10679@topaz.RUTGERS.EDU> hedrick@topaz.RUTGERS.EDU (Charles Hedrick) writes:
>A user reported a error
>	rfs_read: attempt to read from non-file
>
>from his Sun.  I saw that once when somebody tried to open a directory
>over NFS and read it like a file, instead of using readdir.  Note that

this is in fact the case. It occurs when an illegal file is read 
e.g. cat mydir 

and  mydir is an nfs "file" and you have mixed 2.X 3.X operating systems. 

	rgds ray

-- 
	Ray Saxton    ray@uk.co.ssl-macc  UK PSS 2342 62500104
		      mcvax!ukc!dcl-cs!sslvax!ray
	Telephone +(44) 625 29241

boyd@ausmelb.UUCP (04/07/87)

>in article <535@ssl-macc.co.uk>, ray@ssl-macc.co.uk (Ray Saxton) says:
> We are running a Sun 3/160 (3.2) with 2 Eagles as a server to a network
> of Sun 2/50 & 3/50 ( some 3.2 most 2.0) and on random occasions
> we get this message in the console window. 
> rfs_read: attempt to read from non-file
> rfs_read: attempt to read from non-file
> ...
> ....
> 

I'd say it's some sort of incompatibility between the various NFS
flavours you have.  The message probably results from a read of a
remote directory.  In early releases (2.0) it was ok to read directories
(but not exactly sensible) and there was the getdirentries() syscall.

I think the trend in later releases (3.0?) was to dissallow directory
reading (my friends at SUN can correct me here...).  Things that need to read
directories should use getdirentries().  Getdirentries() returns directory
names in a machine independant way.

Other causes may be due to a remote read of an un-supported object
(ie. remote device, socket (BSD) or named pipe (SYSV)).

Can you *see* the transparency?

--
Boyd Roberts			boyd@ausmelb.oz

When the going gets weird, the weird turn pro...
D