Package: zict
Severity: wishlist
Tags: patch
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu mantic ubuntu-patch
X-Debbugs-Cc: vladimir.pe...@canonical.com

Dear Maintainer,

 test_stress_different_keys_threadsafe hangs in autopkgtest on ppc64el. This
issue was fixed upstream[1] and added as a patch in Ubuntu.

In Ubuntu, the attached patch was applied to achieve the following:
  * Prevent test timeout on a single CPU (LP: #2033759).


Thanks for considering the patch.

[1]
https://github.com/dask/zict/commit/b142286c09bddd27cba29e0cfb968cfc0ed54233


-- System Information:
Debian Release: bookworm/sid
  APT prefers lunar-updates
  APT policy: (500, 'lunar-updates'), (500, 'lunar-security'), (500, 'lunar'), 
(100, 'lunar-backports')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 6.2.0-34-generic (SMP w/32 CPU threads; PREEMPT)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE, 
TAINT_UNSIGNED_MODULE
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
diff -Nru zict-3.0.0/debian/patches/prevent_test_timeout_on_single_cpu.patch 
zict-3.0.0/debian/patches/prevent_test_timeout_on_single_cpu.patch
--- zict-3.0.0/debian/patches/prevent_test_timeout_on_single_cpu.patch  
1970-01-01 12:00:00.000000000 +1200
+++ zict-3.0.0/debian/patches/prevent_test_timeout_on_single_cpu.patch  
2023-10-02 11:54:38.000000000 +1300
@@ -0,0 +1,20 @@
+Description: Prevent test timeout on a single CPU
+ When running on a single CPU (`taskset -c 0 pytest`), multitasking can
+ misbehave and almost completely starve one of the two threads
+Origin: upstream, 
https://github.com/dask/zict/pull/108/commits/17a36dc68964c0f91c2d0fc0e7b8c6dc686251ca
+Bug: https://github.com/dask/zict/pull/108
+Bug-Ubuntu: https://launchpad.net/bugs/2033759
+Last-Update: 2023-10-02
+--- a/zict/tests/utils_test.py
++++ b/zict/tests/utils_test.py
+@@ -169,7 +169,9 @@
+ 
+     def worker(idx, key, value):
+         barrier.wait()
+-        while any(c < 10 for c in counters):
++        # When running on a single CPU (`taskset -c 0 pytest`), multitasking 
can
++        # misbehave and almost completely starve one of the two threads
++        while any(c < 10 for c in counters) and all(c < 1000 for c in 
counters):
+             z[key] = value
+             try:
+                 assert z[key] == value
diff -Nru zict-3.0.0/debian/patches/series zict-3.0.0/debian/patches/series
--- zict-3.0.0/debian/patches/series    2023-07-30 17:09:00.000000000 +1200
+++ zict-3.0.0/debian/patches/series    2023-10-02 11:54:38.000000000 +1300
@@ -1 +1,2 @@
 update-pytest-markers.patch
+prevent_test_timeout_on_single_cpu.patch

Reply via email to