Date: Sat, 14 Sep 2002 20:00:02 -0700 From: Kris Kennaway <kris@obsecurity.org> To: Kris Kennaway <kris@obsecurity.org> Cc: "Andrew P. Lentvorski" <bsder@mail.allcaps.org>, Matthew Jacob <mjacob@feral.com>, current@freebsd.org Subject: Re: NFS lock failure (was Re: FreeBSD 5.0 as a desktop 'failure' report) Message-ID: <20020915030002.GA2484@xor.obsecurity.org> In-Reply-To: <20020915025039.GA2139@xor.obsecurity.org> References: <20020914202747.GB74535@xor.obsecurity.org> <20020914171333.M91535-100000@mail.allcaps.org> <20020915012837.GA943@xor.obsecurity.org> <20020915025039.GA2139@xor.obsecurity.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--FL5UXtIhxfXey3p5 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Sep 14, 2002 at 07:50:39PM -0700, Kris Kennaway wrote: > On Sat, Sep 14, 2002 at 06:28:37PM -0700, Kris Kennaway wrote: > > On Sat, Sep 14, 2002 at 05:51:32PM -0700, Andrew P. Lentvorski wrote: > > > Folks, > > >=20 > > > Could someone *please* take a look at the NFS lock packets *on the wi= re*? > > > Without this, it becomes significantly harder to debug the failure. > >=20 > > Well, there's also the apparent problem of a non-blocking flock() > > operation blocking on the named pipe..but thanks for your suggestions, > > I'll go and try them out now. >=20 > I see pretty much the same problem when running the test suite against > localhost; the locking test blocks in fcntl() when it shouldn't be. >=20 > 89182 tlock 0.000507 RET write 44/0x2c > 89182 tlock 0.000071 CALL fcntl(0x7,0x7,0xbfbff680) > 89182 tlock 0.000025 NAMI "/var/run/lock" > 89183 tlock 1.568295 RET read RESTART > 89182 tlock 0.000152 RET fcntl RESTART >=20 > #define F_GETLK 7 /* get record locking information= */ >=20 > It looks like something is wrong with file locking. OK, I panicked the machine by doing an 'umount -f' on a nfs mount (no crashdump, because my swap partition is too small). When the machine rebooted (with a newer kernel, hmm) it is now completing the locking tests (note the warnings, though). My locking problems with the linux server continue though. Start tests on path /mnt/citusc17/citusc17.test [y/n]?=20 sh ./runtests -l -t /mnt/citusc17/citusc17.test Starting LOCKING tests: test directory /mnt/citusc17/citusc17.test (arg: -t) Testing native pre-LFS locking Creating parent/child synchronization pipes. Test #1 - Test regions of an unlocked file. Parent: 1.1 - F_TEST [ 0, 0] PASSED. Parent: 1.2 - F_TEST [ 0, ENDING] PASSED. Parent: 1.3 - F_TEST [ 0, 0] PASSED. Parent: 1.4 - F_TEST [ 1, 0] PASSED. Parent: 1.5 - F_TEST [ 1, ENDING] PASSED. Parent: 1.6 - F_TEST [ 1, 0] PASSED. Parent: 1.7 - F_TEST [ ffffffff, 7fffffff] PASSED. Parent: 1.8 - F_TEST [ ffffffff, ENDING] PASSED. Parent: 1.9 - F_TEST [ ffffffff, 7fffffff] WARNING! Parent: **** Expected EINVAL, returned EOVERFLOW... Parent: **** Okay if expecting large file semantics. Test #2 - Try to lock the whole file. Parent: 2.0 - F_TLOCK [ 0, ENDING] PASSED. Child: 2.1 - F_TEST [ 0, 0] PASSED. Child: 2.2 - F_TEST [ 0, ENDING] PASSED. Child: 2.3 - F_TEST [ 0, 0] PASSED. Child: 2.4 - F_TEST [ 1, 0] PASSED. Child: 2.5 - F_TEST [ 1, ENDING] PASSED. Child: 2.6 - F_TEST [ 1, 0] PASSED. Child: 2.7 - F_TEST [ ffffffff, 7fffffff] PASSED. Child: 2.8 - F_TEST [ ffffffff, ENDING] PASSED. Child: 2.9 - F_TEST [ ffffffff, 7fffffff] WARNING! Child: **** Expected EINVAL, returned EOVERFLOW... Child: **** Okay if expecting large file semantics. Parent: 2.10 - F_ULOCK [ 0, ENDING] PASSED. Test #3 - Try to lock just the 1st byte. Parent: 3.0 - F_TLOCK [ 0, 0] PASSED. Child: 3.1 - F_TEST [ 0, 0] PASSED. Child: 3.2 - F_TEST [ 0, ENDING] PASSED. Child: 3.3 - F_TEST [ 1, 0] PASSED. Child: 3.4 - F_TEST [ 1, ENDING] PASSED. Parent: 3.5 - F_ULOCK [ 0, 0] PASSED. Test #4 - Try to lock the 2nd byte, test around it. Parent: 4.0 - F_TLOCK [ 1, 0] PASSED. Child: 4.1 - F_TEST [ 0, 0] PASSED. Child: 4.2 - F_TEST [ 0, 0] PASSED. Child: 4.3 - F_TEST [ 0, ENDING] PASSED. Child: 4.4 - F_TEST [ 1, 0] PASSED. Child: 4.5 - F_TEST [ 1, 0] PASSED. Child: 4.6 - F_TEST [ 1, ENDING] PASSED. Child: 4.7 - F_TEST [ 2, 0] PASSED. Child: 4.8 - F_TEST [ 2, 0] PASSED. Child: 4.9 - F_TEST [ 2, ENDING] PASSED. Parent: 4.10 - F_ULOCK [ 1, 0] PASSED. Test #5 - Try to lock 1st and 2nd bytes, test around them. Parent: 5.0 - F_TLOCK [ 0, 0] PASSED. Parent: 5.1 - F_TLOCK [ 2, 0] PASSED. Child: 5.2 - F_TEST [ 0, 0] PASSED. Child: 5.3 - F_TEST [ 0, 0] PASSED. Child: 5.4 - F_TEST [ 0, ENDING] PASSED. Child: 5.5 - F_TEST [ 1, 0] PASSED. Child: 5.6 - F_TEST [ 1, 0] PASSED. Child: 5.7 - F_TEST [ 1, ENDING] PASSED. Child: 5.8 - F_TEST [ 2, 0] PASSED. Child: 5.9 - F_TEST [ 2, 0] PASSED. Child: 5.10 - F_TEST [ 2, ENDING] PASSED. Child: 5.11 - F_TEST [ 3, 0] PASSED. Child: 5.12 - F_TEST [ 3, 0] PASSED. Child: 5.13 - F_TEST [ 3, ENDING] PASSED. Parent: 5.14 - F_ULOCK [ 0, 0] PASSED. Parent: 5.15 - F_ULOCK [ 2, 0] PASSED. Test #6 - Try to lock the MAXEOF byte. Parent: 6.0 - F_TLOCK [ ffffffff, 7fffffff] PASSED. Child: 6.1 - F_TEST [ fffffffe, 7fffffff] PASSED. Child: 6.2 - F_TEST [ fffffffe, 7fffffff] PASSED. Child: 6.3 - F_TEST [ fffffffe, ENDING] PASSED. Child: 6.4 - F_TEST [ ffffffff, 7fffffff] PASSED. Child: 6.5 - F_TEST [ ffffffff, 7fffffff] WARNING! Child: **** Expected EINVAL, returned EOVERFLOW... Child: **** Okay if expecting large file semantics. Child: 6.6 - F_TEST [ ffffffff, ENDING] PASSED. Child: 6.7 - F_TEST [ 0, ENDING] WARNING! Child: **** Expected EINVAL, returned EACCES... Child: 6.8 - F_TEST [ 0, 0] WARNING! Child: **** Expected EINVAL, returned success... Child: 6.9 - F_TEST [ 0, 0] WARNING! Child: **** Expected EINVAL, returned success... Child: 6.10 - F_TEST [ 0, ENDING] WARNING! Child: **** Expected EINVAL, returned EACCES... Parent: 6.11 - F_ULOCK [ ffffffff, 7fffffff] PASSED. Test #7 - Test parent/child mutual exclusion. Parent: 7.0 - F_TLOCK [ ffc, 0] PASSED. Parent: Wrote 'aaaa eh' to testfile [ 4092, 0 ]. Parent: Now free child to run, should block on lock. Parent: Check data in file to insure child blocked. Parent: Read 'aaaa eh' from testfile [ 4092, 0 ]. Parent: 7.1 - COMPARE [ ffc, 0] PASSED. Parent: Now unlock region so child will unblock. Parent: 7.2 - F_ULOCK [ ffc, 0] PASSED. Child: 7.3 - F_LOCK [ ffc, 0] PASSED. Parent: Now try to regain lock, parent should block. Child: Write child's version of the data and release lock. Child: Wrote 'bebebebeb' to testfile [ 4092, 0 ]. Child: 7.4 - F_ULOCK [ ffc, 0] PASSED. Parent: 7.5 - F_LOCK [ ffc, 0] PASSED. Parent: Check data in file to insure child unblocked. Parent: Read 'bebebebeb' from testfile [ 4092, 0 ]. Parent: 7.6 - COMPARE [ ffc, 0] PASSED. Parent: 7.7 - F_ULOCK [ ffc, 0] PASSED. Test #8 - Rate test performing lock/unlock cycles. Parent: Performed 1000 lock/unlock cycles in 20500 msecs. [5853 lpm]. Test #10 - Make sure a locked region is split properly. Parent: 10.0 - F_TLOCK [ 0, 0] PASSED. Parent: 10.1 - F_ULOCK [ 1, 0] PASSED. Child: 10.2 - F_TEST [ 0, 0] PASSED. Child: 10.3 - F_TEST [ 2, 0] PASSED. Child: 10.4 - F_TEST [ 3, ENDING] PASSED. Child: 10.5 - F_TEST [ 1, 0] PASSED. Parent: 10.6 - F_ULOCK [ 0, 0] PASSED. Parent: 10.7 - F_ULOCK [ 2, 0] PASSED. Child: 10.8 - F_TEST [ 0, 0] PASSED. Parent: 10.9 - F_ULOCK [ 0, 0] PASSED. Parent: 10.10 - F_TLOCK [ 1, 0] PASSED. Parent: 10.11 - F_ULOCK [ 2, 0] PASSED. Child: 10.12 - F_TEST [ 1, 0] PASSED. Child: 10.13 - F_TEST [ 3, 0] PASSED. Child: 10.14 - F_TEST [ 4, ENDING] PASSED. Child: 10.15 - F_TEST [ 2, 0] PASSED. Child: 10.16 - F_TEST [ 0, 0] PASSED. Test #11 - Make sure close() releases the process's locks. Parent: 11.0 - F_TLOCK [ 0, ENDING] PASSED. Parent: Closed testfile. Child: 11.1 - F_TLOCK [ 0, ENDING] PASSED. Child: 11.2 - F_ULOCK [ 0, ENDING] PASSED. Parent: 11.3 - F_TLOCK [ 1d, 0] PASSED. Parent: 11.4 - F_TLOCK [ 2000, 0] PASSED. Parent: Closed testfile. Child: 11.5 - F_TLOCK [ 0, ENDING] PASSED. Child: 11.6 - F_ULOCK [ 0, ENDING] PASSED. Parent: Wrote '123456789abcdef' to testfile [ 0, 0 ]. Parent: 11.7 - F_TLOCK [ 0, ENDING] PASSED. Parent: Wrote '123456789abcdef' to testfile [ 13, 0 ]. Parent: Closed testfile. Child: 11.8 - F_TLOCK [ 0, ENDING] PASSED. Child: 11.9 - F_ULOCK [ 0, ENDING] PASSED. Parent: Wrote '123456789abcdef' to testfile [ 0, 0 ]. Parent: 11.10 - F_TLOCK [ 0, ENDING] PASSED. Parent: Truncated testfile. Parent: Closed testfile. Child: 11.11 - F_TLOCK [ 0, ENDING] PASSED. Child: 11.12 - F_ULOCK [ 0, ENDING] PASSED. Test #12 - Signalled process should release locks. Child: 12.0 - F_TLOCK [ 0, ENDING] PASSED. Parent: Killed child process. Parent: 12.1 - F_TLOCK [ 0, ENDING] PASSED. Test #14 - Rate test performing I/O on unlocked and locked file. Parent: File Unlocked Child: Truncated testfile. Child: Truncated testfile. Child: Truncated testfile. Child: Truncated testfile. Child: Truncated testfile. Child: Truncated testfile. Child: Truncated testfile. Child: Truncated testfile. Child: Truncated testfile. Child: Truncated testfile. Child: Wrote and read 256 KB file 10 times; [9624.06 +/- 0.00 KB/s]. Parent: 14.0 - F_TLOCK [ 0, ENDING] PASSED. Parent: File Locked Child: Truncated testfile. Child: Truncated testfile. Child: Truncated testfile. Child: Truncated testfile. Child: Truncated testfile. Child: Truncated testfile. Child: Truncated testfile. Child: Truncated testfile. Child: Truncated testfile. Child: Truncated testfile. Child: Wrote and read 256 KB file 10 times; [9624.06 +/- 0.00 KB/s]. Parent: 14.1 - F_ULOCK [ 0, ENDING] PASSED. ** PARENT pass 1 results: 41/41 pass, 1/1 warn, 0/0 fail (pass/total). ** CHILD pass 1 results: 58/58 pass, 6/6 warn, 0/0 fail (pass/total). Congratulations, you passed the locking tests! All tests completed >=20 > Kris --FL5UXtIhxfXey3p5 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (FreeBSD) iD8DBQE9g/exWry0BWjoQKURAr54AJ9dyDnaFsfs4+Q73IIjXE/Dz8gi6ACgzirE hncDrDieuxNha2tgwx8qSgk= =Xyo2 -----END PGP SIGNATURE----- --FL5UXtIhxfXey3p5-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020915030002.GA2484>