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 1011307 - corosync gives segmentation fault if /dev/shm is full
Summary: corosync gives segmentation fault if /dev/shm is full
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: corosync
Version: 6.4
Hardware: x86_64
OS: Linux
high
high
Target Milestone: rc
: ---
Assignee: Jan Friesse
QA Contact: Cluster QE
URL:
Whiteboard:
Depends On: 1055584
Blocks: 1005179
TreeView+ depends on / blocked
 
Reported: 2013-09-24 04:28 UTC by Aarti Sawant
Modified: 2014-10-14 07:11 UTC (History)
4 users (show)

Fixed In Version: corosync-1.4.1-18.el6
Doc Type: Bug Fix
Doc Text:
Cause: Corosync started on system with full /dev/shm Consequence: Corosync segfault Fix: Handle logsys (this is not typo. logsys = corosync logging system) initialization properly. If logsys cannot be initialized, display error (stderr/syslog) and exit with error code (EXIT_FAILURE). Result: Corosync doesn't segfault. Displays proper error message and exit gracefully.
Clone Of:
Environment:
Last Closed: 2014-10-14 07:11:35 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Proposed patch - Handle full /dev/shm correctly (2.72 KB, patch)
2013-09-24 15:43 UTC, Jan Friesse
no flags Details | Diff
Proposed patch - Handle full /dev/shm correctly - take 2 (2.91 KB, patch)
2013-09-25 13:51 UTC, Jan Friesse
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 504653 0 low CLOSED corosync segmentation fault 2021-02-22 00:41:40 UTC
Red Hat Product Errata RHBA-2014:1508 0 normal SHIPPED_LIVE corosync bug fix update 2014-10-14 01:22:31 UTC

Description Aarti Sawant 2013-09-24 04:28:40 UTC
Description of problem:
corosync service start giving segmentation fault on centos

Version-Release number of selected component (if applicable):
 glibc-2.12-1.107.el6_4.4.x86_64
 corosync-1.4.1-15.el6_4.1.x86_64
 pacemaker-1.1.8-7.el6.x86_64
 centos 6.4

How reproducible:
I am trying to start the corosync on centos 6.4 container

Steps to Reproduce:
1.create a lxc container 

my  lxc configuration file is test1.xml
<domain type='lxc'>
<name>test1</name>
<memory>102400</memory>
<os>
  <type>exe</type>
  <init>/sbin/init</init>
</os>
<vcpu>1</vcpu>
<devices>
<console type='pty'/>
<emulator>/usr/libexec/libvirt_lxc</emulator>
<filesystem type='mount' accessmode='passthrough'>
  <source dir='/lxc/test1/'/>
  <target dir='/'/>
</filesystem>
<interface type='bridge'>
  <source bridge='br0'/>
</interface>
</devices>
</domain>
                  

network settings on host     
/etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE="eth0"
BOOTPROTO="dhcp"
BRIDGE="br0"
HWADDR="08:00:27:97:D6:35"
NM_CONTROLLED="no"
ONBOOT="yes"
TYPE="Ethernet"
UUID="fe9d7236-f418-47ab-b472-6e6caabdd807"

 
/etc/sysconfig/network-scripts/ifcfg-br0
DEVICE="br0"
TYPE="Bridge"
USERCTL="no"
ONBOOT="yes"
BOOTPROTO="dhcp"
NM_CONTROLLED="no"


network setting on host
/lxc/test1/etc/sysconfig/network-scripts/ifcfg-eth0
EVICE=eth0
ONBOOT=yes
TYPE=Ethernet
BOOTPROTO=dhcp
PREFIX=24
USERCTL=yes
IPV6INIT=no


2. install pacemaker and corosync
 yum --installroot=/lxc/test1 --releasever=6.4 install corosync pacemaker

3. start the corosync service
i get segmentaion fault

Actual results:
-bash-4.1# service corosync start
Starting Corosync Cluster Engine (corosync): /etc/init.d/corosync: line 85:
610 Segmentation fault      (core dumped) $prog > /dev/null 2>&1
                                                            [FAILED]

Expected results:
corosync service start without any segmentation fault

Additional info:

this is a backtrace of core dump of corosync

(gdb) run
Starting program: /usr/sbin/corosync
warning: linux_test_for_tracefork: failed to kill second child
[Thread debugging using libthread_db enabled]

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff6e6250b in __memset_sse2 () from /lib64/libc.so.6
Missing separate debuginfos, use: debuginfo-install
glibc-2.12-1.107.el6_4.4.x86_64 libibverbs-1.1.6-5.el6.x86_64
librdmacm-1.0.17-0.git4b5c1aa.el6.x86_64 nspr-4.9.5-2.el6_4.x86_64
nss-3.14.3-4.el6_4.x86_64 nss-util-3.14.3-3.el6_4.x86_64
zlib-1.2.3-29.el6.x86_64
(gdb) bt
#0  0x00007ffff6e6250b in __memset_sse2 () from /lib64/libc.so.6
#1  0x00007ffff79a2764 in _logsys_rec_init (fltsize=<value optimized out>)
    at /usr/include/bits/string3.h:85
#2  0x0000000000406389 in logsys_system_init () at main.c:96
#3  0x0000000000410dc6 in __do_global_ctors_aux ()
#4  0x0000000000403c0b in _init ()
#5  0x00007fffffffe7a8 in ?? ()
#6  0x0000000000410d55 in __libc_csu_init ()
#7  0x00007ffff6dfcc70 in __libc_start_main () from /lib64/libc.so.6
#8  0x0000000000404539 in _start ()

Comment 2 Jan Friesse 2013-09-24 15:43:04 UTC
Created attachment 802319 [details]
Proposed patch - Handle full /dev/shm correctly

If /dev/shm was full, corosync was segfaulting instead of display
error.

Also when logsys is not initialized, error message was displayed
only on stderr. This is not ok if corosync is running as service
and solution is to send error also to syslog.

Comment 3 Jan Friesse 2013-09-25 13:51:36 UTC
Created attachment 802871 [details]
Proposed patch - Handle full /dev/shm correctly - take 2

Same as previous patch but exit code is < 128 (codes > 127 are reserved for signals)

Comment 8 errata-xmlrpc 2014-10-14 07:11:35 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-1508.html


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