On 5 Feb 2002 [EMAIL PROTECTED] wrote: > Index: listen.c > =================================================================== > RCS file: /home/cvs/httpd-2.0/server/listen.c,v > retrieving revision 1.69 > retrieving revision 1.70 > diff -u -r1.69 -r1.70 > --- listen.c 4 Feb 2002 16:58:54 -0000 1.69 > +++ listen.c 5 Feb 2002 06:16:04 -0000 1.70 > @@ -89,15 +89,6 @@ > int one = 1; > apr_status_t stat; > > - stat = apr_setsocketopt(s, APR_SO_REUSEADDR, one); > - if (stat != APR_SUCCESS && stat != APR_ENOTIMPL) { > - ap_log_perror(APLOG_MARK, APLOG_CRIT, stat, p, > - "make_sock: for address %pI, setsockopt: (SO_REUSEADDR)", > - server->bind_addr); > - apr_socket_close(s); > - return stat; > - } > - > stat = apr_setsocketopt(s, APR_SO_KEEPALIVE, one); > if (stat != APR_SUCCESS && stat != APR_ENOTIMPL) { > ap_log_perror(APLOG_MARK, APLOG_CRIT, stat, p, >
This appears to have broken shutdowns on Unix. Prior to this patch, httpd-test will do this: root@deepthought:/root/apache/httpd-test/perl-framework# t/TEST setting ulimit to allow core files ulimit -c unlimited; t/TEST /root/apache/test/bin/httpd -d /root/apache/httpd-test-6/perl-framework/t -f /root/apache/httpd-test-6/perl-framework/t/conf/httpd.conf -DAPACHE2 using Apache/2.0.32-dev (worker MPM) waiting for server to start: ok (waited 0 secs) server localhost:8529 started server localhost:8530 listening (mod_ssl) server localhost:8531 listening (mod_headers) server localhost:8532 listening (mod_echo) server localhost:8533 listening (mod_echo_ssl) server localhost:8534 listening (mod_proxy) server localhost:8535 listening (mod_vhost_alias) server localhost:8536 listening (mod_nntp_like) server localhost:8537 listening (mod_nntp_like_ssl) apache/404..........ok apache/byterange....ok 33/92^C halting tests server localhost:8529 shutdown root@deepthought:/root/apache/httpd-test/perl-framework# No problem. But after this patch, this happens: root@deepthought:/root/apache/httpd-test/perl-framework# t/TEST setting ulimit to allow core files ulimit -c unlimited; t/TEST /root/apache/test/bin/httpd -d /root/apache/httpd-test-6/perl-framework/t -f /root/apache/httpd-test-6/perl-framework/t/conf/httpd.conf -DAPACHE2 using Apache/2.0.32-dev (worker MPM) waiting for server to start: ok (waited 1 secs) server localhost:8529 started server localhost:8530 listening (mod_ssl) server localhost:8531 listening (mod_headers) server localhost:8532 listening (mod_echo) server localhost:8533 listening (mod_echo_ssl) server localhost:8534 listening (mod_proxy) server localhost:8535 listening (mod_vhost_alias) server localhost:8536 listening (mod_nntp_like) server localhost:8537 listening (mod_nntp_like_ssl) apache/404..........ok apache/byterange....ok apache/etags........ok apache/getfile......^C halting tests server localhost:8529 shutdown port 8529 still in use... ......... server was shutdown but port 8529 is still in use, please shutdown the service using this port or select another port for the tests port 8529 is in use, cannot determine server pid to shutdown [so we check the ps listing:] root@deepthought:/root/apache/httpd-test/perl-framework# ps -afx |grep httpd 11453 pts/2 S 0:00 | \_ grep httpd [notice no instances of httpd still running... so we check netstat] root@deepthought:/root/apache/httpd-test/perl-framework# netstat -an Active Internet connections (servers and established) Proto Recv-Q Send-Q Local Address Foreign Address State tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN tcp 0 0 0.0.0.0:6000 0.0.0.0:* LISTEN tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN tcp 0 0 0.0.0.0:631 0.0.0.0:* LISTEN tcp 0 0 127.0.0.1:8529 127.0.0.1:59297 TIME_WAIT tcp 0 0 127.0.0.1:8529 127.0.0.1:59553 TIME_WAIT tcp 0 0 127.0.0.1:8529 127.0.0.1:59361 TIME_WAIT tcp 0 0 127.0.0.1:8529 127.0.0.1:59617 TIME_WAIT tcp 0 0 127.0.0.1:8529 127.0.0.1:59681 TIME_WAIT tcp 0 0 127.0.0.1:8529 127.0.0.1:59425 TIME_WAIT tcp 0 0 127.0.0.1:8529 127.0.0.1:59233 TIME_WAIT tcp 0 0 127.0.0.1:8529 127.0.0.1:59489 TIME_WAIT tcp 0 0 127.0.0.1:8529 127.0.0.1:59296 TIME_WAIT tcp 0 0 127.0.0.1:8529 127.0.0.1:59552 TIME_WAIT tcp 0 0 127.0.0.1:8529 127.0.0.1:59360 TIME_WAIT tcp 0 0 127.0.0.1:8529 127.0.0.1:59616 TIME_WAIT tcp 0 0 127.0.0.1:8529 127.0.0.1:59424 TIME_WAIT tcp 0 0 127.0.0.1:8529 127.0.0.1:59680 TIME_WAIT tcp 0 0 127.0.0.1:8529 127.0.0.1:59232 TIME_WAIT tcp 0 0 127.0.0.1:8529 127.0.0.1:59488 TIME_WAIT tcp 0 0 127.0.0.1:8529 127.0.0.1:59299 TIME_WAIT tcp 0 0 127.0.0.1:8529 127.0.0.1:59555 TIME_WAIT tcp 0 0 127.0.0.1:8529 127.0.0.1:59363 TIME_WAIT [snip] Lots of connections left in TIME_WAIT. --Cliff -------------------------------------------------------------- Cliff Woolley [EMAIL PROTECTED] Charlottesville, VA