Bug 663931

Summary: regression from 0.710.08 soap:Client,Application failed during request deserialization
Product: [Fedora] Fedora Reporter: Mike B. <michiel.beijen>
Component: perl-SOAP-LiteAssignee: Petr Šabata <psabata>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 14CC: mmcgrath, perl-devel
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: perl-SOAP-Lite-0.712-4.fc14 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-05-25 03:12:59 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Mike B. 2010-12-17 12:17:37 UTC
Description of problem:
Running SOAP::Lite under mod_perl the XML-RPC interface is not working with the latest version of SOAP::Lite, included in (at least) F14 and rawhide.

https://rt.cpan.org/Public/Bug/Display.html?id=58538

Version-Release number of selected component (if applicable): 0.712


How reproducible:
See https://rt.cpan.org/Public/Bug/Display.html?id=58538

Steps to Reproduce:
see https://rt.cpan.org/Public/Bug/Display.html?id=58538
  
Here's a patch:

--- lib/SOAP/Transport/HTTP.pm.orig 2010-10-05 16:06:05.563710856 +0100
+++ lib/SOAP/Transport/HTTP.pm 2010-10-05 16:09:20.142813758 +0100
@@ -566,9 +566,16 @@
if ( !$chunked ) {
my $buffer;
binmode(STDIN);
- while ( sysread( STDIN, $buffer, $length ) ) {
- $content .= $buffer;
- last if ( length($content) >= $length );
+ if ( defined $ENV{'MOD_PERL'} ) {
+ while ( read( STDIN, $buffer, $length ) ) {
+ $content .= $buffer;
+ last if ( length($content) >= $length );
+ }
+ } else {
+ while ( sysread( STDIN, $buffer, $length ) ) {
+ $content .= $buffer;
+ last if ( length($content) >= $length );
+ }
}
}

Comment 1 Fedora Admin XMLRPC Client 2011-05-09 08:06:52 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 2 Petr Šabata 2011-05-11 13:46:15 UTC
With respect to the discussion [1] in RT #58538, I'm not sure if this won't introduce other possible issues.

[1] https://rt.cpan.org/Public/Bug/Display.html?id=58538#txn-827275

Would you happen to know what bug is Martin talking about?
Have you or are you willing to test the patch?

Comment 3 Mike B. 2011-05-12 10:27:04 UTC
You mean the part where Martin says:

> it's not just three characters: The change from read() to sysread() 
> was introduced due to another bug report (have to look up the number),
>  which reported read() to be broken under windows (never returns 0 
> to indicate the request was read completely).

I guess we don't need to bother about Windows support in the Fedora package :D
but apart from that, also citing the bug report:

> The reason it's a problem is that under mod_perl, STDIN is not a 
> real filehandle - it's mapped to the request object. CORE:: file 
> operations (read/print/etc.) work fine, but sysread specifically tries 
> to treat as a file handle.

This means that using sysread() fixed the issue with SOAP::Lite on Windows, but when using mod_perl (on linux OR Windows) as stated STDIN is not a real file handle, and thus this change causes issues for those scenarios.

The patch checks if SOAP::Lite is running in a mod_perl environment, and if this is the case, uses read() instead of sysread(). So yes, the fix is fine.
Apart from that, it's running on a lot of OTRS systems in production at the moment, because this issue breaks the RPC/XML interface of OTRS (and Bugzilla, as well) when deployed under mod_perl.

--
Mike

Comment 4 Fedora Update System 2011-05-17 12:36:35 UTC
perl-SOAP-Lite-0.712-4.fc13 has been submitted as an update for Fedora 13.
https://admin.fedoraproject.org/updates/perl-SOAP-Lite-0.712-4.fc13

Comment 5 Fedora Update System 2011-05-17 12:36:58 UTC
perl-SOAP-Lite-0.712-4.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/perl-SOAP-Lite-0.712-4.fc14

Comment 6 Fedora Update System 2011-05-17 12:37:19 UTC
perl-SOAP-Lite-0.712-4.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/perl-SOAP-Lite-0.712-4.fc15

Comment 7 Fedora Update System 2011-05-17 20:55:19 UTC
Package perl-SOAP-Lite-0.712-4.fc14:
* should fix your issue,
* was pushed to the Fedora 14 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing perl-SOAP-Lite-0.712-4.fc14'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/perl-SOAP-Lite-0.712-4.fc14
then log in and leave karma (feedback).

Comment 8 Fedora Update System 2011-05-25 03:12:49 UTC
perl-SOAP-Lite-0.712-4.fc15 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 9 Fedora Update System 2011-05-25 18:54:29 UTC
perl-SOAP-Lite-0.712-4.fc13 has been pushed to the Fedora 13 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 10 Fedora Update System 2011-05-25 18:56:28 UTC
perl-SOAP-Lite-0.712-4.fc14 has been pushed to the Fedora 14 stable repository.  If problems still persist, please make note of it in this bug report.