[stunnel-users] Memory Leak in stunnel 5.31

Fritz Gschwendner droppl at yahoo.ca
Wed Apr 20 22:16:54 CEST 2016


Thank you. I tried the new version.

Between 10:15 and 10:50 stunnel private bytes grew by ~ 85 MB.

Log entries regarding "possible memory leak" look like this at the
beginning:

2016.04.20 10:17:01 LOG4[937]: Possible memory leak at
.\crypto\asn1\tasn_new.c:179: 71652 allocations
2016.04.20 10:17:01 LOG4[937]: Possible memory leak at
.\crypto\asn1\asn1_lib.c:412: 70978 allocations
2016.04.20 10:17:01 LOG4[937]: Possible memory leak at
.\crypto\asn1\a_object.c:346: 55283 allocations
2016.04.20 10:17:01 LOG4[937]: Possible memory leak at
.\crypto\asn1\a_object.c:315: 55283 allocations
2016.04.20 10:17:01 LOG4[937]: Possible memory leak at
.\crypto\asn1\asn1_lib.c:376: 56826 allocations
2016.04.20 10:17:01 LOG4[937]: Possible memory leak at
.\crypto\stack\stack.c:162: 13761 allocations
2016.04.20 10:17:01 LOG4[937]: Possible memory leak at
.\crypto\stack\stack.c:187: 11448 allocations
2016.04.20 10:17:01 LOG4[937]: Possible memory leak at
.\crypto\buffer\buffer.c:118: 11172 allocations
2016.04.20 10:17:01 LOG4[937]: Possible memory leak at
.\crypto\asn1\tasn_new.c:342: 10501 allocations

..and later like this:

2016.04.20 10:51:04 LOG4[2658]: Possible memory leak at
.\crypto\asn1\tasn_new.c:179: 182132 allocations
2016.04.20 10:51:04 LOG4[2658]: Possible memory leak at
.\crypto\asn1\asn1_lib.c:412: 181243 allocations
2016.04.20 10:51:04 LOG4[2658]: Possible memory leak at
.\crypto\asn1\a_object.c:346: 138968 allocations
2016.04.20 10:51:04 LOG4[2658]: Possible memory leak at
.\crypto\asn1\a_object.c:315: 138968 allocations
2016.04.20 10:51:04 LOG4[2658]: Possible memory leak at
.\crypto\asn1\asn1_lib.c:376: 144407 allocations
2016.04.20 10:51:04 LOG4[2658]: Possible memory leak at
.\crypto\stack\stack.c:162: 35294 allocations
2016.04.20 10:51:04 LOG4[2658]: Possible memory leak at
.\crypto\stack\stack.c:187: 29760 allocations
2016.04.20 10:51:04 LOG4[2658]: Possible memory leak at
.\crypto\buffer\buffer.c:118: 28186 allocations
2016.04.20 10:51:04 LOG4[2658]: Possible memory leak at
.\crypto\asn1\tasn_new.c:342: 27649 allocations
2016.04.20 10:51:04 LOG4[2658]: Possible memory leak at
.\crypto\bn\bn_lib.c:303: 27405 allocations
2016.04.20 10:51:04 LOG4[2658]: Possible memory leak at
.\crypto\buffer\buffer.c:74: 18971 allocations
2016.04.20 10:51:04 LOG4[2658]: Possible memory leak at
.\crypto\asn1\x_name.c:136: 18967 allocations
2016.04.20 10:51:04 LOG4[2658]: Possible memory leak at
.\crypto\asn1\x_name.c:383: 18967 allocations
2016.04.20 10:51:04 LOG4[2658]: Possible memory leak at
.\crypto\asn1\a_int.c:208: 18406 allocations
2016.04.20 10:51:04 LOG4[2658]: Possible memory leak at
.\crypto\asn1\a_bitstr.c:158: 18433 allocations
2016.04.20 10:51:04 LOG4[2658]: Possible memory leak at
.\crypto\bn\bn_lib.c:272: 13616 allocations

If there is anything else I can do, please let me know.


-----Urspr√ľngliche Nachricht-----
Von: stunnel-users [mailto:stunnel-users-bounces at stunnel.org] Im Auftrag
von Michal Trojnara
Gesendet: Dienstag, 19. April 2016 23:31
An: stunnel-users at stunnel.org
Betreff: Re: [stunnel-users] Memory Leak in stunnel 5.31

On 31.03.2016 22:28, Fritz Gschwendner wrote:
> we have a memory leak with stunnel 5.31 in server mode on Windows 
> Server 2012. Page File Bytes of the stunnel process keep growing.
[cut]
> I suspect it has something to do with clients not closing the 
> connection correctly. We have a lot of connections ending like
> this:
[cut]
> Is my suspicion plausible? Can you recommend a change in the 
> configuration to avoid this issue? Anything else I can do to debug?

Your suspicion looks plausible.  I have added a heuristic algorithm that
identifies excessive memory allocations.

Please try stunnel-5.32b2:
https://www.stunnel.org/downloads.html
The logged warnings should allow identification of the leak source.

Best regards,
	Mike
_______________________________________________
stunnel-users mailing list
stunnel-users at stunnel.org
https://www.stunnel.org/cgi-bin/mailman/listinfo/stunnel-users




More information about the stunnel-users mailing list