Skip Menu |
 

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

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

People
Owner: Nobody in particular
Requestors: apodran [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.74
Fixed in: 0.76

Attachments


Subject: RPC::XML::Server dies on very slow methods
Download (untitled) / with headers
text/plain 621b
RPC::XML::Server dies on very slow methods without any message. It happens on methods with execution time more than ~20 seconds on Debian Lenny. When the SIGPIPE is caught in the "process_request" function (as I see it is the fix for the #54183 ticket), RPC::XML::Server dies on execution of the following line: ----------------------------------------------- $conn->close; ----------------------------------------------- Placed it to "eval" block resolved this issue in most cases but not always. I've resolved it by adding a local SIGPIPE handler into this "eval" block. OS: Debian 5.0 Perl: 5.10.0 RPC::XML: 0.74
Here is the patch I propose to resolve the issue.
Subject: rpc-xml-server_slow-methods-crash.patch
--- RPC-XML-0.74/lib/RPC/XML/Server.pm 2011-01-22 23:05:19.000000000 +0200 +++ RPC-XML-0.74_patched/lib/RPC/XML/Server.pm 2011-02-10 12:19:11.123903917 +0200 @@ -1592,7 +1592,15 @@ sub server_loop ## no critic (RequireArg } $conn->timeout($self->timeout); $self->process_request($conn); - $conn->close; + + eval { + local $SIG{PIPE} = sub { die "server_loop: Caught SIGPIPE\n"; }; + $conn->close; + }; + if ( $@ ) { + warn "Cannot close conection: $@\n"; + } + undef $conn; # Free up any lingering resources }
Download (untitled) / with headers
text/plain 280b
On Thu Feb 10 06:23:29 2011, https://odisseyrv.myopenid.com/ wrote: Show quoted text
> Here is the patch I propose to resolve the issue.
Patch applied, with a little adjustment to how I check the eval return. This will be in 0.76. Randy -- Randy J. Ray rjray@blackperl.com randy.j.ray@gmail.com
Fix delivered in 0.76 release. -- Randy J. Ray 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.