Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-pygit2 for openSUSE:Factory checked in at 2026-09-17 16:59:59 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-pygit2 (Old) and /work/SRC/openSUSE:Factory/.python-pygit2.new.383539 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-pygit2" Thu Sep 17 16:59:59 2026 rev:47 rq:1378557 version:1.19.3 Changes: -------- --- /work/SRC/openSUSE:Factory/python-pygit2/python-pygit2.changes 2026-06-15 19:53:10.415897585 +0200 +++ /work/SRC/openSUSE:Factory/.python-pygit2.new.383539/python-pygit2.changes 2026-09-17 17:00:06.937866022 +0200 @@ -1,0 +2,11 @@ +Mon Sep 14 07:06:00 UTC 2026 - Michal Suchanek <[email protected]> + +- Exclude another broken test (bsc#1278723) + +------------------------------------------------------------------- +Fri Sep 11 12:33:54 UTC 2026 - Michal Suchanek <[email protected]> + +- Fix BlobIO deadlock (gh#libgit2/pygit2#1488) + * Fix-BlobIO-cleanup-deadlock.patch + +------------------------------------------------------------------- New: ---- Fix-BlobIO-cleanup-deadlock.patch ----------(New B)---------- New:- Fix BlobIO deadlock (gh#libgit2/pygit2#1488) * Fix-BlobIO-cleanup-deadlock.patch ----------(New E)---------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-pygit2.spec ++++++ --- /var/tmp/diff_new_pack.BF0J2Z/_old 2026-09-17 17:00:08.175917903 +0200 +++ /var/tmp/diff_new_pack.BF0J2Z/_new 2026-09-17 17:00:08.181918155 +0200 @@ -25,6 +25,7 @@ License: GPL-2.0-only URL: https://github.com/libgit2/pygit2 Source: https://files.pythonhosted.org/packages/source/p/pygit2/pygit2-%{version}.tar.gz +Patch1: Fix-BlobIO-cleanup-deadlock.patch BuildRequires: %{python_module base >= 3.10} BuildRequires: %{python_module cached-property} BuildRequires: %{python_module cffi >= 1.17.0} @@ -63,11 +64,17 @@ %check rm -rf pygit2 +donttest="" +%ifarch s390x # test_no_context_lines failing on big endian # https://github.com/libgit2/pygit2/issues/812 -donttest="test_no_context_lines" -donttest="$donttest or test_push_options" +donttest="test_no_context_lines or test_diff_blobs" +%endif +if [ -n "$donttest" ] ; then %pytest_arch -k "not ($donttest)" +else +%pytest_arch +fi %files %{python_files} %license COPYING ++++++ Fix-BlobIO-cleanup-deadlock.patch ++++++ >From be67bec299cf38517fe23ec1fb6652ee82cef906 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Koutn=C3=BD?= <[email protected]> Date: Thu, 10 Sep 2026 15:16:33 +0200 Subject: [PATCH] Fix BlobIO cleanup deadlock When reading less than 8 KiB from the blob's data (io.DEFAULT_BUFFER_SIZE), the close() method would hang. Namely, close() thread would wait for self._writer_closed but the writer thread that'd set this is blocked by waiting in Blob__write_to_queue/.../blob_filter_stream_write/queue.put. The queue remains "full" (maxsize=1) because of unread data and no progress happens. Fix this by switching to "busy" wait for _writer_closed thus we empty the queue from the main thread and writer thread can proceed to its termination. Fixes #1488 Assisted-by: sonnet-5 --- pygit2/blob.py | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/pygit2/blob.py b/pygit2/blob.py index 1ee6a9eb..cb496c53 100644 --- a/pygit2/blob.py +++ b/pygit2/blob.py @@ -86,10 +86,20 @@ class _BlobIO(io.RawIOBase): def close(self) -> None: try: - self._ready.wait() - self._writer_closed.wait() - while self._queue is not None and not self._queue.empty(): - self._queue.get() + # The writer thread may be blocked in queue.put() because the + # queue (maxsize=1) still holds a chunk that was never consumed + # (e.g. the reader stopped before reaching EOF). Draining the + # queue must happen *before* (not after) waiting for + # `_writer_closed`, otherwise the writer can never make progress + # to reach its close callback and this would deadlock. + while True: + self._ready.wait() + while self._queue is not None and not self._queue.empty(): + self._queue.get() + if self._writer_closed.is_set(): + # Done + break + self._ready.clear() self._thread.join() except KeyboardInterrupt: pass -- 2.51.0
