SA Bugzilla – Bug 4353
whitelist_addrs.t failing on Solaris 10 with NDBM_File
Last modified: 2005-05-23 15:57:43 UTC
it fails the last test, test 5. This appears to be a bug in SDBM_File, or at least its handling on Solaris. I suspect it's not a Solaris-specific bug, just appearing there because I haven't installed DB_File, forcing the AWL to fall back to SDBM. I've instrumented the test with -D and some sleeps to get debugs and a chance to look into the db files, and this is what I see: Skipping to step 4: /local/perl586/bin/perl -T -w ../spamassassin -C log/test_rules_copy --siteconfigpath log/localrules.tmp -p log/test_default.cf -D --add-addr-to-blacklist whitelist_test@whitelist.spamassassin.taint.org ... [19586] dbg: auto-whitelist: tie-ing to DB file R/W in ./log/user_state/auto-whitelist [19586] dbg: auto-whitelist: db-based whitelist_test@whitelist.spamassassin.taint.org|ip=none scores 0/0 [19586] dbg: auto-whitelist: db-based whitelist_test@whitelist.spamassassin.taint.org|ip=none scores 0/0 [19586] dbg: auto-whitelist: add_score: new count: 1, new totscore: 100 [19586] dbg: auto-whitelist: DB addr list: untie-ing and unlocking [19586] dbg: auto-whitelist: DB addr list: file locked, breaking lock [19586] dbg: locker: safe_unlock: unlink ./log/user_state/auto-whitelist.lock If I run '../tools/check_whitelist log/user_state/auto-whitelist' at this stage, I see: 100.0 (100.0/1) -- whitelist_test@whitelist.spamassassin.taint.org|ip=none which is correct. next step: /local/perl586/bin/perl -T -w ../spamassassin -C log/test_rules_copy --siteconfigpath log/localrules.tmp -p log/test_default.cf -D -L < data/nice/002 ... [19588] dbg: auto-whitelist: tie-ing to DB file R/W in ./log/user_state/auto-whitelist [19588] dbg: auto-whitelist: db-based whitelist_test@whitelist.spamassassin.taint.org|ip=212.17 scores 4/0 [19588] dbg: auto-whitelist: AWL active, pre-score: 0, autolearn score: 0, mean: undef, IP: 212.17.35.15 [19588] dbg: auto-whitelist: add_score: new count: 5, new totscore: 0 [19588] dbg: auto-whitelist: DB addr list: untie-ing and unlocking ... check_whitelist says: 0.0 (0.0/5) -- whitelist_test@whitelist.spamassassin.taint.org|ip=212.17 100.0 (100.0/1) -- whitelist_test@whitelist.spamassassin.taint.org|ip=none so it appears it failed to find the "ip=none" entry for some reason.
should be investigated for 3.1.0
actually, it does appear platform-specific -- adding tstprefs (" auto_whitelist_db_modules SDBM_File "); to the whitelist_addrs.t file on linux generates an SDBM db, but does not fail on test 5.
gotcha. It's not an SDBM_File, it's using an NDBM_File on Solaris. removing "NDBM_File" from the attempted list in Plugin/AWL.pm fixes the problem. looks like a bug in NDBM_File, and IMO given this we can't support them, and should remove that module from the attempted list...
Created attachment 2886 [details] fix comments? votes?
I'm personally fine with this, but it will cause anyone who has created an AWL with NDBM_File problems when they upgrade to 3.1.
actually, not a problem -- SDBM is fully compatible! http://www.dss.bc.ca/dx/free_databases/sdbm.html