Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 604678 - mail-filter/amavisd-new broken by >=dev-perl/DBD-mysql-4.40.0
Summary: mail-filter/amavisd-new broken by >=dev-perl/DBD-mysql-4.40.0
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal major (vote)
Assignee: Antivirus Team
URL:
Whiteboard:
Keywords:
Depends on: 611316
Blocks:
  Show dependency tree
 
Reported: 2017-01-04 18:43 UTC by zdenek
Modified: 2019-08-21 20:16 UTC (History)
9 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description zdenek 2017-01-04 18:43:48 UTC
After upgrade to =>dev-perl/DBD-mysql-4.40.0 is not working amavisd-new with MySQL support.
Everything looks great, no error reported but if amavis reads data from SQL table "policy" for datatype float return zero but it is not true.

this is part of values which is returned 
spam_tag_level=>"0", spam_tag2_level=>"0", spam_kill_level=>"0", spam_dsn_cutoff_level=>"0"

but table contains
spam_tag_level=>"6", spam_tag2_level=>"8", spam_kill_level=>"10", spam_dsn_cutoff_level=>"20"

after downgrade to dev-perl/DBD-mysql-4.37.0 works everything fine and its returned correct value (spam_tag_level=>"6", spam_tag2_level=>"8" ....)

using: 
dev-perl/DBI-1.636.0::gentoo  USE="-examples {-test}"
dev-db/mysql-5.6.34:0/18::gentoo  USE="openssl perl server -debug -embedded -extraengine -jemalloc -latin1 (-libressl) -profiling (-selinux) -static -static-libs -systemtap -tcmalloc {-test} -yassl" ABI_X86="(64) -32 (-x32)"
mail-filter/amavisd-new-2.8.1-r1::gentoo  USE="clamav dkim mysql razor snmp spamassassin zmq -courier -ldap -postgres -qmail"

With unstable amavisd-new-2.11.0-r3 same problem.
Comment 1 User3569 2017-01-24 06:24:06 UTC
See these references.

"mysql lookups - messages with score less than 0 are blocked as spam"
https://lists.amavis.org/pipermail/amavis-users/2016-December/004681.html

This might be the commit that caused it [1] [2]
[1] https://lists.amavis.org/pipermail/amavis-users/2017-January/004696.html
[2] https://github.com/perl5-dbi/DBD-mysql/commit/caea0b774028650c0cbd9d8f9c4a0b47831116df
Comment 2 Brian Evans (RETIRED) gentoo-dev 2017-02-03 20:32:09 UTC
This is affecting me as well
Comment 3 Brian Evans (RETIRED) gentoo-dev 2017-02-03 20:38:36 UTC
sorry, shouldn't have added the blocker
Comment 4 Kent Fredric (IRC: kent\n) (RETIRED) gentoo-dev 2017-02-04 18:00:04 UTC
As a temporary fix I've resurrected the old stable versions of DBD-mysql under package.mask, so people who are in a bind can flip the "warranty void" switch by unmasking it. Its not ideal, but some people would prefer working email over theoretical problems with features they're probably not using.
Comment 5 zdenek 2017-02-28 06:55:04 UTC
Problem is solved 
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=856064#27

