Skip Menu |
 

This queue is for tickets about the RPC-XML CPAN distribution.

Report information
The Basics
Id: 27778
Status: resolved
Priority: 0/
Queue: RPC-XML

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

Bug Information
Severity: Important
Broken in: 0.59
Fixed in: 0.65



Subject: 40_server.t hangs
Download (untitled) / with headers
text/plain 157b
ActiveState perl v5.8.8 built for MSWin32-x86-multi-thread Binary build 820 Hangs on t/40_server..........ok 24/41 -- Alexandr Ciornii, http://chorny.net
Download (untitled) / with headers
text/plain 240b
If you can, please test again using the 0.60 release of this module. I fixed a significant problem in the server-loop that could cause hangs, but I lack an ActiveState environment to test on, to see if this applies to your situation or not.
Download (untitled) / with headers
text/plain 860b
Jul 25 05:34:15 2008, RJRAY wrote: Show quoted text
> If you can, please test again using the 0.60 release of this module. I > fixed a significant problem in the server-loop that could cause hangs, > but I lack an ActiveState environment to test on, to see if this applies > to your situation or not.
t/40_server............13/54 # Failed test 'Second live req: parsed $res is a fault' # at t/40_server.t line 130. Can't use string ("1") as a HASH ref while "strict refs" in use at t/40_server.t line 131. # Looks like you planned 54 tests but only ran 22. # Looks like you failed 1 test of 22 run. # Looks like your test died just after 22. t/40_server............19/54 hangs here Also tested on Strawberry (didn't hang, but tests also were very slow): http://www.nntp.perl.org/group/perl.cpan.testers/2008/07/msg1941717.html -- Alexandr Ciornii, http://chorny.net
Subject: Re: [rt.cpan.org #27778] 40_server.t hangs
Date: Tue, 12 May 2009 09:44:48 +0200
To: bug-Log-Log4perl [...] rt.cpan.org
From: kmx <kmx [...] volny.cz>
Download (untitled) / with headers
text/plain 552b
Hi, please find enclosed patch (against RPC-XML-0.64) for 40_server.t that solves issue discussed here: 1) to prevent hang ups on Win32 it is necessary to send kill 'KILL' instead of kill 'INT' (on win32 the forked processes are in fact threads and behaves slightly differently than on UNIX systems - do not know why but KILL helps) 2) another issue handled by this patch is that gethostbyname('localhost') on win32 does not return in a resulting array string "localhost" In the end please remove 41_server_hang.t (does not work on Win32). -- kmx
diff -r -u RPC-XML-0.64/t/40_server.t RPC-XML-0.64_new/t/40_server.t --- RPC-XML-0.64/t/40_server.t 2008-09-29 13:22:54.000000000 +0200 +++ RPC-XML-0.64_new/t/40_server.t 2009-05-12 09:33:39.398898700 +0200 @@ -63,6 +63,8 @@ my $localIP = join('.', unpack('C4', $localhostinfo[4])); my @allhosts = ($localIP, $localhostinfo[0], split(' ', $localhostinfo[1])); for (@allhosts) { s/\./\\./g } +# for some reason gethostbyname('localhost') does not return "localhost" on win32 +push @allhosts, "localhost" if $^O eq "MSWin32"; my $allhosts = join('|', @allhosts); like($srv->url, qr{http://($allhosts):$port}, 'RPC::XML::Server::url method (set)'); # This should be non-null this time @@ -104,7 +106,7 @@ is($res->value->value, 1, 'First live req: $res value test'); } } -kill 'INT', $child; +kill 'KILL', $child; # Try deleting the method ok(ref $srv->delete_method('perl.test.suite.test1'), @@ -148,7 +150,7 @@ 'Second live request: correct faultString'); } } -kill 'INT', $child; +kill 'KILL', $child; # Start the server again sleep 1; # To allow the old sockets time enough to go away @@ -178,7 +180,7 @@ 'Third request: pack_sockaddr_in validates all'); } } -kill 'INT', $child; +kill 'KILL', $child; # Start the server again sleep 1; # To allow the old sockets time enough to go away @@ -217,7 +219,7 @@ 'RT29351 live request: correct faultString'); } } -kill 'INT', $child; +kill 'KILL', $child; # OK-- At this point, basic server creation and accessors have been validated. # We've run a remote method and we've correctly failed to run an unknown remote @@ -272,7 +274,7 @@ die "Server allocation failed, cannot continue. Message was: $srv" unless (ref $srv); -kill 'INT', $child; +kill 'KILL', $child; # Start the server again sleep 1; # To allow the old sockets time enough to go away @@ -301,7 +303,7 @@ # HTTP::Message::content might have killed it already via croak(). unless ($res) # $res was made null above if it was an error { - kill 'INT', $child; + kill 'KILL', $child; # Start the server again sleep 1; # To allow the old sockets time enough to go away @@ -325,7 +327,7 @@ # HTTP::Message::content might have killed it already via croak(). unless ($res) # $res was made null above if it was an error { - kill 'INT', $child; + kill 'KILL', $child; # Start the server again sleep 1; # To allow the old sockets time enough to go away @@ -347,7 +349,7 @@ # HTTP::Message::content might have killed it already via croak(). unless ($res) # $res was made null above if it was an error { - kill 'INT', $child; + kill 'KILL', $child; # Start the server again sleep 1; # To allow the old sockets time enough to go away @@ -375,7 +377,7 @@ # HTTP::Message::content might have killed it already via croak(). unless ($res) # $res was made null above if it was an error { - kill 'INT', $child; + kill 'KILL', $child; # Start the server again sleep 1; # To allow the old sockets time enough to go away @@ -401,7 +403,7 @@ # HTTP::Message::content might have killed it already via croak(). unless ($res) # $res was made null above if it was an error { - kill 'INT', $child; + kill 'KILL', $child; # Start the server again sleep 1; # To allow the old sockets time enough to go away @@ -426,7 +428,7 @@ # HTTP::Message::content might have killed it already via croak(). unless ($res) # $res was made null above if it was an error { - kill 'INT', $child; + kill 'KILL', $child; # Start the server again sleep 1; # To allow the old sockets time enough to go away @@ -453,7 +455,7 @@ # HTTP::Message::content might have killed it already via croak(). unless ($res) # $res was made null above if it was an error { - kill 'INT', $child; + kill 'KILL', $child; # Start the server again sleep 1; # To allow the old sockets time enough to go away @@ -479,7 +481,7 @@ # HTTP::Message::content might have killed it already via croak(). unless ($res) # $res was made null above if it was an error { - kill 'INT', $child; + kill 'KILL', $child; # Start the server again sleep 1; # To allow the old sockets time enough to go away @@ -507,7 +509,7 @@ # HTTP::Message::content might have killed it already via croak(). unless ($res) # $res was made null above if it was an error { - kill 'INT', $child; + kill 'KILL', $child; # Start the server again sleep 1; # To allow the old sockets time enough to go away @@ -533,7 +535,7 @@ # HTTP::Message::content might have killed it already via croak(). unless ($res) # $res was made null above if it was an error { - kill 'INT', $child; + kill 'KILL', $child; # Start the server again sleep 1; # To allow the old sockets time enough to go away @@ -582,7 +584,7 @@ # HTTP::Message::content might have killed it already via croak(). unless ($res) # $res was made null above if it was an error { - kill 'INT', $child; + kill 'KILL', $child; # Start the server again sleep 1; # To allow the old sockets time enough to go away @@ -613,7 +615,7 @@ # HTTP::Message::content might have killed it already via croak(). unless ($res) # $res was made null above if it was an error { - kill 'INT', $child; + kill 'KILL', $child; # Start the server again sleep 1; # To allow the old sockets time enough to go away @@ -643,7 +645,7 @@ # HTTP::Message::content might have killed it already via croak(). unless ($res) # $res was made null above if it was an error { - kill 'INT', $child; + kill 'KILL', $child; # Start the server again sleep 1; # To allow the old sockets time enough to go away @@ -673,7 +675,7 @@ # HTTP::Message::content might have killed it already via croak(). unless ($res) # $res was made null above if it was an error { - kill 'INT', $child; + kill 'KILL', $child; # Start the server again sleep 1; # To allow the old sockets time enough to go away @@ -701,7 +703,7 @@ # HTTP::Message::content might have killed it already via croak(). unless ($res) # $res was made null above if it was an error { - kill 'INT', $child; + kill 'KILL', $child; # Start the server again sleep 1; # To allow the old sockets time enough to go away @@ -721,5 +723,5 @@ } # Don't leave any children laying around -kill 'INT', $child; +kill 'KILL', $child; exit;
Download (untitled) / with headers
text/plain 512b
I've applied a variant of the patch, where the signal remains 'INT' for non-Win systems but is set to 'KILL' for MSWin. The t/41_server_hang.t suite is needed to keep watch against a particular class of bug, so instead I wrapped it in a skip-block and skip the tests on Windows. This will go out in 0.65. -- """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" Randy J. Ray Silicon Valley Scale Modelers: http://www.svsm.org rjray@blackperl.com randy.j.ray@gmail.com
Download (untitled) / with headers
text/plain 205b
-- """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" Randy J. Ray Silicon Valley Scale Modelers: http://www.svsm.org rjray@blackperl.com randy.j.ray@gmail.com


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.