Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 1422573

Summary: a corosync segv can cause libqb handler to go into a tight loop
Product: Red Hat Enterprise Linux 7 Reporter: Christine Caulfield <ccaulfie>
Component: libqbAssignee: Christine Caulfield <ccaulfie>
Status: CLOSED ERRATA QA Contact: cluster-qe <cluster-qe>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.2CC: anprice, cluster-maint, jfriesse, kgaillot, phagara
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: libqb-1.0.1-6.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1439205 (view as bug list) Environment:
Last Closed: 2018-04-10 18:18:58 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: 1439205    

Description Christine Caulfield 2017-02-15 15:26:01 UTC
Description of problem:

corosync installs a libqb segv handler so it can report the crash into the corosync-blackbox. Unfortunately there seems to be some bug (probably in libqb but I'm not 100% sure) that then causes another segv and the whole process ends up stuck in a write() loop.

Version-Release number of selected component (if applicable):
corosync 2.4
libqb 1.0
but it seems to be applicable going back some way. I've seen it reported with corosync 2.3.4 this week.

How reproducible:
Easily if you hack the corosync code to deliberately crash

Steps to Reproduce:
1. Put something like 
   *(int*)0 = 0xdeadbeef;
   into a corosync function. (I put it in message_handler_req_lib_votequorum_setexpected() so I can trigger it at will)
2.  trigger that code (corosync-quorumtool -e1 in this case)

Actual results:
corosync goes into a tight loop, strace shows:
[pid  2416] write(7, "\v\0\0\0", 4)     = -1 EAGAIN (Resource temporarily unavailable)
[pid  2416] write(7, "\v\0\0\0", 4)     = -1 EAGAIN (Resource temporarily unavailable)
[pid  2416] write(7, "\v\0\0\0", 4)     = -1 EAGAIN (Resource temporarily unavailable)
[pid  2416] write(7, "\v\0\0\0", 4)     = -1 EAGAIN (Resource temporarily unavailable)
[pid  2416] write(7, "\v\0\0\0", 4)     = -1 EAGAIN (Resource temporarily unavailable)
and has to be stopped with kill -9

Expected results:
corosync crashes 'neatly' and exits.

Additional info:

Comment 2 Christine Caulfield 2017-04-05 12:31:37 UTC
This commit on corosync master fixes the problem, by not letting libqb handle SIGSEGV.
30771a39a81d0cf126864e3eb8b166ae85537f47a

It is dependant on the following 2 commits to the master branch of libqb (which are not yet in RHEL7.4)
c751993c901805cc5cd02622c8672bbc7f8d6849
e336b716cce83b3af414a1dcc4c2ef22c591d73f

Comment 5 Patrik Hagara 2018-02-15 14:21:35 UTC
* patches confirmed included in 1.0.1-6.el7 RPMs
* regression tests passing
* verified as SanityOnly due to reproducer requiring source hacking

Comment 8 errata-xmlrpc 2018-04-10 18:18:58 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.

https://access.redhat.com/errata/RHBA-2018:0979