Skip Menu |

This queue is for tickets about the Net-SSLGlue CPAN distribution.

Report information
The Basics
Id: 107816
Status: resolved
Priority: 0/
Queue: Net-SSLGlue

People
Owner: Nobody in particular
Requestors: kasyap.mr [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: SSLGlue:FTP - Memory leak in starttls()
Date: Thu, 15 Oct 2015 16:35:29 -0700
To: bug-Net-SSLGlue [...] rt.cpan.org
From: Ramachandra Kasyap <kasyap.mr [...] gmail.com>
Code to reproduce (I was using '$ftp->login' and 'ftp->ls' as well, but the memory leak is seen even without those): #!/usr/bin/perl -w use strict; require Net::SSLGlue::FTP; sub ftp { my $ftp; $ftp = Net::FTP->new($_[0],PeerPort =>$_[1], Timeout=>$_[3] ) or return (1,"Failed to connect - $!"); $ftp->starttls(SSL_verify_mode=>0); $ftp->stoptls(); $ftp->quit; } while (1) { sleep (2); ftp("192.168.1.1",21,"filename",2,1); } Start this script replacing the IP. Memory usage of the perl process keeps increasing. From my basic debugging, I see there is a leak as immediately after configure_SSL() is called from start_SSL() in SSL.pm (specifically after the following assignment - '${*$self}{'_SSL_ctx'} = $ctx;'_. Browsing the internet, I gathered that this may happen due to circular references, but haven't been able to determine if that is the case. Also tried using Devel::Leak and I do see the 'count' going up, but could not make much progress about where the error is. SSLGlue Version: 1.54 IO-Socket-SSL version: 2.016 Perl version: 5.14.2 OS: Freebsd 8.4-RELEASE Thanks & Regards, Kasyap
Am Do 15. Okt 2015, 19:36:19, kasyap.mr@gmail.com schrieb: Show quoted text
> Code to reproduce (I was using '$ftp->login' and 'ftp->ls' as well, but the > memory leak is seen even without those):
Thanks for reporting the issue. It should be fixed now with version 1.055. Apart from that I recommend to use recent versions of Net::FTP (and the other libnet modules) which starting with version 3.0 have support for SSL and IPv6 integrated. Regards, Steffen
set to fixed.