Skip Menu |

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

Report information
The Basics
Id: 59856
Status: open
Priority: 0/
Queue: SOAP-Lite

People
Owner: Nobody in particular
Requestors: piotr.lewandowski [...] comarch.com
Cc:
AdminCc:

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



Subject: Missing content after restart Apache
Hi, After restart Apache, content of request is missing on server application. It happens with and without mod_perl. After few minutes, or hours web service starts work correctly until next Apache's restart. Perl v5.8.8 built for x86_64-linux-thread-multi use SOAP::Lite +trace => [ 'all' ]; use SOAP::Transport::HTTP; my $handler = SOAP::Transport::HTTP::CGI->dispatch_to('my_service'); $handler->handle; warn $handler->request->content; SOAP::Transport::new: () SOAP::Serializer::new: () SOAP::Deserializer::new: () SOAP::Parser::new: () SOAP::Server::new: () SOAP::Transport::HTTP::Server::new: () SOAP::Transport::HTTP::CGI::new: () SOAP::Server::handle: () SOAP::Deserializer::deserialize: () SOAP::Parser::decode: () SOAP::Serializer::envelope: () SOAP::Serializer::envelope: Client, Application failed during request deserialization: no element found at line 1, column 0, byte -1 at /home/dwhweb/owf2_deps/ lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi/XML/Parser.pm line 187 SOAP::Data::new: () SOAP::Data::new: () SOAP::Data::new: () SOAP::Data::new: () SOAP::Data::new: () SOAP::Data::new: () SOAP::Data::new: ()
Hi, sorry for the late reply - I need more data on this. Are you using mod_perl? Is the application preloaded (by using a perl-script directive, or preloading the modules)? Is the server under heavy load (e.g. requests coming in while starting up)? Best regards, Martin
From: jesteves [...] janium.com
Hello, I guess I can provide you with some more info, since this was happening also to me. However, although I'm using Apache 2.2 + mod_perl 2.0, I don't associate this error with the "restart" event. For me it the error became evident after upgrading from SOAP::Transport::HTTP v0.69 to v0.712. To be fair, I found the solution here (http://www.perlmonks.org/?node_id=845843; see message by david2008 on Jun 24, 2010 at 11:26 UTC). I'm writing this to confirm that it worked for me. (Please find patch file attached.) I don't quite understand why replacing read with sysread solves the problem. The only thing I can tell you is that, in that point of the module, sysread(STDIN, ...) returns undef and sets $! to "Bad file descriptor". If you ask for fileno(STDIN) it is -1. To me bug #19697 is caused by the same. Regards, Julián Esteves El Lun Ago 15 14:44:20 2011, MKUTTER escribió: Show quoted text
> Hi, > > sorry for the late reply - I need more data on this. > > Are you using mod_perl? > Is the application preloaded (by using a perl-script directive, or > preloading the modules)? > Is the server under heavy load (e.g. requests coming in while starting > up)? > > Best regards, > > Martin
Subject: HTTP.pm.patch
--- HTTP-0.712.pm 2011-08-25 17:16:09.000000000 -0500 +++ HTTP.pm 2011-08-25 17:16:41.000000000 -0500 @@ -566,7 +566,7 @@ if ( !$chunked ) { my $buffer; binmode(STDIN); - while ( sysread( STDIN, $buffer, $length ) ) { + while ( read( STDIN, $buffer, $length ) ) { $content .= $buffer; last if ( length($content) >= $length ); }
Am Do 25. Aug 2011, 18:24:30, jesteves@janium.com schrieb: Show quoted text
> Hello, >
Hi Julián, Show quoted text
> I guess I can provide you with some more info, since this was > happening also to me. > > However, although I'm using Apache 2.2 + mod_perl 2.0, I don't > associate this error with the > "restart" event. For me it the error became evident after upgrading > from > SOAP::Transport::HTTP v0.69 to v0.712.
Which is quite reasonable, as the syread() change appeared in 0.710.09, and was introduced due to https://rt.cpan.org/Public/Bug/Display.html? id=49011 , which prevented things working on Win32 Strawberry Perl. Show quoted text
> To be fair, I found the solution here > (http://www.perlmonks.org/?node_id=845843; see > message by david2008 on Jun 24, 2010 at 11:26 UTC). I'm writing this > to confirm that it > worked for me. > > (Please find patch file attached.) > > I don't quite understand why replacing read with sysread solves the > problem. The only thing I > can tell you is that, in that point of the module, sysread(STDIN, ...) > returns undef and sets $! > to "Bad file descriptor". If you ask for fileno(STDIN) it is -1. > > To me bug #19697 is caused by the same. > > Regards, > > Julián Esteves >
So it looks like this is rather nasty - probably mod_perl masks read(), but not sysread(), while sysread() seems to work on strabwerry perl, but not read(). Looks like some OS or mod_perl specific workaround is needed... Thanks, Martin