Your message dated Tue, 22 Sep 2026 14:50:04 +0000
with message-id <[email protected]>
and subject line Bug#1148450: fixed in jellyfish 2.3.1-7
has caused the Debian Bug report #1148450,
regarding jellyfish: FTBFS against python 3.15rc2
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
1148450: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1148450
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: src:jellyfish
Version: 2.3.1-6
User: [email protected]
Usertags: python3.15-default
Tags: patch, ftbfs, forky, sid
Severity: important

Hi!

While rebuilding the python related packages against the Python 3.15rc2
as the default version we found that jellyfish fails to build from
source [1].
This is the error:

AIL: test_add (__main__.TestHashCounter.test_add)
Traceback (most recent call last):
  File 
"/build/reproducible-path/jellyfish-2.3.1/swig/python/test_hash_counter.py", 
line 43, in test_add
    self.assertTrue(good)
AssertionError: False is not true

This failure is only present in arm64, and it happens when adding a
value that is an exact multiple of 2^val_len (where lower bits are 0),
an overflow on the large-value carry produced carry_shift == v. This
caused hash_counter::add to incorrectly assume the key was never
claimed, resulting in false duplicate detection (is_new = false) and
duplicate additions after size doubling.

I've created a patch that explicitly tracks whether the key was
claimed/found in large_hash_array instead of guessing via carry_shift ==
v. And I've also added a regression test. I've sent this patch upstream
as PR#214

I've applied this fix in the sandbox [3] to verify that it builds
successfully, please consider applying the patch to support the upcoming
3.15 version.

Setting the severity to important for now. Once Python 3.15 becomes the
default Python version this bug will become release critical.

Happy hacking,

[1]: https://debusine.debian.net/debian/r-python-python3.15/artifact/4704166/
[2]: https://github.com/gmarcais/Jellyfish/pull/214
[3]: https://debusine.debian.net/debian/r-python-python3.15/

