Subject: Re: problem with free/malloc?
To: Manuel Bouyer <bouyer@antioche.eu.org>
From: Lista de NetBSD current <list11@sepc.edu.mx>
List: current-users
Date: 08/23/2002 18:38:33
> > 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)

Does the following "top -Unobody" and "netstat -a"
helps to identify the problem?

before, some info: apache is running with:
MinSpareServers 5
MaxSpareServers 16
ulimit -n 2048
ulimit -p 512
ulimit -d 256000
ONE user at this moment

webserver call to imapserver to auth user/pass
webserver call to imapserver to get folders and messages
imapserver is an old and slow PC with a old linux.

Thanks a lot for your time

Heron Gallegos

load averages:  0.12,  0.20,  0.16                                                                                  17:41:16
57 processes:  56 sleeping, 1 on processor
CPU states:  0.0% user,  0.0% nice,  0.0% system,  0.0% interrupt,  100% idle
Memory: 93M Act, 2804K Inact, 488K Wired, 361M Free, 2000M Swp free

  PID USERNAME PRI NICE   SIZE   RES STATE     TIME   WCPU    CPU COMMAND
  358 nobody    18    0  4476K 6728K sleep     0:13  0.00%  0.00% httpd
  365 nobody    18    0  4084K 6328K sleep     0:11  0.00%  0.00% httpd
  425 nobody     2    0  4528K 6768K sleep     0:09  0.00%  0.00% httpd
  431 nobody    18    0  4092K 5908K sleep     0:08  0.00%  0.00% httpd
  655 nobody    18    0  4572K 6352K sleep     0:02  0.00%  0.00% httpd
  660 nobody     2    0  4616K 6372K sleep     0:02  0.00%  0.00% httpd
  678 nobody    18    0  3908K 5448K sleep     0:01  0.00%  0.00% httpd
  691 nobody    18    0  4640K 6340K sleep     0:00  0.00%  0.00% httpd
  693 nobody    18    0  4444K 6160K sleep     0:00  0.00%  0.00% httpd
  696 nobody    18    0  3696K 5300K sleep     0:00  0.00%  0.00% httpd
  692 nobody    18    0  3600K 5192K sleep     0:00  0.00%  0.00% httpd
  694 nobody    18    0  3516K 5104K sleep     0:00  0.00%  0.00% httpd
  695 nobody    18    0  3604K 5048K sleep     0:00  0.00%  0.00% httpd
  690 nobody    18    0  3536K 4948K sleep     0:00  0.00%  0.00% httpd
  712 nobody    18    0  3576K 4880K sleep     0:00  0.00%  0.00% httpd
  715 nobody    18    0  2736K 4040K sleep     0:00  0.00%  0.00% httpd
  709 nobody    18    0  2844K 3860K sleep     0:00  0.00%  0.00% httpd
  702 nobody    18    0  2844K 3812K sleep     0:00  0.00%  0.00% httpd
  706 nobody    18    0  2844K 3812K sleep     0:00  0.00%  0.00% httpd
  705 nobody    18    0  2844K 3812K sleep     0:00  0.00%  0.00% httpd
  704 nobody    18    0  2844K 3812K sleep     0:00  0.00%  0.00% httpd
  703 nobody    18    0  2844K 3812K sleep     0:00  0.00%  0.00% httpd
  697 nobody    18    0  2596K 3652K sleep     0:00  0.00%  0.00% httpd
  708 nobody    18    0  2592K 3652K sleep     0:00  0.00%  0.00% httpd
  770 nobody    18    0  2072K 2900K sleep     0:00  0.00%  0.00% httpd
  769 nobody    18    0  2084K 2892K sleep     0:00  0.00%  0.00% httpd
  767 nobody    18    0  2084K 2892K sleep     0:00  0.00%  0.00% httpd
  768 nobody    18    0  2084K 2892K sleep     0:00  0.00%  0.00% httpd
  762 nobody    18    0  2084K 2892K sleep     0:00  0.00%  0.00% httpd
  763 nobody    18    0  2084K 2892K sleep     0:00  0.00%  0.00% httpd
  764 nobody    18    0  2084K 2892K sleep     0:00  0.00%  0.00% httpd
  765 nobody    18    0  2084K 2892K sleep     0:00  0.00%  0.00% httpd
  766 nobody    18    0  2084K 2892K sleep     0:00  0.00%  0.00% httpd
  710 nobody     2    0  3576K 4868K sleep     0:00  0.00%  0.00% httpd
  707 nobody     2    0  2844K 4196K sleep     0:00  0.00%  0.00% httpd
  772 nobody     2    0  1104K  624K sleep     0:00  0.00%  0.00% httpd
  774 nobody     2    0  1104K  624K sleep     0:00  0.00%  0.00% httpd
  775 nobody     2    0  1104K  624K sleep     0:00  0.00%  0.00% httpd
  776 nobody     2    0  1104K  624K sleep     0:00  0.00%  0.00% httpd
  771 nobody     2    0  1104K  624K sleep     0:00  0.00%  0.00% httpd
  773 nobody     2    0  1104K  624K sleep     0:00  0.00%  0.00% httpd

Active Internet connections (including servers)
Proto Recv-Q Send-Q  Local Address          Foreign Address        State
tcp        0      0  dragon.mydom.mx.www    client.mydom.mx,2191   ESTABLISHED
tcp        0      0  dragon.mydom.mx.64832  mydns.mydom.mx.domain  TIME_WAIT
tcp        0      0  dragon.mydom.mx.64833  imapserver.mydom.imap  ESTABLISHED
tcp        0      0  dragon.mydom.mx.64834  imapserver.mydom.imap  ESTABLISHED
tcp        0      0  dragon.mydom.mx.64835  imapserver.mydom.imap  ESTABLISHED
tcp        0      0  dragon.mydom.mx.64836  imapserver.mydom.imap  ESTABLISHED
tcp        0      0  dragon.mydom.mx.64837  imapserver.mydom.imap  ESTABLISHED
tcp        0      0  dragon.mydom.mx.64838  imapserver.mydom.imap  ESTABLISHED
tcp        0      0  dragon.mydom.mx.64840  imapserver.mydom.imap  ESTABLISHED
tcp        0      0  dragon.mydom.mx.64841  imapserver.mydom.imap  ESTABLISHED
tcp        0      0  dragon.mydom.mx.64842  imapserver.mydom.imap  FIN_WAIT_2
tcp        0      0  dragon.mydom.mx.64843  imapserver.mydom.imap  FIN_WAIT_2
tcp        0      0  dragon.mydom.mx.64844  imapserver.mydom.imap  FIN_WAIT_2
tcp        0      0  dragon.mydom.mx.64845  imapserver.mydom.imap  FIN_WAIT_2
tcp        0      0  dragon.mydom.mx.64846  imapserver.mydom.imap  ESTABLISHED
tcp        0      0  dragon.mydom.mx.64847  imapserver.mydom.imap  ESTABLISHED
tcp        0      0  dragon.mydom.mx.64848  imapserver.mydom.imap  FIN_WAIT_2
tcp        0      0  dragon.mydom.mx.64849  imapserver.mydom.imap  ESTABLISHED
tcp        0      0  dragon.mydom.mx.64850  imapserver.mydom.imap  FIN_WAIT_2
tcp        0      0  dragon.mydom.mx.64851  imapserver.mydom.imap  FIN_WAIT_2
tcp        0      0  dragon.mydom.mx.64852  imapserver.mydom.imap  FIN_WAIT_2
tcp        0      0  dragon.mydom.mx.64853  imapserver.mydom.imap  FIN_WAIT_2
tcp        0      0  dragon.mydom.mx.64854  imapserver.mydom.imap  FIN_WAIT_2
tcp        0      0  dragon.mydom.mx.64855  imapserver.mydom.imap  FIN_WAIT_2
tcp        0      0  dragon.mydom.mx.64856  imapserver.mydom.imap  FIN_WAIT_2
tcp        0      0  dragon.mydom.mx.64857  imapserver.mydom.imap  FIN_WAIT_2
tcp        0      0  dragon.mydom.mx.64858  imapserver.mydom.imap  ESTABLISHED
tcp        0      0  dragon.mydom.mx.64859  imapserver.mydom.imap  ESTABLISHED
tcp        0      0  dragon.mydom.mx.64860  imapserver.mydom.imap  FIN_WAIT_2
tcp        0      0  dragon.mydom.mx.64861  imapserver.mydom.imap  FIN_WAIT_2
tcp        0      0  dragon.mydom.mx.64862  imapserver.mydom.imap  FIN_WAIT_2
tcp        0      0  dragon.mydom.mx.64863  imapserver.mydom.imap  FIN_WAIT_2
tcp        0      0  dragon.mydom.mx.64864  imapserver.mydom.imap  ESTABLISHED
tcp        0      0  dragon.mydom.mx.64865  imapserver.mydom.imap  FIN_WAIT_2
tcp        0      0  dragon.mydom.mx.64866  imapserver.mydom.imap  FIN_WAIT_2
tcp       57      0  dragon.mydom.mx.64867  imapserver.mydom.imap  ESTABLISHED
tcp       57      0  dragon.mydom.mx.64868  imapserver.mydom.imap  ESTABLISHED
tcp       57      0  dragon.mydom.mx.64869  imapserver.mydom.imap  ESTABLISHED
tcp       57      0  dragon.mydom.mx.64871  imapserver.mydom.imap  ESTABLISHED
tcp       57      0  dragon.mydom.mx.64873  imapserver.mydom.imap  ESTABLISHED
tcp       57      0  dragon.mydom.mx.64874  imapserver.mydom.imap  ESTABLISHED
tcp       57      0  dragon.mydom.mx.64875  imapserver.mydom.imap  ESTABLISHED
tcp       57      0  dragon.mydom.mx.64876  imapserver.mydom.imap  ESTABLISHED
tcp       36      0  dragon.mydom.mx.64877  imapserver.mydom.imap  ESTABLISHED
tcp       36      0  dragon.mydom.mx.64878  imapserver.mydom.imap  ESTABLISHED
tcp       36      0  dragon.mydom.mx.64879  imapserver.mydom.imap  ESTABLISHED
tcp       36      0  dragon.mydom.mx.64880  imapserver.mydom.imap  ESTABLISHED
tcp       36      0  dragon.mydom.mx.64881  imapserver.mydom.imap  ESTABLISHED
tcp       94      0  dragon.mydom.mx.64893  imapserver.mydom.imap  CLOSE_WAIT
tcp       94      0  dragon.mydom.mx.64894  imapserver.mydom.imap  CLOSE_WAIT
tcp       94      0  dragon.mydom.mx.64978  imapserver.mydom.imap  CLOSE_WAIT
tcp       94      0  dragon.mydom.mx.64985  imapserver.mydom.imap  CLOSE_WAIT
tcp       94      0  dragon.mydom.mx.64990  imapserver.mydom.imap  CLOSE_WAIT
tcp       73      0  dragon.mydom.mx.65010  imapserver.mydom.imap  CLOSE_WAIT
tcp       94      0  dragon.mydom.mx.65013  imapserver.mydom.imap  CLOSE_WAIT
tcp       73      0  dragon.mydom.mx.65019  imapserver.mydom.imap  CLOSE_WAIT
tcp        0     68  dragon.mydom.mx.ssh    mypc.otherdom.mx.41363 ESTABLISHED
tcp        0      0  *.www                  *.*                    LISTEN
tcp        0      0  *.3306                 *.*                    LISTEN
tcp        0      0  *.587                  *.*                    LISTEN
tcp        0      0  *.smtp                 *.*                    LISTEN
tcp        0      0  *.ssh                  *.*                    LISTEN
Active Internet6 connections (including servers)
Proto Recv-Q Send-Q  Local Address          Foreign Address        (state)
tcp6       0      0  *.smtp                 *.*                    LISTEN
tcp6       0      0  *.ssh                  *.*                    LISTEN
Active UNIX domain sockets
Address  Type   Recv-Q Send-Q    Inode     Conn     Refs  Nextref Addr
c0b9aae4 stream      0      0        0 c0e4dcc0        0        0 /tmp/mysql.sock
c0c9ad78 stream      0      0        0 c0e146c0        0        0 /tmp/mysql.sock
c0c9a14c stream      0      0        0 c0c97000        0        0 /tmp/mysql.sock
c0c9ac30 stream      0      0        0 c0cfaf40        0        0 /tmp/mysql.sock
c0c9a480 stream      0      0        0 c0cb2680        0        0 /tmp/mysql.sock
c0c9a3dc stream      0      0        0 c0cb2440        0        0 /tmp/mysql.sock
c0b9aebc stream      0      0        0 c0e14300        0        0 /tmp/mysql.sock
c0cd5670 stream      0      0        0 c0cda480        0        0 /tmp/mysql.sock
c0cd51f4 stream      0      0        0 c0d32940        0        0 /tmp/mysql.sock
c0c9a0a8 stream      0      0        0 c0cb2c00        0        0 /tmp/mysql.sock
c0c9a004 stream      0      0        0 c0c97a80        0        0 /tmp/mysql.sock
c0b9a5c4 stream      0      0 e3dfa104        0        0        0 /tmp/mysql.sock
c0b9a334 dgram       0      0        0 c0b9b740        0        0
c0b9a7b0 dgram       0      0        0 c0b9b740        0 c0d24f00
c0b9a47c stream      0      0        0 c0b75280        0        0
c0c9a66c dgram       0      0        0 c0b9b740        0 c0e4d900
c0c9ab8c stream      0      0        0 c0d1ae00        0        0
c0c9a8fc dgram       0      0        0 c0b9b740        0 c0d24180
c0c9a710 stream      0      0        0 c0c22b80        0        0
c0c9a524 dgram       0      0        0 c0b9b740        0 c0dbcd40
c0c9acd4 stream      0      0        0 c0cfa840        0        0
c0c9a5c8 stream      0      0        0 c0d13580        0        0
c0c9a338 dgram       0      0        0 c0b9b740        0 c0d1a140
c0c9a7b4 stream      0      0        0 c0d32fc0        0        0
c0c9aec0 stream      0      0        0 c0c5c6c0        0        0
c0cd57b8 dgram       0      0        0 c0b9b740        0 c0d242c0
c0cd5c34 stream      0      0        0 c0cfae80        0        0
c0cd585c dgram       0      0        0 c0b9b740        0 c0cb2c40
c0cd5008 stream      0      0        0 c0d32d80        0        0
c0c9ae1c dgram       0      0        0 c0b9b740        0 c0cb2b80
c0c9a294 dgram       0      0        0 c0b9b740        0 c0c22bc0
c0c9a1f0 stream      0      0        0 c0cb2bc0        0        0
c0b9ab88 stream      0      0        0 c0c97a40        0        0
c0b9a0a4 dgram       0      0 e3d1c05c        0 c0cb2d00        0 /var/run/log