RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 929098 - CPG: Corosync can duplicate and/or lost messages - Local IPC
Summary: CPG: Corosync can duplicate and/or lost messages - Local IPC
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: corosync
Version: 6.4
Hardware: All
OS: All
urgent
urgent
Target Milestone: rc
: ---
Assignee: Jan Friesse
QA Contact: Cluster QE
URL:
Whiteboard:
Depends On: 922671
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-03-29 09:18 UTC by Libor Miksik
Modified: 2013-04-09 10:29 UTC (History)
9 users (show)

Fixed In Version: corosync-1.4.1-4.el6_2.5
Doc Type: Bug Fix
Doc Text:
When running applications which used the Corosync IPC library, some messages in the dispatch() function were lost or duplicated. This update properly checks the return values of the dispatch_put() function, returns the correct remaining bytes in the IPC ring buffer, and ensures that the IPC client is correctly informed about the real number of messages in the ring buffer. Now, messages in the dispatch() function are no longer lost or duplicated.
Clone Of:
Environment:
Last Closed: 2013-04-09 10:29:36 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
6.2.z-bz929098-1-Put-handle-to-hdb-in-dispatch-on-unknown-message (1.60 KB, patch)
2013-03-29 11:26 UTC, Jan Friesse
no flags Details | Diff
6.2.z-bz929098-2-Properly-check-result-of-coroipcc_dispatch_put (4.63 KB, patch)
2013-03-29 11:26 UTC, Jan Friesse
no flags Details | Diff
6.2.z-bz929098-3-coroipcs-Ensure-rb-data-are-not-overwritten (1.19 KB, patch)
2013-03-29 11:26 UTC, Jan Friesse
no flags Details | Diff
6.2.z-bz929098-4-Properly-lock-pending_semops (3.02 KB, patch)
2013-03-29 11:26 UTC, Jan Friesse
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2013:0724 0 normal SHIPPED_LIVE corosync bug fix update 2013-04-09 14:28:42 UTC

Description Libor Miksik 2013-03-29 09:18:13 UTC
This bug has been copied from bug #922671 and has been proposed
to be backported to 6.2 z-stream (EUS).

Comment 4 Jan Friesse 2013-03-29 11:26:01 UTC
Created attachment 718032 [details]
6.2.z-bz929098-1-Put-handle-to-hdb-in-dispatch-on-unknown-message


Put handle to hdb in dispatch on unknown message

When we receive unknown dispatch type, we should put handle to hdb,
because it was correctly obtained. This problem is only cfg and confdb
libraries, cpg, evs, quorum, ... are not affected and works correctly.

Signed-off-by: Jan Friesse <jfriesse>
Reviewed-by: Fabio M. Di Nitto <fdinitto>

Comment 5 Jan Friesse 2013-03-29 11:26:04 UTC
Created attachment 718033 [details]
6.2.z-bz929098-2-Properly-check-result-of-coroipcc_dispatch_put


Properly check result of coroipcc_dispatch_put

When result of coroipcc_dispatch_put it can happen, that one message is
delivered to user application multiple times.

Signed-off-by: Jan Friesse <jfriesse>
Reviewed-by: Fabio M. Di Nitto <fdinitto>

Comment 6 Jan Friesse 2013-03-29 11:26:07 UTC
Created attachment 718034 [details]
6.2.z-bz929098-3-coroipcs-Ensure-rb-data-are-not-overwritten


coroipcs: Ensure rb data are not overwritten

With introduce of rb alignment (55600762), it's not enough to subtract
one from number of free bytes, but also alignment must be taken to
account. Easiest solution is to subtract 9 bytes.

Signed-off-by: Jan Friesse <jfriesse>
Reviewed-by: Steven Dake <sdake>

Comment 7 Jan Friesse 2013-03-29 11:26:10 UTC
Created attachment 718035 [details]
6.2.z-bz929098-4-Properly-lock-pending_semops


Properly lock pending_semops

pending_semops variable can be changed in two threads. One is actual IPC
connection and second is coropoll. It's really scholar example of race
(one thread doing i++, second doing i--). If socket is full, it can
happen that IPC will increase value and coropoll will decrease,
resulting in unpredictable value. This means, that client IPC can be
informed about more messages then really available, resulting
in reading of garbage messages in library dispatch function.

Solution is to properly lock variable.

Signed-off-by: Jan Friesse <jfriesse>
Reviewed-by: Fabio M. Di Nitto <fdinitto>

Comment 11 errata-xmlrpc 2013-04-09 10:29:36 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-2013-0724.html


Note You need to log in before you can comment on or make changes to this bug.