Skip Menu |

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

Report information
The Basics
Id: 38476
Status: resolved
Priority: 0/
Queue: IO-Async

People
Owner: Nobody in particular
Requestors: david [...] davidfavor.com
Cc:
AdminCc:

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



Subject: New build break in IO::Async-0.16
Date: Thu, 14 Aug 2008 07:40:30 -0500
To: bug-IO-Async [...] rt.cpan.org
From: David Favor <david [...] davidfavor.com>
t/52loop-listen.................Test died early - listen actually succeeded # Looks like you planned 10 tests but only ran 9. # Looks like your test died just after 9. Dubious, test returned 255 (wstat 65280, 0xff00) Failed 1/10 subtests t/60sequencer-client............ok If you require more information email me. -- Love feeling your best ever, all day, every day? Click http://RadicalHealth.com/join for the easy way.
On Thu Aug 14 08:40:50 2008, david@davidfavor.com wrote: Show quoted text
> t/52loop-listen.................Test died early - listen actually
succeeded Show quoted text
> # Looks like you planned 10 tests but only ran 9. > # Looks like your test died just after 9. > Dubious, test returned 255 (wstat 65280, 0xff00) > Failed 1/10 subtests > t/60sequencer-client............ok > > If you require more information email me.
That's quite interesting. That particular test is the one at the end of the script, which tries to listen on tcp/22 or tcp/80, hoping that at least one will fail, either from being not-root or having something else listening there. For it to succeed, you'd have to be root, and not running a web or ssh server, _and_ the previous test to see if those ports are available would have to fail. Can you let me know please * What OS * If you're running the test script as root [if applicable] * If you're running a web server on port 80 or an SSH server on port 22 In the meantime, you could try just adding the port number to the message; like this: --- t/52loop-listen.t 2008-06-17 15:33:47 +0000 +++ t/52loop-listen.t 2008-08-14 21:33:28 +0000 @@ -124,7 +124,7 @@ on_resolve_error => sub { die "Test died early - resolve error $_[0]\n"; }, - on_listen => sub { die "Test died early - listen actually succeeded\n"; }, + on_listen => sub { die "Test died early - listen on port $badport actually succeeded\n"; }, on_accept => sub { "DUMMY" }, # really hope this doesn't happen ;) and run the test again, see which port it claims. -- Paul Evans
Subject: Re: [rt.cpan.org #38476] New build break in IO::Async-0.16
Date: Thu, 14 Aug 2008 16:55:03 -0500
To: bug-IO-Async [...] rt.cpan.org
From: David Favor <david [...] davidfavor.com>
Paul Evans via RT wrote: Show quoted text
> <URL: http://rt.cpan.org/Ticket/Display.html?id=38476 > > > On Thu Aug 14 08:40:50 2008, david@davidfavor.com wrote:
>> t/52loop-listen.................Test died early - listen actually
> succeeded
>> # Looks like you planned 10 tests but only ran 9. >> # Looks like your test died just after 9. >> Dubious, test returned 255 (wstat 65280, 0xff00) >> Failed 1/10 subtests >> t/60sequencer-client............ok >> >> If you require more information email me.
> > That's quite interesting. That particular test is the one at the end of > the script, which tries to listen on tcp/22 or tcp/80, hoping that at > least one will fail, either from being not-root or having something else > listening there. For it to succeed, you'd have to be root, and not > running a web or ssh server, _and_ the previous test to see if those > ports are available would have to fail. > > Can you let me know please > > * What OS
net1#uname -a Linux net1.coolsurf.com 2.6.24.4-64.fc8 #1 SMP Sat Mar 29 09:54:46 EDT 2008 i686 i686 i386 GNU/Linux Show quoted text
> * If you're running the test script as root [if applicable]
Yes. Show quoted text
> * If you're running a web server on port 80 or an SSH server on port 22
I have a Web server running on port 80. I just moved my sshd to an odd port to reduce hack attempts. If I move sshd back to port 22 the test works. Move it to another port and the test fails. Show quoted text
> In the meantime, you could try just adding the port number to the > message; like this: > > --- t/52loop-listen.t 2008-06-17 15:33:47 +0000 > +++ t/52loop-listen.t 2008-08-14 21:33:28 +0000 > @@ -124,7 +124,7 @@ > > on_resolve_error => sub { die "Test died early - resolve error > $_[0]\n"; }, > > - on_listen => sub { die "Test died early - listen actually > succeeded\n"; }, > + on_listen => sub { die "Test died early - listen on port $badport > actually succeeded\n"; }, > > on_accept => sub { "DUMMY" }, # really hope this doesn't happen ;) > > and run the test again, see which port it claims. >
-- Love feeling your best ever, all day, every day? Click http://RadicalHealth.com/join for the easy way.
On Thu Aug 14 17:55:56 2008, david@davidfavor.com wrote: Show quoted text
> > * If you're running the test script as root [if applicable]
> > Yes. >
> > * If you're running a web server on port 80 or an SSH server on
> port 22 > > I have a Web server running on port 80. > > I just moved my sshd to an odd port to reduce hack attempts. > > If I move sshd back to port 22 the test works. Move it to another > port and the test fails.
Ah yes. I can confirm if I run it as root, with ssh stopped, this indeed happens. I'll have a fiddle with it and make it work. -- Paul Evans
[the attached] patch seems to fix it for me. -- Paul Evans
=== modified file 't/52loop-listen.t' --- t/52loop-listen.t 2008-08-14 21:42:57 +0000 +++ t/52loop-listen.t 2008-08-14 23:58:44 +0000 @@ -108,7 +108,12 @@ # it's likely we'll fail to bind TCP port 22 or 80. my $badport; -IO::Socket::INET->new( Type => SOCK_STREAM, LocalPort => $_, Listen => 1 ) or $badport = $_, last for 22, 80; +foreach my $port ( 22, 80 ) { + IO::Socket::INET->new( Type => SOCK_STREAM, LocalPort => $port, Listen => 1, ReuseAddr => 1 ) and next; + + $badport = $port; + last; +} SKIP: { skip "No bind()-failing ports found", 1 unless defined $badport;
Subject: Re: [rt.cpan.org #38476] New build break in IO::Async-0.16
Date: Thu, 14 Aug 2008 20:56:55 -0500
To: bug-IO-Async [...] rt.cpan.org
From: David Favor <david [...] davidfavor.com>
Paul Evans via RT wrote: Show quoted text
> <URL: http://rt.cpan.org/Ticket/Display.html?id=38476 > > > On Thu Aug 14 17:55:56 2008, david@davidfavor.com wrote:
>>> * If you're running the test script as root [if applicable]
>> Yes. >>
>>> * If you're running a web server on port 80 or an SSH server on
>> port 22 >> >> I have a Web server running on port 80. >> >> I just moved my sshd to an odd port to reduce hack attempts. >> >> If I move sshd back to port 22 the test works. Move it to another >> port and the test fails.
> > Ah yes. I can confirm if I run it as root, with ssh stopped, this indeed > happens. I'll have a fiddle with it and make it work. >
Great. I'll test the new version as soon as it shows up on CPAN. -- Love feeling your best ever, all day, every day? Click http://RadicalHealth.com/join for the easy way.
Subject: Re: [rt.cpan.org #38476] New build break in IO::Async-0.16
Date: Thu, 14 Aug 2008 20:57:46 -0500
To: bug-IO-Async [...] rt.cpan.org
From: David Favor <david [...] davidfavor.com>
Paul Evans via RT wrote: Show quoted text
> <URL: http://rt.cpan.org/Ticket/Display.html?id=38476 > > > [the attached] patch seems to fix it for me. > >
I'll just wait for the CPAN version as it pulls to my local mirror and rebuilds each morning. -- Love feeling your best ever, all day, every day? Click http://RadicalHealth.com/join for the easy way.
On Thu Aug 14 21:57:57 2008, david@davidfavor.com wrote: Show quoted text
> I'll just wait for the CPAN version as it pulls to my local > mirror and rebuilds each morning.
OK. Let me know how you get on with: http://search.cpan.org/~pevans/IO-Async-0.16.001/ and if it's good then I'll call it 0.17 -- Paul Evans
Subject: Re: [rt.cpan.org #38476] New build break in IO::Async-0.16
Date: Tue, 19 Aug 2008 08:13:55 -0500
To: bug-IO-Async [...] rt.cpan.org
From: David Favor <david [...] davidfavor.com>
Paul Evans via RT wrote: Show quoted text
> <URL: http://rt.cpan.org/Ticket/Display.html?id=38476 > > > On Thu Aug 14 21:57:57 2008, david@davidfavor.com wrote:
>> I'll just wait for the CPAN version as it pulls to my local >> mirror and rebuilds each morning.
> > OK. Let me know how you get on with: > > http://search.cpan.org/~pevans/IO-Async-0.16.001/ > > and if it's good then I'll call it 0.17 >
Perfect! All tests succeed. Thanks for fixing this. -- Love feeling your best ever, all day, every day? Click http://RadicalHealth.com/join for the easy way.
On Tue Aug 19 09:14:14 2008, david@davidfavor.com wrote: Show quoted text
> Perfect! All tests succeed. > > Thanks for fixing this.
OK. Closing bug. -- Paul Evans
Subject: Re: [rt.cpan.org #38476] New build break in IO::Async-0.16
Date: Wed, 10 Sep 2008 11:10:03 -0500
To: bug-IO-Async [...] rt.cpan.org
From: David Favor <david [...] davidfavor.com>
Paul Evans via RT wrote: Show quoted text
> <URL: http://rt.cpan.org/Ticket/Display.html?id=38476 > > > On Tue Aug 19 09:14:14 2008, david@davidfavor.com wrote:
>> Perfect! All tests succeed. >> >> Thanks for fixing this.
> > OK. Closing bug. > >
Thanks. -- Love feeling your best ever, all day, every day? Click http://RadicalHealth.com/join for the easy way.
Closing. Again -- Paul Evans