Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 07 May 2002 02:51:41 -0400
From:      Mike Tancsa <mike@sentex.net>
To:        stable@freebsd.org
Subject:   milter memory leak ?
Message-ID:  <5.1.0.14.0.20020507024124.02f0e4d0@192.168.0.12>

next in thread | raw e-mail | index | archive | help

I am working on a custom rbl type milter and thought I had a memory leak in 
my code.... However, I while stumbling around trying to track it down, I 
was a bit perplexed as to where it is.  So I thought I would try with the 
sample milter to see if it behaved as expected.  Much to my surprise, it 
too seems to just keep growning in memory consumption. i.e. blast a few 
emails at it, and the process grows and grows with additional email.

shell1# ps -aux | grep rbl
root      9298  0.0  0.8  6000 4272  p0  T     2:28AM   0:00.20 vim rbl.c
root      9306  0.0  0.4 10424 2260  p2  S+    2:29AM   0:00.28 
./rbl-sentex -p:/var/run/rbl-sentex
root     10155  0.5  0.2  1844  880  p0  S+    2:40AM   0:00.07 ./rbl-samp 
-p:/var/run/rbl-samp
shell1# ps -aux | grep rbl
root      9298  0.0  0.8  6000 4272  p0  T     2:28AM   0:00.20 vim rbl.c
root      9306  0.0  0.4 10424 2260  p2  S+    2:29AM   0:00.28 
./rbl-sentex -p:/var/run/rbl-sentex
root     10155  0.0  0.2  1844  880  p0  S+    2:40AM   0:00.07 ./rbl-samp 
-p:/var/run/rbl-samp
shell1# ps -aux | grep rbl
root      9298  0.0  0.8  6000 4272  p0  T     2:28AM   0:00.20 vim rbl.c
root      9306  0.0  0.4 10424 2260  p2  S+    2:29AM   0:00.28 
./rbl-sentex -p:/var/run/rbl-sentex
root     10155  0.4  0.2  1908  892  p0  S+    2:40AM   0:00.13 ./rbl-samp 
-p:/var/run/rbl-samp
shell1# ps -aux | grep rbl
root      9298  0.0  0.8  6000 4272  p0  T     2:28AM   0:00.20 vim rbl.c
root      9306  0.0  0.4 10424 2260  p2  S+    2:29AM   0:00.28 
./rbl-sentex -p:/var/run/rbl-sentex
root     10155  0.3  0.2  1908  900  p0  S+    2:40AM   0:00.19 ./rbl-samp 
-p:/var/run/rbl-samp
shell1# ps -aux | grep rbl
root      9298  0.0  0.8  6000 4272  p0  T     2:28AM   0:00.20 vim rbl.c
root      9306  0.0  0.4 10424 2260  p2  S+    2:29AM   0:00.28 
./rbl-sentex -p:/var/run/rbl-sentex
root     10155  0.3  0.2  1908  900  p0  S+    2:40AM   0:00.19 ./rbl-samp 
-p:/var/run/rbl-samp
shell1# ps -aux | grep rbl
root      9298  0.0  0.8  6000 4272  p0  T     2:28AM   0:00.20 vim rbl.c
root      9306  0.0  0.4 10424 2260  p2  S+    2:29AM   0:00.28 
./rbl-sentex -p:/var/run/rbl-sentex
root     10155  0.3  0.2  1940  928  p0  S+    2:40AM   0:00.25 ./rbl-samp 
-p:/var/run/rbl-samp

Am I safe in assuming the sample milter in the documentation is free of 
error ? This is from

/usr/src/contrib/sendmail/libmilter/docs/sample.html

with the following simple Makefile


CSRCS           =       samp.c
OBJS            =       samp.o

SRCS            =       ${CSRCS}

CC = cc

CFLAGS          =       -g -pipe

CFLAGS =  -I/usr/include/libmilter -pipe -g
TARGET          =       rbl-sample

LIBS =  -pthread -lmilter

all: ${TARGET}

rbl-sample: ${OBJS}
         ${CC}  ${OBJS} -o rbl-sample -L /usr/local/lib ${LIBS}



I thought I would try here first as I didnt find any reference to said 
problem in comp.mail.sendmail.


	---Mike
--------------------------------------------------------------------
Mike Tancsa,                          	          tel +1 519 651 3400
Sentex Communications,     			  mike@sentex.net
Providing Internet since 1994                    www.sentex.net
Cambridge, Ontario Canada			  www.sentex.net/mike


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-stable" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5.1.0.14.0.20020507024124.02f0e4d0>