Bug 11030

Summary: Listen <hostname>: double bind
Product: Apache httpd-2 Reporter: Frodo Looijaard <frodol>
Component: CoreAssignee: Apache HTTPD Bugs Mailing List <bugs>
Status: CLOSED FIXED    
Severity: normal    
Priority: P3    
Version: 2.0.39   
Target Milestone: ---   
Hardware: Sun   
OS: other   
Attachments: Truss log
patch

Description Frodo Looijaard 2002-07-22 08:53:45 UTC
`Listen IPADDR' works fine; `Listen HOSTNAME' not. It seems Apache tries to 
bind twice in this last case, and crashes without even writing something to the 
Errorlog (it seemt to try to write to stderr, though).

See the attached output of `truss -f -a -e -vall -rall -wall bin/apachectl 
start > /tmp/out.txt 2>&1'. Line 1774 and line 2989 try the same bind; the 
second one fails of course.

We use Solaris 2.8 (it also occurred for 2.0.36 in Solaris 
2.6); /etc/nsswitch.conf contains `hosts: files dns' and the problem occurs 
both when the hostname aplux11-a is in /etc/hosts and when it is not (it is 
always in DNS).
Comment 1 Frodo Looijaard 2002-07-22 09:00:38 UTC
Created attachment 2435 [details]
Truss log
Comment 2 David Shane Holden 2002-07-24 03:30:59 UTC
Created attachment 2461 [details]
patch
Comment 3 Jeff Trawick 2002-07-31 12:47:05 UTC
A fix for this was just committed and will be in the next release of Apache.

Thanks for the report, and thanks for using Apache!

Thanks especially to Mr. Holden, whose debugging and initial patch pointed
out the problem.