Re: got bad cookie warnings/errors?

2003-08-14 Thread Terry Lambert
Lars Eggert wrote:
 David Malone wrote:
  I have a vague feeling they are related to a directory changing while it
  is being read, and might mean that the NFS client sees an inconsistent
  version of the directory. It's been a long time since I looked at it
  though.
 
 Sounds reasonable, but I'm not sure if is the case for me:
 
 My home directory is NFS mounted from a Solaris box, and gets modified
 only from a single client (my desktop) at a time. I get these cookie
 messages whenever I log out of X, when a lot of things get read and
 written to that mount. Since all those reads and writes originate on my
 FreeBSD desktop, I would expect its NFS client to keep its cache
 consitent in that case.
 
 But maybe not.

The problem is that the next iteration in the directory hits a bad
cookie error because a delete ocurred during an iteration.  If the
program that's doing the iteration to do the deletes (which is what
is likely happening) snapshotted the directory *then* did them, it
would all work fine.

Note that deleting from a shell doesn't have this problem, since
the globbing occurs in the shell, and the arguments are all
expanded before being passed to the rm, so it doesn't have this
issue.

Basically, you have some badly behaved (for NFS) software.  You
can't really safely assume the server disk block size for the
back-off (not to mention duplicate suppression for a double rename
operation).

-- Terry
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: got bad cookie warnings/errors?

2003-08-14 Thread Lars Eggert
Emiel Kollof wrote:
I've been seeing lots of these lately:

got bad cookie vp 0xc2f40b68 bp 0xc929a1e8
got bad cookie vp 0xc318d124 bp 0xc91d4240
...
I grepped around, and it seems it has something to do with NFS (well, I found 
this being printf'ed in src/sys/nfsclient/nfs_bio.c

I have two NFS machines from which I mount, a 4.8-STABLE machine and a NetBSD 
1.6.1 box. I haven't seen any dataloss or panics. But still, should I be 
worried? How serious is this message?
I can only say that (1) I've been getting these forever, on both -stable 
and -current, and (2) I personally have never lost any data.

However, I have no clue as to why you and I get them, or what they signify.

Lars
--
Lars Eggert [EMAIL PROTECTED]   USC Information Sciences Institute


smime.p7s
Description: S/MIME Cryptographic Signature


Re: got bad cookie warnings/errors?

2003-08-14 Thread Lars Eggert
David Malone wrote:

On Sat, Aug 09, 2003 at 09:15:45PM -0700, Lars Eggert wrote:

I can only say that (1) I've been getting these forever, on both -stable 
and -current, and (2) I personally have never lost any data.

However, I have no clue as to why you and I get them, or what they signify.
I have a vague feeling they are related to a directory changing while it
is being read, and might mean that the NFS client sees an inconsistent
version of the directory. It's been a long time since I looked at it
though.
Sounds reasonable, but I'm not sure if is the case for me:

My home directory is NFS mounted from a Solaris box, and gets modified
only from a single client (my desktop) at a time. I get these cookie
messages whenever I log out of X, when a lot of things get read and
written to that mount. Since all those reads and writes originate on my
FreeBSD desktop, I would expect its NFS client to keep its cache
consitent in that case.
But maybe not.

Lars
--
Lars Eggert [EMAIL PROTECTED]   USC Information Sciences Institute


smime.p7s
Description: S/MIME Cryptographic Signature


Re: got bad cookie warnings/errors?

2003-08-14 Thread Terry Lambert
David Malone wrote:
 On Sat, Aug 09, 2003 at 09:15:45PM -0700, Lars Eggert wrote:
  I can only say that (1) I've been getting these forever, on both -stable
  and -current, and (2) I personally have never lost any data.
 
  However, I have no clue as to why you and I get them, or what they signify.
 
 I have a vague feeling they are related to a directory changing while it
 is being read, and might mean that the NFS client sees an inconsistent
 version of the directory. It's been a long time since I looked at it
 though.

This happens when the directory changes on the server out from
under a directory traversal in progress.

The most canonically correct thing to do is deal with this as
a single block restart; the NFS code, though, deals with it by
rereading from the beginning of the directory, rather than the
beginning of the block.

To implement the other way, you'd need to (effectively) get rid
of cookies entirely.  For this to work, you'd need to split the
VOP_READDIR into two parts: one to get a block, and one to take
a block that you got, and externalize it.  Then it could be FS
independent, but on a block boundary for restarting the directory
read back a block, instead of from the start of the file.

In general, this basically means that on really large directories,
locality of reference pretty much dictates that you might get into
a loop where you end up stuck doing this restart indefinitely.

Pretty ugly, actually...

-- Terry
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: got bad cookie warnings/errors?

2003-08-14 Thread Emiel Kollof
Op zondag 10 augustus 2003 20:50, schreef Lars Eggert:

[snip]

  I have a vague feeling they are related to a directory changing while it
  is being read, and might mean that the NFS client sees an inconsistent
  version of the directory. It's been a long time since I looked at it
  though.

 Sounds reasonable, but I'm not sure if is the case for me:

[snip]

Same here. There is really just one box here that does the bulk of the 
writing, and that's my FreeBSD workstation on my desk. There are some other 
machines mounting too (with wirite access), but they mostly only read from 
nfs mounts, and maybe occasionally they might write something, but changing a 
dir (moving? renaming? unlinking?) almost never happens. And no, I haven't 
seen dataloss. I tried moving some very largish (multigigabyte) files over 
and across, and never got corruption. 

So, is this cookie message related to a bug? If it's non-critical, could it 
perhaps be changed in such a way that it only prints when a kernel is booted 
in verbose mode? It's kinda monty-pythonesquely irritating (The left wing is 
/not/ on fire).

Cheers,
Emiel
-- 
If the King's English was good enough for Jesus, it's good enough for
me!
-- Ma Ferguson, Governor of Texas (circa 1920)

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: got bad cookie warnings/errors?

2003-08-14 Thread David Malone
On Sat, Aug 09, 2003 at 09:15:45PM -0700, Lars Eggert wrote:
 I can only say that (1) I've been getting these forever, on both -stable 
 and -current, and (2) I personally have never lost any data.
 
 However, I have no clue as to why you and I get them, or what they signify.

I have a vague feeling they are related to a directory changing while it
is being read, and might mean that the NFS client sees an inconsistent
version of the directory. It's been a long time since I looked at it
though.

David.
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to [EMAIL PROTECTED]


got bad cookie warnings/errors?

2003-08-11 Thread Emiel Kollof
Hi gang,

I've been seeing lots of these lately:

got bad cookie vp 0xc2f40b68 bp 0xc929a1e8
got bad cookie vp 0xc318d124 bp 0xc91d4240
...

I grepped around, and it seems it has something to do with NFS (well, I found 
this being printf'ed in src/sys/nfsclient/nfs_bio.c

I have two NFS machines from which I mount, a 4.8-STABLE machine and a NetBSD 
1.6.1 box. I haven't seen any dataloss or panics. But still, should I be 
worried? How serious is this message?

I'm running a very recent CURRENT, cvsupped this week, and a kernel wih 
Soeren's ATAng patches (which seem to work very well).

Cheers,
Emiel



___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to [EMAIL PROTECTED]