Bug 1286759 - Fix ERR_LIBRARY on finalize call in dispatch
Fix ERR_LIBRARY on finalize call in dispatch
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: corosync (Show other bugs)
6.8
All Unspecified
medium Severity medium
: rc
: ---
Assigned To: Jan Friesse
cluster-qe@redhat.com
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-11-30 11:45 EST by Jan Friesse
Modified: 2016-05-10 15:43 EDT (History)
2 users (show)

See Also:
Fixed In Version: corosync-1.4.7-4.el6
Doc Type: Bug Fix
Doc Text:
No doc text needed.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-05-10 15:43:01 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Revert orig patch (1.03 KB, patch)
2015-11-30 11:48 EST, Jan Friesse
no flags Details | Diff
Proposed patch (5.93 KB, patch)
2015-11-30 11:48 EST, Jan Friesse
no flags Details | Diff

  None (edit)
Description Jan Friesse 2015-11-30 11:45:45 EST
Description of problem:

This patch is (hopefully) better version of patch in bug 1141367. Original patch was causing https://github.com/jfriesse/csts/blob/master/tests/start-cfgstop-with-load.sh to fall.
    
Main problem with original patch was masking error on incorrect place.
If ipc is closed there can still be messages in a buffer (both ipc
socket and shm). Because error in ipc_sem_wait was masked, socket fd
wasn't flushed and pointer in shm data wasn't incremented. If user
application then called dipatch again. old data was read.
    
This patch uses more steps to handle such behavior:
- Add new error code CS_ERR_IN_SHUTDOWN returned specifically and only
 if ipc is closed
- coroipcc_dispatch_get now tests if ipc is closed and if so it
  returns CS_ERR_IN_SHUTDOWN
- If ipc_sem_wait in the coroipcc_dispatch_put function returns
  CS_ERR_LIBRARY, it's checked if ipc is closed. If so, ipc fd is
  flushed and CS_ERR_IN_SHUTDOWN is returned.
- libcfg/confdb/cpg/evs/votequorum tests return code of
  coroipcc_dispatch_put. If it returns CS_ERR_IN_SHUTDOWN, error
  is masked and function terminated.


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

How reproducible:
Depends. On my machines 25% but for example Chrissie was unable to reproduce bug at all.

Steps to Reproduce:
1. Execute https://github.com/jfriesse/csts/blob/master/tests/start-cfgstop-with-load.sh


Actual results:
Test should fall because (at least) one of cpg-load clients dispatches same message more than once.


Expected results:
Test success.

Additional info:
1. We have to ensure behavior fixed by bug 1141367 is unchanged.
2. Bug is quite low priority (no Z needed) because incorrect behavior happens only on PROPER shutdown of corosync. This is usually not happening (node is ether running or fenced)
Comment 1 Jan Friesse 2015-11-30 11:48 EST
Created attachment 1100550 [details]
Revert orig patch
Comment 2 Jan Friesse 2015-11-30 11:48 EST
Created attachment 1100551 [details]
Proposed patch
Comment 7 errata-xmlrpc 2016-05-10 15:43:01 EDT
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.

https://rhn.redhat.com/errata/RHBA-2016-0753.html

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