public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/btrfs-backup-ng] rawhide: Retry a shared lock acquire more than three times
@ 2026-10-23  3:04 Michael Berry
  0 siblings, 0 replies; only message in thread
From: Michael Berry @ 2026-10-23  3:04 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : rpms/btrfs-backup-ng
            Branch : rawhide
            Commit : 4e692b476d1b424127003f18fb0b95c27ebf545e
            Author : Michael Berry <trismegustis@gmail.com>
            Date   : 2026-10-22T22:45:39-04:00
            Stats  : +28/-0 in 2 file(s)
            URL    : https://src.fedoraproject.org/rpms/btrfs-backup-ng/c/4e692b476d1b424127003f18fb0b95c27ebf545e?branch=rawhide

            Log:
            Retry a shared lock acquire more than three times

The churn test in 0.9.19 failed on two ppc64le Koji builders: three
retries with no backoff are not enough under contention. Raise the bound
to twenty until upstream fixes it properly.

---
diff --git a/btrfs-backup-ng-0.9.19-shared-acquire-attempts.patch b/btrfs-backup-ng-0.9.19-shared-acquire-attempts.patch
new file mode 100644
index 0000000..a2c7c43
--- /dev/null
+++ b/btrfs-backup-ng-0.9.19-shared-acquire-attempts.patch
@@ -0,0 +1,26 @@
+From: Michael Berry <trismegustis@gmail.com>
+Date: Thu, 23 Oct 2026 03:00:00 -0400
+Subject: [PATCH] lock: retry a shared acquire more than three times
+
+0.9.19 retries a shared acquire that lost the release race a bounded
+three times with no backoff. Under CPU contention three holders churning
+one snapshot lose the race more than three times in a row a few times per
+thousand acquires (measured 3 to 8 per 900 on an x86_64 host with three
+suites running at once), and on Koji's ppc64le builders the suite's own
+churn test failed two out of two runs with "the lock directory ... could
+not be created or written to". Each retry is one cheap shell script, so
+raise the bound to twenty; a genuinely unwritable store still fails, just
+after twenty attempts instead of three.
+
+Sent upstream for a proper fix (bound plus a short backoff).
+--- a/src/btrfs_backup_ng/sshutil/lock.py	2026-10-22 21:37:22.278043300 -0400
++++ b/src/btrfs_backup_ng/sshutil/lock.py	2026-10-22 22:45:39.215147805 -0400
+@@ -129,7 +129,7 @@
+ #: an unwritable store; the exclusive acquire already recovers from the same race
+ #: by re-``mkdir``-ing within its own script. A couple of extra attempts cover it;
+ #: a genuinely unwritable store still fails, just after this many cheap retries.
+-SHARED_ACQUIRE_ATTEMPTS = 3
++SHARED_ACQUIRE_ATTEMPTS = 20
+ 
+ 
+ # --------------------------------------------------------------- cleanup

diff --git a/btrfs-backup-ng.spec b/btrfs-backup-ng.spec
index 544dde9..10734a1 100644
--- a/btrfs-backup-ng.spec
+++ b/btrfs-backup-ng.spec
@@ -6,6 +6,8 @@ Summary:        Btrfs backups with snapshots, incremental transfers and restore
 License:        MIT
 URL:            https://github.com/berrym/btrfs-backup-ng
 Source:         %{pypi_source btrfs_backup_ng}
+# Shared-lock acquire gave up after 3 lost races; Koji's ppc64le builders hit it. Sent upstream.
+Patch0:         btrfs-backup-ng-0.9.19-shared-acquire-attempts.patch
 
 BuildArch:      noarch
 BuildRequires:  python3-devel

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-10-23  3:04 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-23  3:04 [rpms/btrfs-backup-ng] rawhide: Retry a shared lock acquire more than three times Michael Berry

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox