Red Hat Bugzilla – Bug 7311
newaliases hangs occasionally with large numbers of aliases
Last modified: 2008-05-01 11:37:53 EDT
We run a site with a large number of aliases (the machine is also fairly
busy with POP and user homepages as well). We add/modify the /etc/aliases
file about 20-30 times a day via an automated process and find that every
so often newaliases will hang and lock /etc/aliases.db. This is bad
1) no more aliases modifications can take place
2) sendmail hangs because /etc/aliases.db is locked (it accepts new
sessions but waits for aliases.db to become available again). The sendmail
daemon spawns more and more processes but cannot complete them, eventually
the machine runs out of memory/processes and crashes.
There are no obvious errors, the only real error is if you try to run
newaliases whilst the aliases.db is locked you get a message saying that it
is locked and probably being rebuilt.
The only work around I have is to killall -9 sendmail and restart sendmail.
You can't kill newaliases otherwise it leaves the aliases.db in a locked
There are 6000 aliases in the /etc/aliases file.
I'm not sure whether this is a bug with the kernel, sendmail or glibc.
I'm not alone with this problem, I also found this which describes the identical
problem we have:
From: Benedicto Jr <email@example.com>
Subject: Sendmail and Aliases Problem
Date: Wed, 24 Nov 1999 08:33:49 -0200
Organization: EMBRATEL, Brazil
This is probably a race confdition between multiple sendmails that are trying to
update the aliases at the same time. Turn off the automatic rebvuild of aliases