You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@spamassassin.apache.org by bu...@spamassassin.apache.org on 2024/04/14 16:43:38 UTC

[Bug 8237] New: TxRep/AWL failure using GDBM_File storage

https://bz.apache.org/SpamAssassin/show_bug.cgi?id=8237

            Bug ID: 8237
           Summary: TxRep/AWL failure using GDBM_File storage
           Product: Spamassassin
           Version: 4.0.1
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Libraries
          Assignee: dev@spamassassin.apache.org
          Reporter: sidney@sidney.com
  Target Milestone: Undefined

This bug can be reproduced by editing t/sa_txrep.t to add this line to the
tstprefs

  autowelcome_list_db_modules GDBM_File

That breaks the test. I tracked it down to a bug in the remove_entry function
in DBBasedAddrList.pm where the keys are deleted in a loop that starts with

  while (my ($key, $value) = each %{$self->{accum}}) {

According to the perldoc https://perldoc.perl.org/functions/each after
explaining that the code we use is safe to use with hashes as an explicit
exception to the ordering behaviour rule against deleting elements of a hash in
an each loop, it goes on to say

"Tied hashes may have a different ordering behaviour to perl's hash
implementation."

And apparently DB_File and SDBM_File don't break when we do that, but GDBM_File
does.

I'm testing a patch now and will upload it soon.

Unfortunately, this does not explain bug 8236 as the SQL code does not use tied
hashes.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 8237] TxRep/AWL failure using GDBM_File storage

Posted by bu...@spamassassin.apache.org.
https://bz.apache.org/SpamAssassin/show_bug.cgi?id=8237

Sidney Markowitz <si...@sidney.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|NEW                         |RESOLVED

--- Comment #2 from Sidney Markowitz <si...@sidney.com> ---
 % svn ci -m "bug 8237 - properly delete elements of tied hash" 
lib/Mail/SpamAssassin/DBBasedAddrList.pm
Sending        lib/Mail/SpamAssassin/DBBasedAddrList.pm
Transmitting file data .done
Committing transaction...
Committed revision 1916986.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 8237] TxRep/AWL failure using GDBM_File storage

Posted by bu...@spamassassin.apache.org.
https://bz.apache.org/SpamAssassin/show_bug.cgi?id=8237

Sidney Markowitz <si...@sidney.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|Undefined                   |4.0.2
                 CC|                            |sidney@sidney.com

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 8237] TxRep/AWL failure using GDBM_File storage

Posted by bu...@spamassassin.apache.org.
https://bz.apache.org/SpamAssassin/show_bug.cgi?id=8237

--- Comment #1 from Sidney Markowitz <si...@sidney.com> ---
(In reply to Sidney Markowitz from comment #0)
>   autowelcome_list_db_modules GDBM_File

That's a typo, use auto_welcomelist_db_modules GDBM_File to test this bug

-- 
You are receiving this mail because:
You are the assignee for the bug.