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 because: 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 state. 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: Path: news.interact.net.au!news.can.connect.com.au!news.mel.connect.com.au!news- spur1.maxwell.syr.edu!news.maxwell.syr.edu!sunqbc.risq.qc.ca!wesley.videotron.ne t!Pollux.Teleglobe.net!newsfeed.embratel.net.br!news!benjr.elo.com.br From: Benedicto Jr <benjr.br> Newsgroups: comp.mail.sendmail Subject: Sendmail and Aliases Problem Date: Wed, 24 Nov 1999 08:33:49 -0200 Organization: EMBRATEL, Brazil Lines: 35 Message-ID: <383BBF0D.BACDB622.br>
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 in sendmail.cf