Skip Menu |

This queue is for tickets about the IO-Async-SSL CPAN distribution.

Report information
The Basics
Id: 85301
Status: open
Priority: 0/
Queue: IO-Async-SSL

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

Bug Information
Severity: (no value)
Broken in:
  • 0.09
  • 0.10
  • 0.11
  • 0.12
Fixed in: (no value)



Subject: Fails often when tested in parallel
As per subject. Nearly all fails on cpentesters are due to "address already in use". If I run four tests in parallel, it is very likely that the first one succeeds and the three others fail due to this. Maybe a much longer grace period woud be sufficient to overcome this deficiency or some way of randomization of the port, not sure what is easier to implement. HTH && Thanks && Regards,
On Tue May 14 21:36:59 2013, ANDK wrote: Show quoted text
> As per subject. Nearly all fails on cpentesters are due to "address > already in use". If I run four tests in parallel, it is very likely > that the first one succeeds and the three others fail due to this. > > Maybe a much longer grace period woud be sufficient to overcome this > deficiency or some way of randomization of the port, not sure what is > easier to implement. > > HTH && Thanks && Regards,
I'm not sure I understand why on this one. All of the unit tests create a dynamic port by asking the kernel to allocate one; there are no hardcoded port numbers anywhere. Can you provide an example output? -- Paul Evans
CC: ANDK [...] cpan.org
Subject: Re: [rt.cpan.org #85301] Fails often when tested in parallel
Date: Tue, 10 Sep 2013 19:29:20 +0200
To: bug-IO-Async-SSL [...] rt.cpan.org
From: Andreas Koenig <andreas.koenig.7os6VVqR [...] franz.ak.mind.de>
"Paul Evans via RT" <bug-IO-Async-SSL@rt.cpan.org> writes: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=85301 > > > On Tue May 14 21:36:59 2013, ANDK wrote:
>> As per subject. Nearly all fails on cpentesters are due to "address >> already in use". If I run four tests in parallel, it is very likely >> that the first one succeeds and the three others fail due to this. >> >> Maybe a much longer grace period woud be sufficient to overcome this >> deficiency or some way of randomization of the port, not sure what is >> easier to implement. >> >> HTH && Thanks && Regards,
> > I'm not sure I understand why on this one. All of the unit tests create a dynamic port by asking the kernel to allocate one; there are no hardcoded port numbers anywhere. > > Can you provide an example output?
IO-Async-SSL-0.10: http://www.cpantesters.org/cpan/report/30991971 http://www.cpantesters.org/cpan/report/32709678 IO-Async-SSL-0.09 (the version I had written this ticket for): http://www.cpantesters.org/cpan/report/30110380 http://www.cpantesters.org/cpan/report/30110382 http://www.cpantesters.org/cpan/report/30110383 http://www.cpantesters.org/cpan/report/30110400 http://www.cpantesters.org/cpan/report/30110401 http://www.cpantesters.org/cpan/report/30110402 http://www.cpantesters.org/cpan/report/30110403 http://www.cpantesters.org/cpan/report/30110411 http://www.cpantesters.org/cpan/report/30110415 http://www.cpantesters.org/cpan/report/30110417 http://www.cpantesters.org/cpan/report/30110418 http://www.cpantesters.org/cpan/report/30119656 http://www.cpantesters.org/cpan/report/30119657 http://www.cpantesters.org/cpan/report/30119666 http://www.cpantesters.org/cpan/report/30584330 http://www.cpantesters.org/cpan/report/30584331 http://www.cpantesters.org/cpan/report/30584388 http://www.cpantesters.org/cpan/report/30849159 http://www.cpantesters.org/cpan/report/30849270 Normally you would receive notifications about such fail reports directly from cpantesters.org. If you haven't then there's something broken, maybe check your spamfolder or verify that your preferences are in accordance with what you want them to be. -- andreas
On Tue May 14 21:36:59 2013, ANDK wrote: Show quoted text
> As per subject. Nearly all fails on cpentesters are due to "address > already in use". If I run four tests in parallel, it is very likely > that the first one succeeds and the three others fail due to this. > > Maybe a much longer grace period woud be sufficient to overcome this > deficiency or some way of randomization of the port, not sure what is > easier to implement. > > HTH && Thanks && Regards,
Ugh. I wonder if this is a race at starting up the openssl or socat binaries. The way those work is that they ask the kernel to allocate a port, then close the socket, and ask the binary to use that. It's possible one copy of the script races with another, and probes to find the same free port during the dead time of the first. I don't know if it's possible to ask openssl or socat to allocate a port and then have it actually *tell me* which port it opened. Needs some more investigation into those programs... -- Paul Evans
On Fri May 29 14:39:21 2015, PEVANS wrote: Show quoted text
> Needs some more investigation into those programs...
Well, socat with two -d options prints something that looks quite fragile to parse but may be good enough: $ socat -d -d TCP-LISTEN:0 STDIO 2015/05/29 19:42:49 socat[9315] N listening on AF=2 0.0.0.0:50456 openssl s_server on the other hand is far worse. It doesn't like port 0 at all: $ openssl s_server -accept 12345 -key t/privkey.pem -cert t/server.pem Using default temp DH parameters ACCEPT $ openssl s_server -accept 0 -key t/privkey.pem -cert t/server.pem getservbyname failure for 0 usage: s_server [args ...] ... -- Paul Evans