[stunnel-users] Stunnel Forks Out of Control

Duncan Brown duncan at baldhead.com
Wed Feb 21 22:47:07 CET 2007

Hi all,


  I apologize if this issue appears in the archives but I've scoured them
and can't find any similar instances (if this problem does occur in the
archives then if someone could point it out to me I'd be grateful as well).
So, here goes:


  I'm running Stunnel on Debian Linux.  I run it in daemon mode and have the
.conf file set to listen on a specific port and redirect to another port.
Listening on the connecting end of Stunnel is another daemon I've created
that listens on the same port for TCP traffic as part of a client-server
application I have (a new process is forked for each connection).  On the
client end is a .NET application that communicates with the server via TCP
with Stunnel installed.  In my code, I've made sure that whenever a
client-server session is finished, the server closes the socket, whether or
not there was an error.  


  Now, everything seems to work flawlessly for a period of time (this period
of time is variable, from anywhere between 1 day to 1 month).  Then, all of
a sudden, Stunnel "explodes"; for example, while there might be one or two
forks of my own daemon, there might be 128 instances of Stunnel, all of
which are in a sleeping state (that is, if I run ps -aux, their "STAT"
attribute is "S"), whereas before it exploded it was pretty much a 1:1
relationship.  When it "explodes", I have to kill Stunnel and restart it,
which is a pain in the rear-end given what I'm trying to do.


  Why is it doing this?  How do I stop it from happening?  I apologize again
if this has already been brought up somewhere else, but I've been unable to
find any references to any similar problems.  If it's a "newbie" mistake or
something I'll gladly accept it and learn from it.  Please find below the
information requested for a problem for the mailing list:


- I'm using v4.20

- No parameters are used from the command-line when starting Stunnel; it
just uses the standard .conf file which I've edited.

- Output of "uname -a" : "Linux buffed 2.4.27-2-386 #1 Wed Aug 17 09:33:35
UTC 2005 i686 GNU/Linux"

- I'm using libc v6

- Output of "gcc -v" : 


Reading specs from /usr/lib/gcc-lib/i486-linux/3.3.5/specs

Configured with: ../src/configure -v
--enable-languages=c,c++,java,f77,pascal,objc,ada,treelang --prefix=/usr
--mandir=/usr/share/man --infodir=/usr/share/info
--with-gxx-include-dir=/usr/include/c++/3.3 --enable-shared
--enable-__cxa_atexit --with-system-zlib --enable-nls
--without-included-gettext --enable-clocale=gnu --enable-debug
--enable-java-gc=boehm --enable-java-awt=xlib --enable-objc-gc i486-linux

Thread model: posix

gcc version 3.3.5 (Debian 1:3.3.5-13)


-          I'm using OpenSSL v0.9.7e (25 Oct 2004)


  Thanks in advance for any help.




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.stunnel.org/pipermail/stunnel-users/attachments/20070221/b211fe57/attachment.html>

More information about the stunnel-users mailing list