Skip to contentSkip to conversation

python3-pyzmq: skip test_close_all_fds ptest on musl

PATCH New Khem Raj 1 participant 2 messages Sep 27

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/2 python3-pyzmq: skip test_close_all_fds ptest on musl

test_close_all_fds closes the socket through the IOLoop's shadow socket and then reads s.closed. pyzmq implements that by calling zmq_getsockopt() on the handle, which libzmq's reaper thread may already have freed. With glibc the memory stays mapped, libzmq's tag check fails and ENOTSOCK comes back; musl's allocator can unmap it, so the ptest run segfaults intermittently and loses every result after it:

File ".../tests/test_future.py", line 319 in test_close_all_fds Segmentation fault (core dumped)

Closing a socket via a shadow and then querying .closed on the original segfaults on musl every time in a standalone reproducer and survives on glibc. Skip the test for musl.

Tested with meta-python-image-ptest-python3-pyzmq on qemux86-64 with yoe-musl-systemd-wayland.

AI-Generated: Uses Claude Code

---
 meta-python/recipes-devtools/python/python3-pyzmq_27.2.0.bb | 6 ++++++
 1 file changed, 6 insertions(+)
meta-python/recipes-devtools/python/python3-pyzmq_27.2.0.bb +6 -0
index 606e34e69f..bbce601f3f 100644
@@ -61,3 +61,9 @@ do_install_ptest() {
         cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/
         install -m 0644 ${S}/pytest.ini ${D}${PTEST_PATH}/pytest.ini
 }
+
+do_install_ptest:append:libc-musl() {
+        sed -i -e "s/ and not test_process_teardown'/ and not test_process_teardown and not test_close_all_fds'/" \
+            ${D}${PTEST_PATH}/run-ptest
+        grep -q "not test_close_all_fds'" ${D}${PTEST_PATH}/run-ptest || bbfatal "failed to skip test_close_all_fds in run-ptest"
+}
author
#1 lore raw

PATCH 2/2 python3-filelock: upgrade 3.32.4 -> 4.0.4

Add python3-crypt to RDEPENDS: the library now imports hashlib (_identity.py, pulled in by "import filelock" through the soft and strict locks).

Changelog: https://github.com/tox-dev/filelock/blob/4.0.4/docs/changelog.rst

4.0.4
- Hostnames differing only past their first 253 escaped characters now publish distinct soft-lock owners.

4.0.3
- Skip the fork-safety audit hook on CPython 3.10/3.11, where it broke thread creation under coverage or a debugger.

4.0.2
- Fix OS lock leaks, double closes and false deadlocks from concurrent acquire()/release() on thread_local=False locks.
- Async read-write locks give each asyncio task its own hold.

4.0.1
- Validate poll_interval at construction, on the setter and on acquire().

4.0.0 (breaking)
- SoftReadWriteLock uses a new on-disk generation-log protocol under <path>.rw that earlier releases do not see; all participants on a lock path must be upgraded together. It now requires os.link.
- SoftReadWriteLock exposes a generation fencing token, reports lost holds through on_compromise, and no longer deadlocks when a holder on another host dies mid-transition.

AI-Generated: Uses Claude Code

---
 .../{python3-filelock_3.32.4.bb => python3-filelock_4.0.4.bb}  | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
 rename meta-python/recipes-devtools/python/{python3-filelock_3.32.4.bb => python3-filelock_4.0.4.bb} (91%)
meta-python/recipes-devtools/python/python3-filelock_4.0.4.bb renamed from meta-python/recipes-devtools/python/python3-filelock_3.32.4.bb +2 -1
similarity index 91%
rename from meta-python/recipes-devtools/python/python3-filelock_3.32.4.bb
rename to meta-python/recipes-devtools/python/python3-filelock_4.0.4.bb
index e3642b2087..23cc4484c8 100644
@@ -9,7 +9,7 @@ CVE_PRODUCT = "tox-dev:filelock"
 
 SRC_URI += "file://run-ptest"
 
-SRC_URI[sha256sum] = "2bde2e4cf732e0153406d8a7bc80620ecf5e621fe0d25e41143c4e3b4733ff30"
+SRC_URI[sha256sum] = "90999ed63a26ccf86b93b959ab10cf1017f422d816be454ed54cbed263e71ab5"
 
 BBCLASSEXTEND = "native nativesdk"
 
@@ -21,6 +21,7 @@ DEPENDS += "\
 
 RDEPENDS:${PN} += " \
     python3-core \
+    python3-crypt \
     python3-logging \
     python3-asyncio \
 "