Subject: port-sparc/20002: System freeze with Apache + VirtualHost + reverse proxy
To: None <gnats-bugs@gnats.netbsd.org>
From: None <al@alpage.org>
List: netbsd-bugs
Date: 01/22/2003 22:58:00
>Number:         20002
>Category:       port-sparc
>Synopsis:       System freeze with Apache + VirtualHost + reverse proxy
>Confidential:   no
>Severity:       critical
>Priority:       low
>Responsible:    port-sparc-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Jan 22 13:59:00 PST 2003
>Closed-Date:
>Last-Modified:
>Originator:     
>Release:        NetBSD 1.6_STABLE 5 Jan
>Organization:
Rhizome Industrie
>Environment:
System: NetBSD nus 1.6_STABLE NetBSD 1.6_STABLE (MYKERNEL) #1: Sun Jan 5 00:07:06 CET 2003 root@nus:/usr/src/sys/arch/sparc/compile/MYKERNEL sparc
Architecture: sparc
Machine: SparcStation 5
>Description:
When I configure Apache with a reverse proxy in a virtual host. The system
freeze at the precise time of the first request made on port 80.
When apache starts there is no problem but at the very moment of the first 
HTTP request, the system freeze.

Here is the apache configuration directives that makes system crashing :

------------------------------------
NameVirtualHost *
<VirtualHost *>
  ServerName bernus.alpage.org
  ProxyPass / http://bern/
  ProxyPassReverse / http://bern/
</VirtualHost>
------------------------------------

Here are extracts from /var/log/messages :

------------------------------------
Jan 18 20:51:40 nus savecore: reboot after panic: pv_link: pv_pool exhausted
Jan 18 20:51:40 nus savecore: writing compressed core to
/var/crash/netbsd.2.core.gz
Jan 18 20:56:24 nus savecore: writing compressed kernel to
/var/crash/netbsd.2.gz
(...)
Jan 18 21:09:04 nus savecore: no core dump
(...)
Jan 18 21:27:16 nus savecore: no core dump
(...)
Jan 18 22:14:15 nus savecore: no core dump
------------------------------------


I have core dumps :

------------------------------------
# ls -l /var/crash/
total 124650
-rw-------  1 root  wheel         2 Jan 18 20:51 bounds
-rw-------  1 root  wheel         5 Sep  9 10:21 minfree
-rw-------  1 root  wheel  34603008 Jan  4 19:05 netbsd.0.core.gz
-rw-------  1 root  wheel  44910048 Jan  4 19:13 netbsd.1.core.gz
-rw-------  1 root  wheel   1588186 Jan  4 19:13 netbsd.1.gz
-rw-------  1 root  wheel  44934404 Jan 18 20:56 netbsd.2.core.gz
-rw-------  1 root  wheel   1466672 Jan 18 20:56 netbsd.2.gz
------------------------------------

The core dump number 1 happened two weeks before. I don't know why but I know
that this not for the same reason.

I don't know what more to say, and I don't provide a patch, sorry I have no
skills in system programming. I'm ready to give you any more useful information
I can about this problem.

Despite this bug, the box is working very good.

>How-To-Repeat:
The problem is perfectly reproductible. I just have to make a request on the
web server with the configuration lines given above in httpd.conf.

I reproduced it 4 times, as you can see above. The first time it was a kernel
panic but next times it was a complete freeze. No messages appeared on screen
and no particular informations in apache error log and sytem log excpet those
I put above.

>Fix:
Well, not configuring a reverse proxy in a virtual host is the only way to
prevent the bug from happening. Note that reverse proxy outside a VirtualHost
and VirtualHost without reverse proxy are both working perfectly. That's only
the two together that make system crashing.
>Release-Note:
>Audit-Trail:
>Unformatted: