diff --git a/0001-ocaml-Release-runtime-lock-around-call-to-nbd_close.patch b/0001-ocaml-Release-runtime-lock-around-call-to-nbd_close.patch deleted file mode 100644 index c7c91a4..0000000 --- a/0001-ocaml-Release-runtime-lock-around-call-to-nbd_close.patch +++ /dev/null @@ -1,75 +0,0 @@ -From 2c909bc3b8594943c4306ec78e8c13327ca16284 Mon Sep 17 00:00:00 2001 -From: "Richard W.M. Jones" -Date: Wed, 21 Jun 2023 22:41:43 +0100 -Subject: [PATCH] ocaml: Release runtime lock around call to nbd_close - -OCaml 5 is stricter than earlier versions about correct locking. - -We must release the OCaml runtime lock when calling nbd_close since it -may do some long-running operations and we want to allow concurrent -threads to run. - -However specifically if there are callbacks (eg. a debug callback) -then we would end up trying to re-acquire the lock in the callback, -resulting in a crash: - - (gdb) bt - #0 __pthread_kill_implementation (threadid=, - signo=signo@entry=6, no_tid=no_tid@entry=0) at pthread_kill.c:44 - #1 0x00007f47ffc8f773 in __pthread_kill_internal (signo=6, - threadid=) at pthread_kill.c:78 - #2 0x00007f47ffc3e71e in __GI_raise (sig=sig@entry=6) - at ../sysdeps/posix/raise.c:26 - #3 0x00007f47ffc2687f in __GI_abort () at abort.c:79 - #4 0x0000560c9eb62779 in caml_fatal_error () - #5 0x0000560c9eb63238 in caml_plat_fatal_error () - #6 0x0000560c9eb4ea77 in caml_acquire_domain_lock () - #7 0x0000560c9eb65cdc in caml_leave_blocking_section () - #8 0x0000560c9eaf8a87 in debug_wrapper (user_data=0x560ca0af2670, - context=0x7f47fff8ca60 "nbd_close", msg=0x560ca0af28b0 "closing handle") - at ../nbd-c.c:187 - #9 0x00007f47fff7072f in nbd_internal_debug (h=h@entry=0x560ca0b57db0, - context=0x7f47fff8ca60 "nbd_close", context@entry=0x0, - fs=fs@entry=0x7f47fff8ca6a "closing handle") - at /home/rjones/d/libnbd/lib/debug.c:90 - #10 0x00007f47fff73f23 in nbd_close (h=0x560ca0b57db0) - at /home/rjones/d/libnbd/lib/handle.c:127 - #11 0x0000560c9eae8dbe in nbd_internal_ocaml_handle_finalize ( - hv=) at ../handle.c:39 - #12 nbd_internal_ocaml_nbd_close (hv=) at ../handle.c:62 - #13 - #14 0x0000560c9eae84dc in camlTest_140_explicit_close__entry () at NBD.ml:148 - #15 0x0000560c9eae5c5b in caml_program () - #16 - #17 0x0000560c9eb6cb77 in caml_startup_common () - #18 0x0000560c9eb6cbef in caml_main () - #19 0x0000560c9eae5910 in main () ---- - ocaml/handle.c | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/ocaml/handle.c b/ocaml/handle.c -index fb45b30102..b3e5a0fc33 100644 ---- a/ocaml/handle.c -+++ b/ocaml/handle.c -@@ -26,6 +26,7 @@ - #include - #include - #include -+#include - - #include - -@@ -36,7 +37,9 @@ nbd_internal_ocaml_handle_finalize (value hv) - { - struct nbd_handle *h = NBD_val (hv); - -+ caml_enter_blocking_section (); - nbd_close (h); -+ caml_leave_blocking_section (); - } - - value --- -2.41.0 - diff --git a/libnbd.spec b/libnbd.spec index d925346..41890ee 100644 --- a/libnbd.spec +++ b/libnbd.spec @@ -2,14 +2,14 @@ %global verify_tarball_signature 1 # If there are patches which touch autotools files, set this to 1. -%global patches_touch_autotools 1 +%global patches_touch_autotools %{nil} # The source directory. %global source_directory 1.17-development Name: libnbd -Version: 1.17.1 -Release: 6%{?dist} +Version: 1.17.2 +Release: 1%{?dist} Summary: NBD client library in userspace License: LGPL-2.0-or-later AND BSD-3-Clause @@ -25,9 +25,6 @@ Source2: libguestfs.keyring # Maintainer script which helps with handling patches. Source3: copy-patches.sh -# Upstream patch to fix OCaml 5 support. -Patch: 0001-ocaml-Release-runtime-lock-around-call-to-nbd_close.patch - %if 0%{patches_touch_autotools} BuildRequires: autoconf, automake, libtool %endif @@ -377,6 +374,9 @@ make %{?_smp_mflags} check || { %changelog +* Fri Jul 14 2023 Richard W.M. Jones - 1.17.2-1 +- New upstream development version 1.17.2 + * Thu Jul 13 2023 Richard W.M. Jones - 1.17.1-6 - Bump and rebuild for updated python3 and perl diff --git a/sources b/sources index 95c438a..329ae5d 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (libnbd-1.17.1.tar.gz) = bda8e840ff1b6d7501105feaaa3991ff9d29c33b313b5895a9f12f68b299410eb8a5562213d92c935837926c8d0ca3f3efbaf23f72ce6b3601bc7f787a0ced26 -SHA512 (libnbd-1.17.1.tar.gz.sig) = 1588c1ae90fcaa9e9af669223023bbf50f7b3f90264281753659e1f964115ae2c47a5c0ae82ac2a4d1104a339c0c26a8d91a8aabec998c5d92e2ce31a8d2e5a2 +SHA512 (libnbd-1.17.2.tar.gz) = 9485f265f30dab1d518366d5c712f5e5c45443b06e84bb454288f4db6009b4ad5c286469d864aa78c1b9a3f3b64bc76dfc67f48fd9d257dd31482ef7b85e5909 +SHA512 (libnbd-1.17.2.tar.gz.sig) = aba3fb0ee3ffde4144f7dca888492c8d0df8dc31dd7615cf21745a0dd75828c4c8ba36580867b0a7b64963cc1bea7a9257d9bad1b190cdd7278b5ff4a9a172c9