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
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 1138
Download (untitled) / with headers
text/plain 1.1k
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: ()
MIME-Version: 1.0
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
Content-Type: text/plain; charset="UTF-8"
Message-ID: <rt-3.8.HEAD-22516-1313433860-215.59856-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 275
Download (untitled) / with headers
text/plain 275b
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
MIME-Version: 1.0
In-Reply-To: <rt-3.8.HEAD-22516-1313433860-215.59856-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.427 (Entity 5.427)
References: <rt-3.8.HEAD-22516-1313433860-215.59856-0-0 [...] rt.cpan.org>
Content-Type: multipart/mixed; boundary="----------=_1314311070-20559-21"
Message-ID: <rt-3.8.HEAD-20559-1314311070-1781.59856-0-0 [...] rt.cpan.org>
From: jesteves [...] janium.com
X-RT-Original-Encoding: utf-8
Content-Length: 0
Content-Disposition: inline
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 1212
Download (untitled) / with headers
text/plain 1.1k
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
MIME-Version: 1.0
Subject: HTTP.pm.patch
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Type: application/octet-stream; name="HTTP.pm.patch"
Content-Disposition: inline; filename="HTTP.pm.patch"
Content-Transfer-Encoding: base64
Content-Length: 432
Download HTTP.pm.patch
text/x-diff 432b
--- 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 ); }
MIME-Version: 1.0
In-Reply-To: <rt-3.8.HEAD-20559-1314311070-1781.59856-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
References: <rt-3.8.HEAD-22516-1313433860-215.59856-0-0 [...] rt.cpan.org> <rt-3.8.HEAD-20559-1314311070-1781.59856-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="UTF-8"
Message-ID: <rt-3.8.HEAD-2598-1318246875-1133.59856-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 1443
Download (untitled) / with headers
text/plain 1.4k
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


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.