Skip Menu |
 

This queue is for tickets about the SOAP-Lite CPAN distribution.

Report information
The Basics
Id: 37151
Status: resolved
Priority: 0/
Queue: SOAP-Lite

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

Bug Information
Severity: (no value)
Broken in:
  • 0.710.07
  • 0.710.08
Fixed in: (no value)

Attachments


Subject: Strawberry perl 5.10 - Tests fail and then later hang
Download (untitled) / with headers
text/plain 14.3k

Message body is not shown because it is too large.

From: todd.e.rinaldo [...] jpmorgan.com
Download (untitled) / with headers
text/plain 691b
Hi, I've added some tests to CGI.t to see where it's hanging. The actual call for no warnings seems to be going wacky? Show quoted text
--- OUTPUT --- C:\strawberry\cpan\build\SOAP-Lite-0.710.07-hBBQQX>prove -v -b t\SOAP\Transport\HTTP\CGI.t t\SOAP\Transport\HTTP\CGI.... ok 1 - use SOAP::Lite; # send_recieve called ok 2 - Object defined
---- HERE is the code the output is coming from --- use Test::More qw(no_plan); use_ok('SOAP::Lite'); # +trace; my $soap = SOAP::Lite->new()->proxy('http://'); ok($soap, "Object defined"); no warnings qw(redefine once); diag("HERE"); *SOAP::Transport::HTTP::Client::send_receive = \&SOAP::Transport::CGI_TEST::Client::send_receive; diag "send_recieve called";
From: todd.e.rinaldo [...] jpmorgan.com
Download (untitled) / with headers
text/plain 708b
Hi, I've added some tests to CGI.t to see where it's hanging. The actual call for "my $som = $soap->call('test');" seems to be failing? Show quoted text
--- OUTPUT --- C:\strawberry\cpan\build\SOAP-Lite-0.710.07-hBBQQX>prove -v -b t\SOAP\Transport\HTTP\CGI.t t\SOAP\Transport\HTTP\CGI.... ok 1 - use SOAP::Lite; # send_recieve called ok 2 - Object defined
---- HERE is the code the output is coming from --- use Test::More qw(no_plan); use_ok('SOAP::Lite'); # +trace; my $soap = SOAP::Lite->new()->proxy('http://'); ok($soap, "Object defined"); no warnings qw(redefine once); diag("HERE"); *SOAP::Transport::HTTP::Client::send_receive = \&SOAP::Transport::CGI_TEST::Client::send_receive; diag "send_recieve called";
From: todd.e.rinaldo [...] jpmorgan.com
Download (untitled) / with headers
text/plain 109b
my bad, to be clear, the source of the hang appears to be the below code... my $som = $soap->call('test');
Subject: Re: [rt.cpan.org #37151] Strawberry perl 5.10 - Tests fail and then later hang
Date: Sat, 28 Jun 2008 18:45:16 +0200
To: bug-SOAP-Lite [...] rt.cpan.org
From: Martin Kutter <martin.kutter [...] fen-net.de>
Download (untitled) / with headers
text/plain 1.6k
CGI.t seems to hang due to encoding issues - the test server (which emulates CGI by using open2) returns a string containing "Überall" - looks like it sends the content-length correctly (8 bytes), but sends the data in cp1252 (7 bytes). The failing test is due to SOAP::Transport::IO requiring the POSIX macro EWOULDBLOCK, which apparently is not available on Windows. I'd suggest the following resolution: a) fix the transport or CGI test encoding issues b) skip the SOAP::Transport::IO test if EWOULDBLOCK is not available, and open a bug report for this behaviour (might take some time, and I think SOAP::Transport::IO is rarely used). I'd appreciate any help, as I only have limited access to a windows box for testing. Thanks for reporting, Martin Am Donnerstag, den 26.06.2008, 20:21 -0400 schrieb Todd E. Rinaldo via RT: Show quoted text
> Queue: SOAP-Lite > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=37151 > > > Hi, I've added some tests to CGI.t to see where it's hanging. The > actual call for no warnings seems to be going wacky? > > --- OUTPUT --- > > C:\strawberry\cpan\build\SOAP-Lite-0.710.07-hBBQQX>prove -v -b > t\SOAP\Transport\HTTP\CGI.t > t\SOAP\Transport\HTTP\CGI.... > ok 1 - use SOAP::Lite; > # send_recieve called > ok 2 - Object defined > > > ---- HERE is the code the output is coming from --- > use Test::More qw(no_plan); > use_ok('SOAP::Lite'); # +trace; > my $soap = SOAP::Lite->new()->proxy('http://'); > ok($soap, "Object defined"); > no warnings qw(redefine once); > diag("HERE"); > *SOAP::Transport::HTTP::Client::send_receive = > \&SOAP::Transport::CGI_TEST::Client::send_receive; > diag "send_recieve called"; >
From: todd.e.rinaldo [...] jpmorgan.com
Download (untitled) / with headers
text/plain 1.3k
Martin, Thanks for checking on this. I guess I feel a little grey on how to respond. 1. It makes no sense that the POSIX macro would be unavailable if it's a part of perl. If it's a part of the OS, then can we leverage the POSIX module? 2. As for testing for then skipping these tests, how does this break functionality that this doesn't work? Would it hang in real life? 3. I'm happy to help debug windows. Please let me know how I can help. If this needs to go offline, feel free to email me directly. Todd On Sat Jun 28 12:45:45 2008, martin.kutter@fen-net.de wrote: Show quoted text
> CGI.t seems to hang due to encoding issues - the test server (which > emulates CGI by using open2) returns a string containing "Überall" - > looks like it sends the content-length correctly (8 bytes), but sends > the data in cp1252 (7 bytes). > > The failing test is due to SOAP::Transport::IO requiring the POSIX
macro Show quoted text
> EWOULDBLOCK, which apparently is not available on Windows. > > I'd suggest the following resolution: > > a) fix the transport or CGI test encoding issues > b) skip the SOAP::Transport::IO test if EWOULDBLOCK is not available, > and open a bug report for this behaviour (might take some time, and I > think SOAP::Transport::IO is rarely used). > > I'd appreciate any help, as I only have limited access to a windows
box Show quoted text
> for testing. > > Thanks for reporting, > > Martin
Subject: Re: [rt.cpan.org #37151] Strawberry perl 5.10 - Tests fail and then later hang
Date: Mon, 30 Jun 2008 21:08:35 +0200
To: bug-SOAP-Lite [...] rt.cpan.org
From: Martin Kutter <martin.kutter [...] fen-net.de>
Download (untitled) / with headers
text/plain 2.3k
Hi Todd, 1. I think EWOULDBLOCK is not available on windows (but I'm not sure). There are workarounds for doing non-blocking I/O on windows, but I haven't investigated... 2. Skipping the tests would of course leave SOAP::Transport::IO unusable on platforms without EWOULDBLOCK. However, direct IO transport is scarcely used. 3. ... any help appreciated :-) I think the hanging CGI.t could be a encoding issue, where the test script expects to read more bytes from the test server via STDIN than this sends. I've added a alarm() call to the test, so at least it should no longer hang (at https://soaplite.svn.sourceforge.net/svnroot/soaplite/branches/0.71/t/SOAP/Transport/HTTP/CGI.t ) I'd be very happy if you could confirm this guess... Martin Am Montag, den 30.06.2008, 10:21 -0400 schrieb Todd E. Rinaldo via RT: Show quoted text
> Queue: SOAP-Lite > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=37151 > > > Martin, > > Thanks for checking on this. I guess I feel a little grey on how to > respond. > > 1. It makes no sense that the POSIX macro would be unavailable if it's > a part of perl. If it's a part of the OS, then can we leverage the > POSIX module? > > 2. As for testing for then skipping these tests, how does this break > functionality that this doesn't work? Would it hang in real life? > > 3. I'm happy to help debug windows. Please let me know how I can help. > If this needs to go offline, feel free to email me directly. > > Todd > > On Sat Jun 28 12:45:45 2008, martin.kutter@fen-net.de wrote:
> > CGI.t seems to hang due to encoding issues - the test server (which > > emulates CGI by using open2) returns a string containing "Überall" - > > looks like it sends the content-length correctly (8 bytes), but sends > > the data in cp1252 (7 bytes). > > > > The failing test is due to SOAP::Transport::IO requiring the POSIX
> macro
> > EWOULDBLOCK, which apparently is not available on Windows. > > > > I'd suggest the following resolution: > > > > a) fix the transport or CGI test encoding issues > > b) skip the SOAP::Transport::IO test if EWOULDBLOCK is not available, > > and open a bug report for this behaviour (might take some time, and I > > think SOAP::Transport::IO is rarely used). > > > > I'd appreciate any help, as I only have limited access to a windows
> box
> > for testing. > > > > Thanks for reporting, > > > > Martin
>
From: todd.e.rinaldo [...] jpmorgan.com
Download (untitled) / with headers
text/plain 459b
No output whatsoever C:\Projects\perl-soap-lite\branches\0.71>prove -v -b t\SOAP\Transport\HTTP\CGI.t t\SOAP\Transport\HTTP\CGI.... Show quoted text
> 3. ... any help appreciated :-) > I think the hanging CGI.t could be a encoding issue, where the test > script expects to read more bytes from the test server via STDIN than > this sends. I've added a alarm() call to the test, so at least it > should no longer hang > I'd be very happy if you could confirm this guess...
From: todd.e.rinaldo [...] jpmorgan.com
Download (untitled) / with headers
text/plain 198b
Hi, I'm ok with turning this off for Windows. How do we do this? Is it a skip_all? If we skip all, I suggest we put an OS test in the module it's self to die if we're in windows. Thanks, Todd
What is the status of this issue? t/SOAP/Transport/HTTP/CGI sill hangs on my Straberry Perl 5.10
From: ddascalescu+perl [...] gmail.com
Download (untitled) / with headers
text/plain 278b
On Thu Feb 12 16:13:19 2009, pshangov wrote: Show quoted text
> What is the status of this issue? t/SOAP/Transport/HTTP/CGI sill hangs > on my Straberry Perl 5.10
Hangs here too, after a bunch of warnings. The last "ok" test is t/SOAP/Transport/HTTP.t. Strawberry 5.10.0.4, Windows XP Pro SP2.
Download (untitled) / with headers
text/plain 1.2k
Jun 28 12:45:45 2008, martin.kutter@fen-net.de wrote: Show quoted text
> CGI.t seems to hang due to encoding issues - the test server (which > emulates CGI by using open2) returns a string containing "Überall" - > looks like it sends the content-length correctly (8 bytes), but sends > the data in cp1252 (7 bytes).
I changed data to non-Unicode string. Same result. Show quoted text
> > The failing test is due to SOAP::Transport::IO requiring the POSIX macro > EWOULDBLOCK, which apparently is not available on Windows.
Currently IO uses solution explained here: http://www.perlmonks.org/?node_id=529812 to implement non-blocking sockets on Windows. It requires to use sysread/syswrite only, but as I see SOAP::Lite already does this. After upgrade to IO 1.25 it still hangs. Interesting solution about EWOULDBLOCK is here: http://stackoverflow.com/questions/131473/ewouldblock-equivalent-errno-under-windows-perl , but it is locking-related. In Windows instead of EWOULDBLOCK, EAGAIN can be used and SOAP::Lite already does it. I added print "$_[0] $^E\n"; (into file) in sub WOULDBLOCK, and it is never called, so it is not the cause of problem. I tried to replace IPC::Open2 with IPC::Run. Debugging output that I added is showing on the screen - this means that it is not intercepted. -- Alexandr Ciornii, http://chorny.net
Subject: Strawberry perl 5.10 - Tests fail and then later hang [PATCH]
Download (untitled) / with headers
text/plain 118b
Hi, please find enclosed patch against SOAP-Lite-0.710.08 that makes all test PASS on Win32 strawberry 5.8.9. -- kmx
diff -u -r SOAP-Lite-0.710.08/lib/IO/SessionData.pm SOAP-Lite-0.710.08patched/lib/IO/SessionData.pm --- SOAP-Lite-0.710.08/lib/IO/SessionData.pm 2008-07-03 19:43:58.000000000 +0200 +++ SOAP-Lite-0.710.08patched/lib/IO/SessionData.pm 2009-08-04 21:09:14.421875000 +0200 @@ -30,7 +30,7 @@ ), (eval {require POSIX} ? map { - eval { POSIX->can($_)->() } + eval { POSIX->can($_) } ? (POSIX->can($_)->() => 1) : () } @names diff -u -r SOAP-Lite-0.710.08/lib/SOAP/Transport/HTTP.pm SOAP-Lite-0.710.08patched/lib/SOAP/Transport/HTTP.pm --- SOAP-Lite-0.710.08/lib/SOAP/Transport/HTTP.pm 2008-07-13 22:30:54.000000000 +0200 +++ SOAP-Lite-0.710.08patched/lib/SOAP/Transport/HTTP.pm 2009-08-04 21:19:57.515625000 +0200 @@ -495,8 +495,10 @@ my $content = q{}; my $buffer; binmode(STDIN); - while (read(STDIN,$buffer,$length)) { + ###NOTE: using some non-blocking IO + select() would be better + while (sysread(STDIN,$buffer,$length)) { $content .= $buffer; + last if(length($content)>=$length); } $self->request(HTTP::Request->new(
Hi, fixed as #49011: Fails to install under strawberry perl Thanks ! Martin


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.