[stunnel-users] Memory leak on reconfiguration

Michal Trojnara Michal.Trojnara at mirt.net
Wed Nov 19 12:04:39 CET 2014


Hi Alexander,

This is a known issue. Fixing it is already on the TODO list.
http://www.stunnel.org/sdf_todo.html

Mike

On November 19, 2014 9:19:16 AM CET, Alexander Paramonov <aparamonov at termt.com> wrote:
>Hello, colleagues!
>
>I suppose there is a memory leak on stunnel reconfiguration when it
>receives the SIGHUP signal. Here is my experiment with stunnel 5.05 on
>linux:
>
>~/busybox $ cat /home/posdebug/stunnel.cfg
>debug=6
>options=NO_SSLv2
>pid=/tmp/stunnel.pid
>[57797]
>accept = 127.0.0.1:57797
>connect = 80.90.125.219:64141
>key = /usr/unsign/key.pem
>cert = /usr/unsign/cert.pem
>CAfile = /usr/unsign/cert.pem
>verify = 2
>ciphers =
>AES128-SHA:AES256-SHA:DES-CBC3-SHA:DHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA:EDH-RSA-DES-CBC3-SHA
>sslVersion = all
>TIMEOUTbusy = 100
>TIMEOUTconnect = 100
>client = yes
>~/busybox $ /usr/postunnel/stunnel /home/posdebug/stunnel.cfg
>~/busybox $ top | grep stunnel
>  986     1 posdebug S     *3592*  5.7   0  0.0 /usr/postunnel/stunnel
>/home/posdebug/stunnel.cfg
>~/busybox $ kill -1 986
>~/busybox $ kill -1 986
>~/busybox $ kill -1 986
>~/busybox $ kill -1 986
>~/busybox $ kill -1 986
>~/busybox $ top | grep stunnel
>  986     1 posdebug S     *3720*  5.9   0  0.0 /usr/postunnel/stunnel
>/home/posdebug/stunnel.cfg
>~/busybox $ kill -1 986
>~/busybox $ kill -1 986
>~/busybox $ kill -1 986
>~/busybox $ kill -1 986
>~/busybox $ top | grep stunnel
>  986     1 posdebug S     *3848*  6.2   0  0.0 /usr/postunnel/stunnel
>/home/posdebug/stunnel.cfg
>
>As i noticed, there are a lot of allocs on reconfiguration and only a
>few
>free() calls. Why? RAM is not unlimited, as far as i know.
>Any comments would be highly appreciated.




More information about the stunnel-users mailing list