--
"Can you imagine what I would do if I could do all I can?" -- Sun Tzu
Saludos /\/\ /\ >< `/
Description: Fix key claim tracking during hash resizing on carry overflow
 When a value is a multiple of 2^val_len and overflows to carry during insertion,
 carry_shift equals the original value even though the key was claimed and its
 lower bits stored. Track key claim status explicitly to prevent duplicate adds
 and incorrect is_new return values after table resizing.
Author: Maximiliano Curia <[email protected]>
Forwarded: no

Index: jellyfish/include/jellyfish/hash_counter.hpp
===================================================================
--- jellyfish.orig/include/jellyfish/hash_counter.hpp
+++ jellyfish/include/jellyfish/hash_counter.hpp
@@ -97,16 +97,17 @@ public:
 
     //    while(!ary_->add(k, v, &carry_shift, is_new_ptr, id_ptr)) {
     while(true) {
-      if(ary_->add(k, v, &carry_shift, is_new_ptr, id_ptr)) break;
+      bool key_claimed = false;
+      if(ary_->add(k, v, &carry_shift, is_new_ptr, id_ptr, &key_claimed)) break;
       handle_full_ary();
 
-      // If carry_shift == v, failed to allocate the first field for
+      // If !key_claimed, failed to allocate the first field for
       // key, hence status of is_new and value for id are not
-      // determined yet. On the other hand, if carry_shift < v, we
+      // determined yet. On the other hand, if key_claimed is true, we
       // failed while adding extra field for large key, so the status
       // of is_new and value of id are known. We do not update them in future
       // calls.
-      if(carry_shift != v) {
+      if(key_claimed) {
         is_new_ptr = &is_new_void;
         id_ptr     = &id_void;
         v          = carry_shift;
@@ -156,9 +157,10 @@ public:
     uint64_t carry_shift = 0;
 
     while(true) {
-      if(ary_->update_add(k, v, &carry_shift, tmp_key))
+      bool key_found = false;
+      if(ary_->update_add(k, v, &carry_shift, tmp_key, &key_found))
         return true;
-      if(carry_shift == v)
+      if(!key_found)
         return false;
       handle_full_ary();
       v = carry_shift;
Index: jellyfish/include/jellyfish/large_hash_array.hpp
===================================================================
--- jellyfish.orig/include/jellyfish/large_hash_array.hpp
+++ jellyfish/include/jellyfish/large_hash_array.hpp
@@ -288,10 +288,11 @@ public:
    * proper size doubling is perform, one need to call add again with
    * val set to carry_shift.
    */
-  inline bool add(const key_type& key, mapped_type val, word* carry_shift, bool* is_new, size_t* id) {
+  inline bool add(const key_type& key, mapped_type val, word* carry_shift, bool* is_new, size_t* id, bool* key_claimed = 0) {
     uint64_t hash = hash_matrix_.times(key);
     *carry_shift  = 0;
-    return add_rec(hash & size_mask_, key, val, false, is_new, id, carry_shift);
+    if(key_claimed) *key_claimed = false;
+    return add_rec(hash & size_mask_, key, val, false, is_new, id, carry_shift, key_claimed);
   }
 
   inline bool add(const key_type& key, mapped_type val, word* carry_shift) {
@@ -332,12 +333,14 @@ public:
 
 
   // Optimization. Use tmp_key as buffer. Avoids allocation if update_add is called repeatedly.
-  bool update_add(const key_type& key, mapped_type val, word* carry_shift, key_type& tmp_key) {
+  bool update_add(const key_type& key, mapped_type val, word* carry_shift, key_type& tmp_key, bool* key_found = 0) {
     size_t          id;
     word*           w;
     const offset_t* o;
 
+    if(key_found) *key_found = false;
     if(get_key_id(key, &id, tmp_key, (const word**)&w, &o)) {
+      if(key_found) *key_found = true;
       *carry_shift = 0;
       return add_rec_at(id, key, val, o, w, carry_shift);
     } else {
@@ -654,24 +657,27 @@ public:
   // carry_shift is properly set to the value of the carry shifted by
   // the right number of bits so a further call to add with
   // carry_shift as val finishes the operation.
-  bool add_rec(size_t id, const key_type& key, word val, bool large, bool* is_new, size_t* eid, word* carry_shift) {
+  bool add_rec(size_t id, const key_type& key, word val, bool large, bool* is_new, size_t* eid, word* carry_shift, bool* key_claimed = 0) {
     const offset_t *ao = 0;
     word	   *w  = 0;
 
     bool claimed = false;
     if(large)
       claimed = claim_large_key(&id, &ao, &w);
-    else
+    else {
       claimed = claim_key(key, is_new, &id, &ao, &w);
+      if(claimed && key_claimed)
+        *key_claimed = true;
+    }
     if(!claimed) {
       *carry_shift = val << (*carry_shift);
       return false;
     }
     *eid = id;
-    return add_rec_at(id, key, val, ao, w, carry_shift);
+    return add_rec_at(id, key, val, ao, w, carry_shift, key_claimed);
   }
 
-  bool add_rec_at(size_t id, const key_type& key, word val, const offset_t* ao, word* w, word* carry_shift) {
+  bool add_rec_at(size_t id, const key_type& key, word val, const offset_t* ao, word* w, word* carry_shift, bool* key_claimed = 0) {
     // Increment value
     word *vw       = w + ao->val.woff;
     word  cary     = add_val(vw, val, ao->val.boff, ao->val.mask1);
@@ -690,7 +696,7 @@ public:
     id = (id + reprobes_[0]) & size_mask_;
     size_t ignore_eid;
     bool   ignore_is_new;
-    return add_rec(id, key, cary, true, &ignore_is_new, &ignore_eid, carry_shift);
+    return add_rec(id, key, cary, true, &ignore_is_new, &ignore_eid, carry_shift, key_claimed);
 
       // // Adding failed, table is full. Need to back-track and
       // // substract val.

--- End Message ---
--- Begin Message ---
Source: jellyfish
Source-Version: 2.3.1-7
Done: Andreas Tille <[email protected]>

We believe that the bug you reported is fixed in the latest version of
jellyfish, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Andreas Tille <[email protected]> (supplier of updated jellyfish package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Tue, 22 Sep 2026 16:22:58 +0200
Source: jellyfish
Architecture: source
Version: 2.3.1-7
Distribution: unstable
Urgency: medium
Maintainer: Debian Med Packaging Team 
<[email protected]>
Changed-By: Andreas Tille <[email protected]>
Closes: 1105388 1148450
Changes:
 jellyfish (2.3.1-7) unstable; urgency=medium
 .
   [ Maximiliano Curia ]
   * Fix key claim tracking during hash resizing on carry overflow
     Closes: #1148450
 .
   [ Andreas Tille ]
   * Standards-Version: 4.7.4 (routine-update)
   * Reflow Uploaders field (cme)
   * Remove Priority field (cme)
   * Apply multi-arch hints.
     + libjellyfish-2.0-dev: Add Multi-Arch: same.
   * Fix FTBFS with make --shuffle=reverse
     Closes: #1105388
Checksums-Sha1:
 dc5f1a20a296aef9544c2a55d29bb0ec0eb9c77c 2759 jellyfish_2.3.1-7.dsc
 1f8d2114a1333a83911d5568a23a9d849ace4f7c 15564 jellyfish_2.3.1-7.debian.tar.xz
 8a0d9b69d46bd7a66de29e84d8c6479f2c37aa08 12306 
jellyfish_2.3.1-7_amd64.buildinfo
Checksums-Sha256:
 333139c0f31a8b548e6880880eb188f4bb976c4f09f6feef6cdb22d8993a45e5 2759 
jellyfish_2.3.1-7.dsc
 5d8f125bba8ecff92c4ca8a740f34c0e9583cdb5c5c1eb41b495422a95ec2e82 15564 
jellyfish_2.3.1-7.debian.tar.xz
 92117a3d4955394eef43a1b730a8a43d62282fab07b42e46c2c1e5c32b9f48e9 12306 
jellyfish_2.3.1-7_amd64.buildinfo
Files:
 2106d524a65ddf2ebea0f7413df7616f 2759 science optional jellyfish_2.3.1-7.dsc
 96186d916ab051123ea1be85771b843d 15564 science optional 
jellyfish_2.3.1-7.debian.tar.xz
 5ebd1ffc62c6d63b54a8f02dea60a8a0 12306 science optional 
jellyfish_2.3.1-7_amd64.buildinfo

-----BEGIN PGP SIGNATURE-----

iQJFBAEBCgAvFiEE8fAHMgoDVUHwpmPKV4oElNHGRtEFAmqykSgRHHRpbGxlQGRl
Ymlhbi5vcmcACgkQV4oElNHGRtHZdQ/9HYCbRcjoD7vSXx8M4SasfGrYdu3E8Aju
HUoxl01jMQrOR3bYF7Diiybb4AYTMvgW7q3RLUeV47ZjlsGQDd3a485ufevw9SAP
30oNQAuQVrwBumkP5K+NVt2I9xfMx1Qj1fVkdwJSdo94yzHGvlesSbR13PADjGpm
DHbmuabdsWDwx67b2EdbEphLmttjzh7U6/5e1n8mA6WPVwaJbk5RQc9NVP06jTqu
ukWG2EJt12kIl7+BGDAJ4bqHhSq8kFUpMG7NGykCr+6Cpp8zBO1EiLUwqBSIyuTy
/fIvyEgJpbRvY2MJiGLsVRgbV+3Te67OdCm570qYAJ8Lmyrv/OxsjI4oBmfjztBb
aNDcpvY1DyxmJapSRud28P0pPMZktckH0Qvc7QaoeoPfQaIE0JlTJ6i36ZYNWiVU
Pp4qSnn61JtgsAk0RhvaNyFuLYP382WU/86070JvBqFTkmGWhRl0bKTCcrs1MZwX
0Chut/6XCKLUDL7f2rHiIvXauVJzFyWVAk4mxZaEmEgxdMQkdsZCN+FVPlb6s/uF
4xMaJW7Opa86yYR8fEbYZQX2ajLJnDCxj0SN0VV7RGI8HMI1BdVCGz2GpC1/XeIF
J41PzLSRrwDKIu1Z35LHNHDYbyswdHkJIa3v9u+E/hn0hKywCCERqtHy3UtJb4bz
DPmbS13wPzE=
=SZ5I
-----END PGP SIGNATURE-----

Attachment: pgpW5rHOyY4R8.pgp
Description: PGP signature


--- End Message ---

Reply via email to