Назад | Перейти на главную страницу

Сбой Amavis resolve_mail_destiny

После обновления до FreeBSD 12 у меня возникли проблемы с amavis временами.

Причина крушения пока неясна.

Простой kill -9 $amavispid && service amavids start делает свое дело, но через несколько часов все начинается снова.

Это вывод журнала сбоя:

Dec 19 02:51:14 mailserver postfix/pickup[9697]: 75223B166: uid=58 from=<MAILER-DAEMON>
Dec 19 02:51:14 mailserver postfix/pipe[17647]: 7A3F1B162: to=<some.user@example.org>, relay=spamassassin, delay=1.1, delays=0.44/0/0/0.68, dsn=2.0.0, status=sent (delivered via spamassassin service)
Dec 19 02:51:14 mailserver postfix/qmgr[850]: 7A3F1B162: removed
Dec 19 02:51:14 mailserver postfix/cleanup[17644]: 75223B166: message-id=<20181219015108.935034EB31B@emlqa-msgrly001.reyqa.reyrey.net>
Dec 19 02:51:14 mailserver postfix/qmgr[850]: 75223B166: from=<>, size=7592, nrcpt=1 (queue active)
Dec 19 02:51:14 mailserver spamd[758]: prefork: child states: II
Dec 19 02:51:15 mailserver amavis[772]: (00772-07) (!!)TROUBLE in check_mail: decide_mail_destiny FAILED: register_proc: BDB N c_get: BDB0061 PANIC: Invalid argument, No such process. at (eval 93) line 222.
Dec 19 02:51:15 mailserver amavis[772]: (00772-07) (!!)TROUBLE in process_request: register_proc: BDB N db_cursor: BDB0060 PANIC: fatal region error detected; run recovery, . at (eval 93) line 220.
Dec 19 02:51:15 mailserver amavis[772]: (00772-07) (!)Requesting process rundown after fatal error
Dec 19 02:51:15 mailserver amavis[772]: (00772-07) (!)TempDir removal: tempdir is to be PRESERVED: /var/amavis/tmp/amavis-20181218T235619-00772-TJFdgQp3
Dec 19 02:51:15 mailserver amavis[772]: (00772-07) (!)_DIE: register_proc: BDB N db_cursor: BDB0060 PANIC: fatal region error detected; run recovery, . at (eval 93) line 220.
Dec 19 02:51:15 mailserver postfix/lmtp[17651]: 6CB9FB164: to=<some.user@example.org>, relay=127.0.0.1[127.0.0.1]:10024, delay=0.87, delays=0.01/0.01/0/0.85, 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))
Dec 19 02:51:15 mailserver amavis[772]: (00772-07) (!)Amavis::END: DB unregistering failed:
Dec 19 02:51:15 mailserver amavis[17658]: (!!)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 (eval 93) line 338.
Dec 19 02:51:15 mailserver amavis[17658]: (!)_DIE: Suicide 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 (eval 93) line 338.
Dec 19 02:51:15 mailserver amavis[17659]: (!!)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 (eval 93) line 338.
Dec 19 02:51:15 mailserver amavis[17659]: (!)_DIE: Suicide 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 (eval 93) line 338.
Dec 19 02:51:15 mailserver amavis[17660]: (!!)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 (eval 93) line 338.
Dec 19 02:51:15 mailserver amavis[17660]: (!)_DIE: Suicide 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 (eval 93) line 338.
Dec 19 02:51:15 mailserver amavis[17661]: (!!)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 (eval 93) line 338.
Dec 19 02:51:15 mailserver amavis[17661]: (!)_DIE: Suicide 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 (eval 93) line 338.
Dec 19 02:51:15 mailserver amavis[17662]: (!!)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 (eval 93) line 338.
Dec 19 02:51:15 mailserver amavis[17662]: (!)_DIE: Suicide 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 (eval 93) line 338.

Последние строки продолжаются, пока я не убью службу и не спамлю файл журнала.

Опять же, после перезапуска службы все снова в порядке. Системные ресурсы не исчерпаны. Загрузка процессора 0.5, памяти осталось много (~ 20%), диски не заполнены.

Понятия не имею, где искать ...

PS: конечно же меняются имена хостов и домены

РЕДАКТИРОВАТЬ: Просто, если кто-то еще сталкивается с этой проблемой, я нашел обходной путь. Вы можете просто отключить функцию базы данных Berkley, которая кэширует некоторые результаты через $enable_db = 0; Это не решение, а обходной путь!