Date: Wed, 8 Mar 2006 21:39:34 -0500 (EST) From: Kris Kennaway <kris@obsecurity.org> To: FreeBSD-gnats-submit@FreeBSD.org Subject: bin/94258: O_NONBLOCK may block with rpc.lockd Message-ID: <20060309023934.9141652058@obsecurity.dyndns.org> Resent-Message-ID: <200603090240.k292e8dL084723@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 94258 >Category: bin >Synopsis: O_NONBLOCK may block with rpc.lockd >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Mar 09 02:40:07 GMT 2006 >Closed-Date: >Last-Modified: >Originator: Kris Kennaway >Release: FreeBSD 6.0-STABLE i386 >Organization: FreeBSD >Environment: System: FreeBSD xor.obsecurity.org 6.0-STABLE FreeBSD 6.0-STABLE #13: Sun Nov 6 12:45:25 EST 2005 kkenn@xor.obsecurity.org:/mnt/src/sys/i386/compile/XOR i386 >Description: When the rpc.lockd server is unreachable, locks acquired with O_NONBLOCK may block. They also block for a few minutes after rpc.lockd is restarted, but they eventually complete. >How-To-Repeat: On the server: dosirak# killall -KILL rpc.lockd On the client: haessal# lockf -t 0 -k pid echo Yay load: 0.00 cmd: lockf 1467 [lockd] 0.00u 0.00s 0% 528k [hangs forever] After rpc.lockd is restarted, it still takes a few minutes for the lock operation to complete successfully. New locks acquired in this period also block. >Fix: Unsure. Returning EWOULDBLOCK may not be correct since this means [EWOULDBLOCK] O_NONBLOCK and one of O_SHLOCK or O_EXLOCK is speci- fied and the file is locked. and the file may or may not be locked. Perhaps blocking is even correct behaviour according to the relevant standards, though this is counter-intuitive. >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060309023934.9141652058>