Pull sync job fails with "unable to acquire snapshot lock (os error 11)" on the already-synced latest snapshot while the verify job runs; since #6990

aguerson

New Member
Mar 18, 2025
4
3
3
France
www.cpan.org
**Component:** Proxmox Backup Server, sync jobs / verify jobs

## Summary


After upgrading the sync target (bck2) from 4.2.8-1 to 4.2.14-1, the daily verify job on the target went from a few minutes to 16-26 hours per run, and the daily pull sync job started failing on one group per run with `unable to acquire snapshot lock ... (os error 11)`.

Related: #6990 (sync now drops the verify state of pulled snapshots). I understand that change is intentional, so the target copy gets verified on its own. The side effect is that a daily verify job on a sync target now does real work every day, runs continuously, and collides with the sync job on the newest snapshot of a group. I am not asking to revert #6990, but to make the sync tolerate this lock contention, and to document the interaction.


## Environment

- Source: bck1 (ZFS). Target: bck2, datastore bck2_tree1 on ZFS 2.4.4, 198 groups.
- bck2: proxmox-backup-server 4.2.14-1 (was 4.2.8-1 until 2026-11-23 11:17), kernel 7.0.14-30-pve, rebooted 2026-11-23 and 2026-11-27.
- Pull sync job from bck1, schedule 11:00 daily, `remove-vanished false`, `verified-only false`. It takes 8-15 minutes.
- Verify job on bck2_tree1: `schedule daily`, `ignore-verified true`, `outdated-after 30`.
- This chain ran for about two years without this problem.

## What changed

Verify job durations on bck2_tree1:

- August to 2026-11-24: typically 1-5 minutes. About every 30 days there was a cluster of longer runs (7-14 h), consistent with `outdated-after 30`.
- After the 4.2.14 upgrade: 2026-11-25 23h33, 11-26 16h29, 11-28 and 11-29 about 26 h each (11-27 was aborted by a reboot), 11-30 running since 04:04. Since the previous run overruns 24 h, the next one starts immediately.
- Skipped snapshots in the verify log: 1492 on the 2026-11-24 run, 1283 on the 2026-11-25 run. The difference (209) is consistent with roughly one fresh snapshot per group (~198) no longer being skipped.


Sync job results: errors on 2026-11-25 (same os error 11 on vm/5678, snapshot 2026-11-23T22:30:51Z, the newest snapshot on the target, copied by the 11-24 sync, the first one under 4.2.14; the verify job had been running since 00:00 that day), 11-28, 11-29 and 11-30. OK on 11-26 and 11-27.
## Evidence for the lock conflict

2026-11-30, failure 3 minutes after sync start:

```
[vm/1234]: vm/1234: skipped: 6 snapshot(s) (...) - older than the newest snapshot present on sync target
[vm/1234]: percentage done: 57.32% (113/198 groups, 1/2 snapshots in group #114)
[vm/1234]: sync group vm/1234 failed - 2026-11-28T22:48:50Z: while creating locked snapshot "vm/1234/2026-11-28T22:48:50Z": unable to acquire snapshot lock "/run/proxmox-backup/locks/bck2_tree1/vm-1234-2026\x2d11\x2d28T22\x3a48\x3a50Z": ... Resource temporarily unavailable (os error 11)
```

After the sync had ended (11:08:35), `lslocks` showed the daemon holding exactly that lock:

```
proxmox-backup- 2265 /run/proxmox-backup/locks/bck2_tree1/vm-1234-2026\x5cx2d11\x5cx2d28T22\x5cx3a48\x5cx3a50Z
```

PID 2265 (0x8D9) is the PID in all task UPIDs of that period. The verify job, started at 04:04 and still running, was the only long-running task, and no `.index.json.lck` existed yet for that snapshot (consistent with verification in progress).

