Re: Bus error in p5-Net-Patricia while starting amavisd

Xavier Humbert <[email protected]>
Newsgroups gmane.os.freebsd.devel.ports
Message-ID <[email protected]>
Le 24/02/2026 15:59, Xavier Humbert a écrit :
> Hi,
>
> Didn't follow the advice "If ain't broken, don't fix it" and regret 
> it. I upgraded Perl from 5.40 to 5.42, following the path recommended 
> in UPDATING:
>
> [root@numenor ports]# portupgrade -vf -o lang/perl5.42 lang/perl5.40
> [root@numenor ports]# portupgrade -vf $(pkg shlib -qR libperl.so.5.40)
>
> Since then amavisd wont start, crashing in p5-Net-Patricia :
>
> [root@numenor ~]# su - vscan
> $ amavisd   -c /usr/local/etc/amavisd.conf foreground
> Caught a SIGBUS at 
> /usr/local/lib/perl5/site_perl/mach/5.42/Net/Patricia.pm line 255
> $ = eval {...} called from file 
> '/usr/local/lib/perl5/site_perl/mach/5.42/Net/Patricia.pm' line 255
> $ = 
> Net::Patricia::AF_INET6::add('Net::Patricia::AF_INET6=SCALAR(0x3e1ff3b38df8)', 
> '::ffff:127.0.0.0', 104, '::ffff:127.0.0.0/104') called from file 
> '/usr/local/lib/perl5/site_perl/mach/5.42/Net/Patricia.pm' line 85
> $ = 
> Net::Patricia::add_string('Net::Patricia::AF_INET6=SCALAR(0x3e1ff3b38df8)', 
> '::ffff:127.0.0.0/104', '::ffff:127.0.0.0/104') called from file 
> '/usr/local/lib/perl5/site_perl/Mail/SpamAssassin/NetSet.pm' line 183
> $ = eval {...} called from file 
> '/usr/local/lib/perl5/site_perl/Mail/SpamAssassin/NetSet.pm' line 182
> $ = 
> Mail::SpamAssassin::NetSet::add_cidr('Mail::SpamAssassin::NetSet=HASH(0x3e1ff3b38ac8)', 
> '127.0.0.0/8') called from file 
> '/usr/local/lib/perl5/site_perl/Mail/SpamAssassin/Conf.pm' line 5551
> $ = 
> Mail::SpamAssassin::Conf::new_netset('Mail::SpamAssassin::Conf=HASH(0x3e1ff3b10ac8)', 
> 'trusted_networks', 1) called from file 
> '/usr/local/lib/perl5/site_perl/Mail/SpamAssassin/Conf.pm' line 5072
> $ = Mail::SpamAssassin::Conf::new('Mail::SpamAssassin::Conf', 
> 'Mail::SpamAssassin=HASH(0x3e1ff3b10210)') called from file 
> '/usr/local/lib/perl5/site_perl/Mail/SpamAssassin.pm' line 428
> $ = Mail::SpamAssassin::new('Mail::SpamAssassin', 
> 'Mail::SpamAssassin=HASH(0x3e1ff3b10210)') called from file 
> '/usr/local/lib/perl5/site_perl/Amavis/SpamControl/SpamAssassin.pm' 
> line 252
> $ = 
> Amavis::SpamControl::SpamAssassin::new_SpamAssassin_instance('Amavis::SpamControl::SpamAssassin=HASH(0x3e1ff1ad2e40)', 
> 1) called from file 
> '/usr/local/lib/perl5/site_perl/Amavis/SpamControl/SpamAssassin.pm' 
> line 331
> $ = 
> Amavis::SpamControl::SpamAssassin::init_pre_fork('Amavis::SpamControl::SpamAssassin=HASH(0x3e1ff1ad2e40)') 
> called from file 
> '/usr/local/lib/perl5/site_perl/Amavis/SpamControl.pm' line 74
> $ = 
> Amavis::SpamControl::init_pre_fork('Amavis::SpamControl=HASH(0x3e1ff19d6a68)') 
> called from file '/usr/local/lib/perl5/site_perl/Amavis.pm' line 1134
> $ = eval {...} called from file 
> '/usr/local/lib/perl5/site_perl/Amavis.pm' line 1151
> $ = Amavis::pre_loop_hook('Amavis=HASH(0x3e1fed099fa8)') called from 
> file '/usr/local/lib/perl5/site_perl/Net/Server.pm' line 57
> $ = Net::Server::run('Amavis=HASH(0x3e1fed099fa8)') called from file 
> '/usr/local/lib/perl5/site_perl/Amavis.pm' line 7752
> $ = Amavis::main() called from file '/usr/local/sbin/amavisd' line 75
> Abort trap (core dumped)
>
> The function where it crashes is :
>
> sub add {
>   croak "add: wrong number of args" if (@_ < 2 || @_ > 4);
>   my ($self, $ip, $bits, $data) = @_;
>   $data = (defined $bits ? "$ip/$bits" : $ip) if (@_ < 3);
>   my $packed = inet_pton(AF_INET6, $ip);
>   croak("invalid key") unless (defined $packed);
>   $bits = 128 if (@_ < 4);
>   $self->SUPER::_add(AF_INET6, $packed, $bits, $data); <====== HERE
> }
>
> I already reinstalled Perl5.42 ans shlib dependencies, with no success.
>
> My interfaces are properly configured for ipv6 :
>
> lo0: flags=1008049<UP,LOOPBACK,RUNNING,MULTICAST,LOWER_UP> metric 0 
> mtu 16384
>  options=680003<RXCSUM,TXCSUM,LINKSTATE,RXCSUM_IPV6,TXCSUM_IPV6>
>         inet 127.0.0.1 netmask 0xff000000
>         inet6 ::1 prefixlen 128
>         inet6 fe80::1%lo0 prefixlen 64 scopeid 0x5
>         groups: lo
>         nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
> igb0: 
> flags=1008943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST,LOWER_UP> 
> metric 0 mtu 1500
> options=4a520b9<RXCSUM,VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,VLAN_HWCSUM,WOL_MAGIC,VLAN_HWFILTER,VLAN_HWTSO,RXCSUM_IPV6,HWSTATS,MEXTPG> 
>
>         ether d0:50:99:c1:12:79
>         inet 192.168.100.144 netmask 0xffffff00 broadcast 192.168.100.255
>         inet6 fe80::d250:99ff:fec1:1279%igb0 prefixlen 64 scopeid 0x1
>         inet6 2a01:xxxx:xxxx:xxxx::144 prefixlen 64
>         media: Ethernet autoselect (1000baseT <full-duplex>)
>         status: active
>         nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
>
> Regards,
>
> Xavier
>
Hi,

I finally downgraded Perl from 5.42 to 5.40, then rebuild dependencies

portupgrade -vf $(pkg shlib -qR libperl.so.5.42)

Then amavisd starts up again normally.

# su - vscan
$ amavisd   -c /usr/local/etc/amavisd.conf debug
All is OK

Still remains a mystery

Xavier

-- 
Xavier HUMBERT - Unix/Win/MacOSX Sysadmin/Network Engineer
https://www.amdh.fr
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.