From: Christian Ebner <c.ebner@proxmox.com>
To: Robert Obkircher <r.obkircher@proxmox.com>, pbs-devel@lists.proxmox.com
Subject: Re: [PATCH proxmox 1/4] sys: fs: report lock timeouts as such instead of EINTR
Date: Thu, 19 Nov 2026 11:53:27 +0100 [thread overview]
Message-ID: <553529c1-6a4f-4ec0-9ac5-bab9a22562aa@proxmox.com> (raw)
In-Reply-To: <0bad6679-5fd9-470f-be6e-df0230cd44e8@proxmox.com>
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 <c.ebner@proxmox.com>
>> ---
>> 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<P: AsRef<Path>>(
>>
>> 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),
>> }
>> }
next prev parent reply other threads:[~2026-11-19 10:53 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-18 18:02 [PATCH proxmox 0/4] fix #8341: reduce task list lock contention during old task log cleanup Christian Ebner
2026-11-18 18:02 ` [PATCH proxmox 1/4] sys: fs: report lock timeouts as such instead of EINTR Christian Ebner
2026-11-19 10:18 ` Robert Obkircher
2026-11-19 10:53 ` Christian Ebner [this message]
2026-11-18 18:02 ` [PATCH proxmox 2/4] rest-server: use shared instead of exclusive lock for old task cleanup Christian Ebner
2026-11-18 18:02 ` [PATCH proxmox 3/4] fix #8341: rest-server: do not lock task list during old log cleanup Christian Ebner
2026-11-18 18:02 ` [PATCH proxmox 4/4] rest-server: clamp old task log cleanup cutoff to earliest active task Christian Ebner
2026-11-19 10:55 ` Robert Obkircher
2026-11-19 11:06 ` Christian Ebner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=553529c1-6a4f-4ec0-9ac5-bab9a22562aa@proxmox.com \
--to=c.ebner@proxmox.com \
--cc=pbs-devel@lists.proxmox.com \
--cc=r.obkircher@proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.