Skip Menu |

This queue is for tickets about the Net-EPP-Registry-Nominet CPAN distribution.

Report information
The Basics
Id: 90776
Status: resolved
Priority: 0/
Queue: Net-EPP-Registry-Nominet

People
Owner: Nobody in particular
Requestors: SREZIC [...] cpan.org
Cc:
AdminCc:

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



Subject: Out of memory errors in test suite
On my smoker Net-EPP-Registry-Nominet's test suite fails with Out of memory errors. See http://matrix.cpantesters.org/?dist=Net-EPP-Registry-Nominet%200.01;os=freebsd;reports=1#sl=5,1 for an overview and http://www.cpantesters.org/cpan/report/3be0e796-5418-11e3-a074-b2abe0bfc7aa for a sample report. The smoker machine has a memory limit of 500MB (which is usually enough) and explains why other smokers don't show the problem. I was curious and tracked the problem down to an unexpected server response. In Net::EPP::Protocol::get_frame, a read from the filehandle would yield "92.225.XXX.XXX is not authorized to connect to this service. Closing...\cM\cJ". The first four bytes of the response ("92.2") are used as the header length, and unpacked this was quite a large number, causing the Out of memory error in one of the following reads(). Regards, Slaven
Thanks for debugging this and for the detailed report. It could also be the case that other testers have not triggered this because the first 4 characters of their client address unpacks to a substantially smaller number. I had seen some of these "Out of memory" errors reported, but even on low RAM machines wasn't able to reproduce them probably because of the different client address. I'm not immediately sure whether this is a bug in the software or a failure of Nominet to adhere to the detail of the protocol with this rejection message. Part of the reason for this module to build on the Net::EPP bundle is that this sort of low-level knowledge wasn't required of me. So, I'm going to raise this with the Net::EPP author who will know more about it and will update this ticket when there is a response. Pete
Nominet are breaking the EPP protocol by sending a plaintext message, and Net::EPP::Protocol can't assume that the server doesn't want to send a very large frame. What I think I'll do, is set a package variable called $Net::EPP::Protocol::THRESHOLD which will default to 1GB. If the unpacked frame length exceeds this figure, it will croak.
I've amended the test to use this new variable with a default of 10MB, which is easily enough for the valid test frames and hopefully small enough to pass on just about any low-RAM machine. It's just been uploaded to CPAN as 0.01_01 and will of course require this most recent version of Net::EPP from the svn repo to have any effect. If you can test with the newest versions of both modules please update this ticket with your findings. Thanks, Pete
On 2013-12-09 18:17:08, HOUSTON wrote: Show quoted text
> I've amended the test to use this new variable with a default of 10MB, > which is easily enough for the valid test frames and hopefully small > enough to pass on just about any low-RAM machine. It's just been > uploaded to CPAN as 0.01_01 and will of course require this most > recent version of Net::EPP from the svn repo to have any effect. > > If you can test with the newest versions of both modules please update > this ticket with your findings. >
Hi Pete, with 0.01_01 and Net::EPP from svn it seems to work. See here for the results from my smoker: the red ones are with unpatched Net::EPP, the green one is with Net::EPP from svn: http://217.199.168.174/cgi-bin/cpantestersmatrix.pl?dist=Net-EPP-Registry-Nominet%200.01_01;os=freebsd;reports=1 Regards, Slaven
On Tue Dec 10 18:51:42 2013, SREZIC wrote: Show quoted text
> > Hi Pete, > > with 0.01_01 and Net::EPP from svn it seems to work. See here for the > results from my smoker: the red ones are with unpatched Net::EPP, the > green one is with Net::EPP from svn: > > http://217.199.168.174/cgi-bin/cpantestersmatrix.pl?dist=Net-EPP- > Registry-Nominet%200.01_01;os=freebsd;reports=1 > > Regards, > Slaven
Thanks, Slaven. It does look like this is an effective workaround. I will add some more documentation and include it in the next stable release. Many thanks also to Gavin for implementing the THRESHOLD feature in Net::EPP::Protocol. Pete
With the release of a new version of Net::EPP in October 2015 incorporating the fix previously discussed this problem has disappeared and all tests now seem to be passing. Thanks everyone for your help with the diagnosis and fix. Pete