Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
For bugs related to Red Hat Enterprise Linux 5 product line. The current stable release is 5.10. For Red Hat Enterprise Linux 6 and above, please visit Red Hat JIRA https://issues.redhat.com/secure/CreateIssue!default.jspa?pid=12332745 to report new issues.

Bug 1076711

Summary: ricci: end-use modules do not handle stdin polling correctly
Product: Red Hat Enterprise Linux 5 Reporter: Jan Pokorný [poki] <jpokorny>
Component: congaAssignee: Jan Pokorný [poki] <jpokorny>
Status: CLOSED ERRATA QA Contact: Cluster QE <mspqa-list>
Severity: high Docs Contact:
Priority: high    
Version: 5.11CC: cluster-maint, fdinitto, rsteiger
Target Milestone: rcKeywords: Patch
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: conga-0.12.2-70.el5 Doc Type: Bug Fix
Doc Text:
Cause: Modules of ricci mishandling requests with size (in bytes) divisible by 4096 (size of the read buffer in bytes). Such requests will be evaluated as an error condition accompanied with "Success" description (if presented to the requester at all). Consequence: Rare request handling error under otherwise error-free conditions. Fix: Now the modules shipped directly with ricci (that is, all modules except for modcluster from a separate clustermon package that is to be addressed with the update for that package/BZ#1076714) will process even requests with size (in bytes) divisible by 4096 correctly. Result: No rare request handling error under otherwise error-free conditions.
Story Points: ---
Clone Of:
: 1076713 1076714 (view as bug list) Environment:
Last Closed: 2014-09-16 05:31:14 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:    
Bug Blocks: 1076713, 1076714    

Description Jan Pokorný [poki] 2014-03-14 21:08:41 UTC
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 1 RHEL Program Management 2014-03-14 21:09:26 UTC
This request was evaluated by Red Hat Product Management for inclusion
in a Red Hat Enterprise Linux release.  Product Management has
requested further review of this request by Red Hat Engineering, for
potential inclusion in a Red Hat Enterprise Linux release for currently
deployed products.  This request is not yet committed for inclusion in
a release.

Comment 2 Jan Pokorný [poki] 2014-03-14 21:13:16 UTC
Note that the size relates to the overall <request/> part of the RICCIAPI,
which is being passed to the particular module, not to the size of
cluster.conf.  Although in the initial observation, it was
a set_cluster.conf request with cluster.conf size roughly 7580 B
(exact equation for triggering size shouldn't be too hard to figure out).

Comment 13 errata-xmlrpc 2014-09-16 05:31:14 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/RHSA-2014-1194.html