mwnamLZfIY1FZ4o2lad4zO0YCrK2d4Wiq0kf4VbfCBqMju955KFMnOrCoZaKYVpCH13u3w xMFbAFLe+dUjUGz8Klo30Ps0VAT6MAz5odpwMfKE0w5EfNA+RBC1JUrCYQvl+k66V/Ksoz +TiQdDcWJV4//hRo/WnAEXvN5ZvqUsyYuY6bvIf3UOpXmNaz1rWR80zr66QzOg== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4g4DlK4gtpz63C for ; Mon, 27 Apr 2026 19:53:33 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 63RJrXJo016803 for ; Mon, 27 Apr 2026 19:53:33 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 63RJrXeu016802 for bugs@FreeBSD.org; Mon, 27 Apr 2026 19:53:33 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 294832] lockf: does not block when locking on fd Date: Mon, 27 Apr 2026 19:53:33 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: Unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: chris@chrullrich.net X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@FreeBSD.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D294832 Bug ID: 294832 Summary: lockf: does not block when locking on fd Product: Base System Version: Unspecified Hardware: Any OS: Any Status: New Severity: Affects Some People Priority: --- Component: bin Assignee: bugs@FreeBSD.org Reporter: chris@chrullrich.net When lockf(1) is not set to delete the lock file upon releasing the lock, it should block in the flock() call for performance reasons. This is also the case when it is operating on an fd to an existing file. The acquire_lock() function, however, does not consider whether blocking or non-blocking mode is requested in the fdlock branch. On one of my systems this behavior burns ~50 % CPU time according to top wh= en a shell script uses lockf to serialize with another instance of itself. --=20 You are receiving this mail because: You are the assignee for the bug.=