From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [45.144.208.40]) by lore.proxmox.com (Postfix) with ESMTPS id 7032A1FF0DE for ; Thu, 19 Nov 2026 11:53:33 +0100 (CET) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id F274121723; Thu, 19 Nov 2026 11:53:32 +0100 (CET) Message-ID: <553529c1-6a4f-4ec0-9ac5-bab9a22562aa@proxmox.com> Date: Thu, 19 Nov 2026 11:53:27 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH proxmox 1/4] sys: fs: report lock timeouts as such instead of EINTR To: Robert Obkircher , pbs-devel@lists.proxmox.com References: <20261118180228.341628-1-c.ebner@proxmox.com> <20261118180228.341628-2-c.ebner@proxmox.com> <0bad6679-5fd9-470f-be6e-df0230cd44e8@proxmox.com> Content-Language: en-US, de-DE From: Christian Ebner In-Reply-To: <0bad6679-5fd9-470f-be6e-df0230cd44e8@proxmox.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1795085608269 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.360 Adjusted score from AWL reputation of From: address DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment (newer systems) RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: GWWJCWSVGZCYA7WDMQNESFZHQQXD4A7T X-Message-ID-Hash: GWWJCWSVGZCYA7WDMQNESFZHQQXD4A7T X-MailFrom: c.ebner@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox Backup Server development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: On 11/19/26 11:18 AM, Robert Obkircher wrote: > > On 18.11.26 19:02, Christian Ebner wrote: >> Improves the error handling for file locking failing because of a >> timeout. Since the timeout is implemented by a timer signal that >> interrupts the blocking flock call, the propagated error message >> states, e.g.: >> ``` >> Unable to acquire lock "/var/log/proxmox-backup/tasks/.active.lock" - Interrupted system call (os error 4) >> ``` >> Instead, report that lock acquisition timed out after waiting for >> the requested duration, which is more telling. Other errors kinds >> remain unchanged. >> >> Signed-off-by: Christian Ebner >> --- >> proxmox-sys/src/fs/file.rs | 3 +++ >> 1 file changed, 3 insertions(+) >> >> diff --git a/proxmox-sys/src/fs/file.rs b/proxmox-sys/src/fs/file.rs >> index 4b7cfa8a..9c5d471a 100644 >> --- a/proxmox-sys/src/fs/file.rs >> +++ b/proxmox-sys/src/fs/file.rs >> @@ -474,6 +474,9 @@ pub fn open_file_locked>( >> >> match lock_file(&mut file, exclusive, Some(timeout)) { >> Ok(_) => Ok(file), >> + Err(err) if err.kind() == io::ErrorKind::Interrupted => { >> + bail!("Unable to acquire lock {path:?} - timed out after {timeout:?}") >> + } > The timeout value would be misleading if another signal interrupted > the call earlier than expected. Good catch, let's drop this patch then as it was intended as additional cosmetic improvement. > >> Err(err) => bail!("Unable to acquire lock {:?} - {}", path, err), >> } >> }