2026-11-29, group vm/7890, snapshot 2026-11-27T23:17:06Z: the sync failed at 11:04:49. On the target, the snapshot directory was already complete (all files dated from the previous day's sync, same files and sizes as on bck1). Its `index.json.blob` was modified, and its `-.index.json.lck` created, at 11:05, which looks like the verify job writing its result at that moment.

I could not confirm the lock holder for the 2026-11-28 failure.

The sync already treats these snapshots as present: the log says older snapshots are skipped, then tries to process the newest local one again ("1/2 snapshots in group").

## Impact

- The sync job ends with errors every day, which triggers notifications.
- A failing snapshot aborts its group for that run, so newer snapshots of the group are delayed by one day.
- Data on both sides is intact, and snapshots are complete.

## Expected behavior / suggestions

1. A lock held by a verify job on an already complete, unchanged snapshot should not make the group fail. Options: skip the snapshot without needing the lock when the source is unchanged, wait or retry for a bounded time, or at least continue with the newer snapshots of the group and log a warning instead of an error.
2. Mention in the release notes or docs that since 4.2.11 a verify job on a sync target re-verifies every newly synced snapshot. This can make a daily verify job run continuously and overlap the sync schedule.
3. Is the repeated processing of the newest local snapshot at each sync intended?

Workaround: running the verify job weekly instead of daily.
 
Last edited:
  • Like
Reactions: AzharAbbasPK
After upgrading the sync target (bck2) from 4.2.8-1 to 4.2.14-1, the daily verify job on the target went from a few minutes to 16-26 hours per run, and the daily pull sync job started failing on one group per run with `unable to acquire snapshot lock ... (os error 11)`.

Related: #6990 (sync now drops the verify state of pulled snapshots). I understand that change is intentional, so the target copy gets verified on its own. The side effect is that a daily verify job on a sync target now does real work every day, runs continuously, and collides with the sync job on the newest snapshot of a group. I am not asking to revert #6990, but to make the sync tolerate this lock contention, and to document the interaction.
Is verify new snapshots set in the datastore options? Does the issue persist if you disable that and let the verify job take care of the verification instead?
 
You speak about "ignore-verified true" option ? or "verified-only false" ?


my conf on bck2, the second PBS


cat /etc/proxmox-backup/verification.cfg
===>
verification: v-0000c6f0-d973
ignore-verified true
ns
outdated-after 30
schedule daily
store bck2_tree1

verification: v-d4a7045a-86a0
ignore-verified true
ns
outdated-after 30
schedule daily
store bck2_tree2


cat /etc/proxmox-backup/sync.cfg
===>
sync: s-314c634c-7442
comment bck
encrypted-only false
ns
owner root@pam
remote remote_bck1
remote-ns
remote-store bck1_tree1
remove-vanished false
resync-corrupt false
schedule 11:00
store bck2_tree1
verified-only false


cat /etc/proxmox-backup/datastore.cfg
===>
datastore: bck2_tree1
gc-schedule 00:05
path /mnt/datastore/bck2_tree1

datastore: bck2_tree2
gc-schedule 00:05
path /mnt/datastore/bck2_tree2


cat /etc/proxmox-backup/prune.cfg
===>
prune: s-0212d317-962d
keep-last 3
keep-monthly 2
keep-weekly 2
keep-yearly 1
schedule 00:00
store bck2_tree1

prune: s-dbbcad33-6062
keep-monthly 12
schedule 00:00
store bck2_tree2
 
Thanks for the configs, this clears a few things. I was referring to the verify new snapshots option on the datastore config, which you do however not have set and is only relevant for the push direction.
Can you please share the full task log of the sync with the failure as well as the task log for the verification process? The suspected cause you mentioned is likely, but better to cross-check the task logs.
 
Thanks for looking into it, and understood about the "verify new snapshots" option (not set here, push only).

Attached are the full task logs (gzipped), as pairs of sync + verification runs that overlapped:

- 2026-11-29: sync failed at 11:04:49; verify run started 2026-11-29 01:56, ended 2026-11-30 04:03.
- 2026-11-28: sync failed at 11:06:52; verify run started 2026-11-28 00:00, ended 2026-11-29 01:56. For this day I could not confirm the lock holder myself, so the verify log is the useful part.
- 2026-11-30: sync failed at 11:03:40; verify run started 04:04 and was still running when I collected the log, so it is truncated. lslocks showed the proxy daemon holding the lock on exactly that snapshot right after the sync ended.

In the 11-29 verify log, vm/xxxx/2026-11-27T23:17:06Z should appear around 11:04-11:05.

The logs contain internal identifiers, so the attached versions are anonymized: VM/CT IDs, datastore names and host names are replaced consistently across all files (same group = same pseudonym). Timestamps, snapshot times and the log structure are unchanged, so the sync and verification logs can be cross-checked directly. I can provide more detail privately if needed.


some extra infos :

proxmox-backup-manager versions --verbose
proxmox-backup 4.2.0 running kernel: 7.0.14-30-pve
proxmox-backup-server 4.2.14-1 running version: 4.2.14
proxmox-kernel-helper 9.2.2
proxmox-kernel-7.0 7.0.14-30
proxmox-kernel-7.0.14-30-pve-signed 7.0.14-30
proxmox-kernel-7.0.14-25-pve-signed 7.0.14-25
proxmox-kernel-7.0.2-6-pve-signed 7.0.2-6
proxmox-kernel-6.14 6.14.11-9
proxmox-kernel-6.14.11-9-pve-signed 6.14.11-9
proxmox-kernel-6.14.11-4-pve-signed 6.14.11-4
proxmox-kernel-6.14.8-2-pve-signed 6.14.8-2
ifupdown2 3.3.0-1+pmx14
libjs-extjs 7.0.0-9
proxmox-backup-docs 4.2.14-1
proxmox-backup-client 4.2.14-1
proxmox-enterprise-support-keyring 1.1
proxmox-mail-forward 1.2.1
proxmox-mini-journalreader 1.7
proxmox-offline-mirror-helper 0.8.0
proxmox-widget-toolkit 5.2.23
pve-xtermjs 6.0.0-3
smartmontools 7.5-pve2
zfsutils-linux 2.4.4-pve1
 

Attachments