Subject: Re: problem with free/malloc?
To: Lista de NetBSD current <list11@sepc.edu.mx>
From: Manuel Bouyer <bouyer@antioche.eu.org>
List: current-users
Date: 08/22/2002 21:56:20
On Thu, Aug 22, 2002 at 01:44:54PM -0500, Lista de NetBSD current wrote:
> Hello
> 
> I am not sure if this list is wrong for my post.
> 
> Our webmail server is netbsd-1.5.2 Dell4400 xeon 930,
> 512 MB ram, 2 scsi-iii disks. Apache-1.3.24, php-4.1.2,
> mysql-3.23.49. horde/imp 2.0/3.0
> Kernel was compiled for me with the
> GENERIC file and the difference of "maxusers 64"
> (was 32), rtc_offset=360 (was 0)
> and comment unnecessary devices.
> 
> This server works very fine with this values of httpd.conf:
> 
> MinSpareServers 5
> MaxSpareServers 16 <- too low for num of users
> 
> When I increase MaxSpareServers to 32 and restart apache,
> and the load of users begins, I have hundreds of messages
> in /var/log/httpd/error_log:
> 
> httpd[Thu Aug 22 09:17:02 2002] [notice] child pid 6676 exit signal Segmentation fault (11)
> [Thu Aug 22 09:20:32 2002] [notice] child pid 6671 exit signal Segmentation fault (11)
> httpd in malloc(): warning: recursive call.
> FATAL:  emalloc():  Unable to allocate 2 bytes
> httpd in malloc(): warning: recursive call.
> FATAL:  emalloc():  Unable to allocate 2 bytes
> httpd in free(): warning: chunk is already free.
> httpd in free(): warning: chunk is already free. <---- hundreds like this
> httpd in free(): warning: chunk is already free.
> [Thu Aug 22 09:26:56 2002] [notice] child pid 6673 exit signal Segmentation fault (11)
> 
> I modified the startup scripts of apache and mysql with
> this line: "ulimit -n 2048"

Maybe you also need to bump maxproc and/or datasize for apache.

-- 
Manuel Bouyer <bouyer@antioche.eu.org>
--