Bug 1076713

Summary: ricci: end-use modules do not handle stdin polling correctly
Product: Red Hat Enterprise Linux 6 Reporter: Jan Pokorný [poki] <jpokorny>
Component: ricciAssignee: Jan Pokorný [poki] <jpokorny>
Status: CLOSED ERRATA QA Contact: Cluster QE <mspqa-list>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.5CC: cfeist, cluster-maint, fdinitto, rsteiger
Target Milestone: rcKeywords: Patch
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ricci-0.16.2-73.el6 Doc Type: Bug Fix
Doc Text:
no docs needed (the below text is just informational) Adapted from RHSA-2014:17045/BZ#1076716 (unreviewed) Previously, ricci modules shipped directly with the ricci package mishandled requests with size in bytes divisible by 4096, which is the size of the read buffer in bytes. Consequently, these modules incorrectly evaluated such requests as errors. This bug has been fixed and the modules now process all requests as expected. See also RHBA-2014:18112 for the information about the remaining ricci module shipped with the modcluster package.
Story Points: ---
Clone Of: 1076711
: 1076716 (view as bug list) Environment:
Last Closed: 2014-10-14 07:30:03 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1076711, 1076714    
Bug Blocks: 1076716    

Description Jan Pokorný [poki] 2014-03-14 21:18:42 UTC
el6 also affected...

+++ This bug was initially created as a clone of Bug #1076711 +++

Just observed a situation where the current polling code breaks in case
of input being the exact multiple of the read buffer size (4096).

The cardinal issue is that the code didn't expect POLLHUP to appear
when not original asked for capture, and in turn, not expecting poll
will return positive number in such case, leading to fallback to
"nothing read of malformatted input" condition.

This is partly in one line with previously discovered issues
([bug 732483]), which led me to some more code base reviews,
resulting even in a patch to this very issue (although it was
more like fix "suspicious" than "apparent" back then): [1].
Unfortunately there was no direct justification for that patch
at that time.

[1] https://git.fedorahosted.org/cgit/conga.git/commit/?id=631b17aab8f44396c4cf373bc4466bbfcaab6563

Comment 8 errata-xmlrpc 2014-10-14 07:30:03 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2014-1539.html