thanks to all developers
Comment 6 Brian Evans (RETIRED) gentoo-dev 2017-02-28 17:21:32 UTC
(In reply to zdenek from comment #5)
> Problem is solved 
> https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=856064#27
> 
> thanks to all developers

The patch in the bug report was added to https://github.com/perl5-dbi/DBD-mysql.  Looks like a release is pending as well
Comment 7 Brian Evans (RETIRED) gentoo-dev 2017-03-01 17:42:05 UTC
@perl team:

Please bump to DBD-mysql-4.041.2 https://github.com/perl5-dbi/DBD-mysql/releases/tag/4.041_2 to solve this issue
Comment 8 Kent Fredric (IRC: kent\n) (RETIRED) gentoo-dev 2017-03-01 19:37:00 UTC
In the process of bumping, tests exposed:

t/40server_prepare.t .................... 23/31 DBD::mysql::st DESTROY failed: MySQL server has gone away at t/40server_prepare.t line 98.
	(in cleanup) DBD::mysql::st DESTROY failed: MySQL server has gone away at t/40server_prepare.t line 98.
t/40server_prepare.t .................... ok     
t/40server_prepare_crash.t .............. 8/44 
#   Failed test at t/40server_prepare_crash.t line 100.
# Your libmysqlclient.so is vulnerable to CVE 2017-3302 and can crash perl
DBD::mysql::st DESTROY failed: MySQL server has gone away at t/40server_prepare_crash.t line 101.
	(in cleanup) DBD::mysql::st DESTROY failed: MySQL server has gone away at t/40server_prepare_crash.t line 101.
# Looks like you failed 1 test of 44.
t/40server_prepare_crash.t .............. Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/44 subtests 

So blocking on that getting fixed.
Comment 9 Kent Fredric (IRC: kent\n) (RETIRED) gentoo-dev 2017-03-23 11:28:01 UTC
Bumped to 4.42.0, please test and confirm this works.


commit:  6f9e560f5b428f52f50e2cf788dbd6c71b879323
author:  2017-03-23 11:26:30 +0000 Kent Fredric <kentnl@gentoo.org>
commit:  2017-03-23 11:26:49 +0000 Kent Fredric <kentnl@gentoo.org>
gpg-key: E854324B1366A820

    dev-perl/DBD-mysql: Bump to version 4.42.0 re bug #604678

    Upstream:
    - Fix encoding of input statements with mysql_enable_utf8 and
      mysql_enable_utf8mb4
    - Set UTF-8 flag for decoded data
    - Return INTs with ZEROFILL as strings
    - Statement handle how has mysql_sock attribute
    - Fixed type conversions for magic types
    - Fix UTF8 encoding of table/field names and warnings/errors
    - Fix mysql_auto_reconnect with mysql_server_prepare
    - Improve regex for removing database from dsn
    - Locate libmysql with Devel::CheckLib
    - Support async on windows
    - Fix tests against older Mysql/Mariadb
    - Fix compilation with Mysql 4.1
    - Don't leak dangling pointer to mysql result
    - Fix logic assigning to variable bind_comment_placeholders
    - fix mysql_fd returning fd after connection closed.
    - Fix parsing configure libs from mysql_config
    - Fix support for magic scalars
    
    Keywording:
    - New dependencies necessitate dropping:
      ia64 mips ppc64 sparc x86-fbsd
    
    Bug: https://bugs.gentoo.org/604678
    Package-Manager: Portage-2.3.4, Repoman-2.3.2
Comment 10 Brian Evans (RETIRED) gentoo-dev 2017-03-27 16:07:25 UTC
(In reply to Kent Fredric (IRC: kent\n) from comment #9)
> Bumped to 4.42.0, please test and confirm this works.
> 

Works for me
Comment 11 zdenek 2017-04-19 16:17:29 UTC
(In reply to Kent Fredric (IRC: kent\n) from comment #9)
> Bumped to 4.42.0, please test and confirm this works.
> 
> 
> commit:  6f9e560f5b428f52f50e2cf788dbd6c71b879323
> author:  2017-03-23 11:26:30 +0000 Kent Fredric <kentnl@gentoo.org>
> commit:  2017-03-23 11:26:49 +0000 Kent Fredric <kentnl@gentoo.org>
> gpg-key: E854324B1366A820
> 
>     dev-perl/DBD-mysql: Bump to version 4.42.0 re bug #604678
> 
>     Upstream:
>     - Fix encoding of input statements with mysql_enable_utf8 and
>       mysql_enable_utf8mb4
>     - Set UTF-8 flag for decoded data
>     - Return INTs with ZEROFILL as strings
>     - Statement handle how has mysql_sock attribute
>     - Fixed type conversions for magic types
>     - Fix UTF8 encoding of table/field names and warnings/errors
>     - Fix mysql_auto_reconnect with mysql_server_prepare
>     - Improve regex for removing database from dsn
>     - Locate libmysql with Devel::CheckLib
>     - Support async on windows
>     - Fix tests against older Mysql/Mariadb
>     - Fix compilation with Mysql 4.1
>     - Don't leak dangling pointer to mysql result
>     - Fix logic assigning to variable bind_comment_placeholders
>     - fix mysql_fd returning fd after connection closed.
>     - Fix parsing configure libs from mysql_config
>     - Fix support for magic scalars
>     
>     Keywording:
>     - New dependencies necessitate dropping:
>       ia64 mips ppc64 sparc x86-fbsd
>     
>     Bug: https://bugs.gentoo.org/604678
>     Package-Manager: Portage-2.3.4, Repoman-2.3.2

it's ok for me - thanks
Comment 12 Kent Fredric (IRC: kent\n) (RETIRED) gentoo-dev 2017-07-21 21:53:17 UTC
4.42.0 introduced some serious messes that breaks a lot of code ( https://github.com/perl5-dbi/DBD-mysql/issues/117 ), so we've masked 4.42 and instead borrowed debians patch and backported to 4.41.0-r1




commit 7a0bdecc24d03a76129348278503ca00d617322a (HEAD -> kentnl, upstream/master)
Author: Kent Fredric <kentnl@gentoo.org>
Date:   2017-07-22 09:50:15 +1200

    dev-perl/DBD-mysql: -r1 bump for fix for type conversions for amvisd
    
    Earlier versions break type conversions that amvisd uses, and though
    the fix for this landed in 4.42.0, 4.42.0 also introduced a more serious
    change that breaks existing code, and the entire thing was reverted
    for 4.43.0
    
    So this is borrowing debians patch for 4.41.0
    
    Package-Manager: Portage-2.3.6, Repoman-2.3.2
Comment 13 Quincy 2017-07-23 14:59:51 UTC
Backported version works as expected with amavisd-new-2.8.1-r1 (did not update yet). Thanks Kent!
Comment 14 Craig Andrews gentoo-dev 2017-11-16 19:32:07 UTC
It appears that this issue has been fixed - can you please confirm and mark as resolved as appropriate?
Comment 15 Kent Fredric (IRC: kent\n) (RETIRED) gentoo-dev 2018-01-24 05:37:16 UTC
Can you kind people ensure to thoroughly check amvis still works with DBD-mysql-4.44.0

(Especially those of you using MariaDB )

There's some more changes upstream in this sort of department, but its a bit of a nightmare tracing ( bug # 645532 ), and it would be nice to have the assurance that Amvis is not broken by this, so we can eventually properly purge the old DBD-mysql versions.
Comment 16 Michael Orlitzky gentoo-dev 2019-07-08 11:06:54 UTC
(In reply to Kent Fredric (IRC: kent\n) from comment #15)
> Can you kind people ensure to thoroughly check amvis still works with
> DBD-mysql-4.44.0
> 

No one's complained for a year and a half -- close it?
Comment 17 Thomas Raschbacher gentoo-dev 2019-08-21 20:16:51 UTC
agreeing with @mjo there.. no complaints for this long usually mean it is resolved ;)