Looking for help with "runaway" amavis

ImaUser1 at walkerclan.us ImaUser1 at walkerclan.us
Sun Oct 5 00:42:02 CEST 2025


Greetings -

I have migrated my Email server from an *old* OSX Server environment to 
the following:

FreeBSD 14.3-RELEASE-p3
postfix-3.10.3,1
amavisd-new-2.13.1,1

Things looked good until this morning.  I found the mail log file being 
filled with error messages from amavis.  Here is an excerpt:

Oct  4 04:52:26 franklin amavis[9876]: (09876-07) (!!)TROUBLE in 
process_request: register_proc: BDB N c_get: BDB0061 PANIC: Invalid 
argument, No such process. at 
/usr/local/lib/perl5/site_perl/Amavis/DB/SNMP.pm line 224.
Oct  4 04:52:26 franklin amavis[9876]: (09876-07) (!)Requesting process 
rundown after fatal error
Oct  4 04:52:26 franklin amavis[9876]: (09876-07) (!)TempDir removal: 
tempdir is to be PRESERVED: 
/var/amavis/tmp/amavis-20251004T030127-09876-RFXadT_r
Oct  4 04:52:26 franklin amavis[9876]: (09876-07) (!)Amavis::END: DB 
unregistering failed:
Oct  4 04:52:26 franklin postfix/smtp[10895]: 1C942D7977: 
to=<redacted at walkerclan.us>, relay=127.0.0.1[127.0.0.1]:10024, 
delay=0.12, delays=0.02/0.03/0.01/0.06, dsn=4.3.2, status=deferred (host 
127.0.0.1[127.0.0.1] said: 421 4.3.2 Service shutting down, closing 
channel (in reply to end of DATA command))
Oct  4 04:52:26 franklin amavis[10897]: (!!)TROUBLE in child_init_hook: 
BDB can't connect db env. at /var/amavis/db: BDB0087 DB_RUNRECOVERY: 
Fatal error, run database recovery, No such file or directory. at 
/usr/local/lib/perl5/site_perl/Amavis/DB.pm line 82.
Oct  4 04:52:26 franklin amavis[10898]: (!!)TROUBLE in child_init_hook: 
BDB can't connect db env. at /var/amavis/db: BDB0087 DB_RUNRECOVERY: 
Fatal error, run database recovery, No such file or directory. at 
/usr/local/lib/perl5/site_perl/Amavis/DB.pm line 82.

The last line was repeating at about six errors per second, with an 
incrementing PID.  It had been doing this for over 3.5 hours I rebooted 
the server, and this fixed the problem for a short while.  It began 
failing with the same symptom about 30 minutes later.  The cause was 
different, as shown by this excerpt:

Oct  4 09:24:54 franklin amavis[784]: (00784-11-3) Passed BAD-HEADER-4 
{RelayedInbound,Quarantined}, [198.137.202.133]:37386 [198.137.202.133] 
<lede-commits-bounces+redacted=walkerclan.us at lists.infradead.org> -> 
<redacted at walkerclan.us>, quarantine: badh-sIdXbs0a5POA, Queue-ID: 
F1584D79BC, Message-ID: 
<mailman.10522.1759587644.2093109.lede-commits at lists.infradead.org>, 
mail_id: sIdXbs0a5POA, Hits: -3.94, size: 7230, queued_as: 9DF49D7993, 
dkim_sd=bombadil.20210309:lists.infradead.org, 771 ms
Oct  4 09:24:56 franklin amavis[784]: (00784-11-3) (!)Amavis::END: DB 
unregistering failed:
Oct  4 09:24:56 franklin amavis[1420]: (!!)TROUBLE in child_init_hook: 
BDB can't connect db env. at /var/amavis/db: BDB0087 DB_RUNRECOVERY: 
Fatal error, run database recovery, No such file or directory. at 
/usr/local/lib/perl5/site_perl/Amavis/DB.pm line 82.
Oct  4 09:24:57 franklin amavis[1421]: (!!)TROUBLE in child_init_hook: 
BDB can't connect db env. at /var/amavis/db: BDB0087 DB_RUNRECOVERY: 
Fatal error, run database recovery, No such file or directory. at 
/usr/local/lib/perl5/site_perl/Amavis/DB.pm line 82.

This time I tried to simply restart amavis.  I was able to stop it, but 
the restart failed saying that the socket (port 10024) was in use.  
Rebooting the server worked, and the system has been stable for the last 
4 hours.

I have several questions related to this failure ...

1) I am surprised that amavisd-new doesn't recover from this failure.  
It seems like the master process might detect the recurring failure and 
restart.  Is there something I can change in amavis that will improve this?

2) Given the error messages in the two excerpts, are there any hints on 
what might have caused this?

3) Is there a better way to restart things?  For example, restarting 
postfix and then amavis?

Thanks in advance,
     Paul



More information about the amavis-users mailing list