Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.

Bug 7311

Summary: newaliases hangs occasionally with large numbers of aliases
Product: [Retired] Red Hat Linux Reporter: tom
Component: sendmailAssignee: Cristian Gafton <gafton>
Status: CLOSED WORKSFORME QA Contact:
Severity: high Docs Contact:
Priority: medium    
Version: 6.1   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2000-02-17 22:41:33 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description tom 1999-11-24 23:45:09 UTC
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.

Comment 1 tom 1999-11-25 00:01:59 UTC
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@elo.com.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@elo.com.br>

Comment 2 Cristian Gafton 2000-02-17 22:41:59 UTC
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