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 2044062

Summary: collectd-ipmi causes core dump
Product: Red Hat Enterprise Linux 9 Reporter: Igor Raits <igor.raits>
Component: OpenIPMIAssignee: Pavel Cahyna <pcahyna>
Status: CLOSED ERRATA QA Contact: Laura Trivelloni <ltrivell>
Severity: high Docs Contact:
Priority: unspecified    
Version: CentOS StreamCC: bstinson, jbastian, jwboyer, ltrivell, pcahyna
Target Milestone: rcKeywords: Rebase, Regression, Triaged
Target Release: ---Flags: pm-rhel: mirror+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: OpenIPMI-2.0.32-2.el9 Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: 1990072 Environment:
Last Closed: 2022-05-17 13:51:07 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:

Description Igor Raits 2022-01-23 14:55:03 UTC
+++ This bug was initially created as a clone of Bug #1990072 +++

This bug was initially created as a copy of Bug #1927022

I am copying this bug because: the same problem was caused by the OpenIPMI rebase in RHEL, bz1923044


Description of problem:

Activating the collectd-ipmi plugin causes a core dump

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

OpenIPMI-2.0.31-1.el8

How reproducible:

Always

Steps to Reproduce:

--------------------------------
LoadPlugin ipmi

<Plugin ipmi>
  <Instance default>
        Sensor "FAN4"
        Sensor "FAN5"
        Sensor "FANB"
        IgnoreSelected true
        NotifySensorAdd true
        NotifySensorRemove true
        NotifySensorNotPresent true
  </Instance>
</Plugin>

--------------------------------

Actual results:

--------------------------------
Process 11260 (collectd) of user 0 dumped core.
                                               
                                               Stack trace of thread 11261:
                                               #0  0x00007fb40ef0c9d5 raise (libc.so.6 + 0x3d9d5)
                                               #1  0x00007fb40eef58a4 abort (libc.so.6 + 0x268a4)
                                               #2  0x00007fb40eef5789 __assert_fail_base.cold (libc.so.6 + 0x26789)
                                               #3  0x00007fb40ef05026 __assert_fail (libc.so.6 + 0x36026)
                                               #4  0x00007fb40e1d9dd4 valid_fd (libOpenIPMIpthread.so.0 + 0x4dd4)
                                               #5  0x00007fb40e1da374 sel_set_fd_write_handler (libOpenIPMIpthread.so.0 + 0x5374)
                                               #6  0x00007fb40e1db28e add_fd (libOpenIPMIpthread.so.0 + 0x628e)
                                               #7  0x00007fb40e105f15 ipmi_smi_setup_con (libOpenIPMI.so.0 + 0xb2f15)
                                               #8  0x00007fb40e1e3ecc c_ipmi_thread_main (ipmi.so + 0x2ecc)
                                               #9  0x00007fb40f0aa3f9 start_thread (libpthread.so.0 + 0x93f9)
                                               #10 0x00007fb40efd0b53 __clone (libc.so.6 + 0x101b53)
                                               
                                               Stack trace of thread 11260:
                                               #0  0x00007fb40de5f6f4 remoteConnectOpen (libvirt.so.0 + 0x30c6f4)
                                               #1  0x00007fb40de6f7a4 virConnectOpenInternal (libvirt.so.0 + 0x31c7a4)
                                               #2  0x00007fb40de70167 virConnectOpenReadOnly (libvirt.so.0 + 0x31d167)
                                               #3  0x00007fb40e034406 lv_connect (virt.so + 0x4406)
                                               #4  0x00007fb40e0348df lv_init (virt.so + 0x48df)
                                               #5  0x00005642fc871031 plugin_init_all (collectd + 0xf031)
                                               #6  0x00005642fc875bbc run_loop (collectd + 0x13bbc)
                                               #7  0x00005642fc868900 main (collectd + 0x6900)
                                               #8  0x00007fb40eef71e2 __libc_start_main (libc.so.6 + 0x281e2)
                                               #9  0x00005642fc868e1e _start (collectd + 0x6e1e)

--------------------------------


Expected results:

Should work.


Additional info:

Workaround (not really): disable IPMI plugin


According to my (pcahyna) testing, reproducing the bug is very easy: it is enough to install collectd and collectd-ipmi on a machine with an IPMI interface and start collectd (collectd -f) - it will abort after opening /dev/ipmi0.

It is also possible to test on a machine without ipmi:
copy the <Plugin ipmi> block from /etc/collectd.conf to /etc/collectd.d/ipmi.conf and uncomment the <Instance "remote"> part, i.e. append this to the file:

<Plugin ipmi>
#       <Instance "local">
#               Sensor "some_sensor"
#               Sensor "another_one"
#               IgnoreSelected false
#               NotifySensorAdd false
#               NotifySensorRemove true
#               NotifySensorNotPresent false
#               NotifyIPMIConnectionState false
#               SELEnabled false
#               SELSensor "some_sensor"
#               SELSensor "another_one"
#               SELIgnoreSelected false
#               SELClearEvent false
#       </Instance>
        <Instance "remote">
                Host "server.example.com"
                Address  "1.2.3.4"
                Username "user"
                Password "secret"
                #AuthType "md5"
                Sensor "some_sensor"
                Sensor "another_one"
                IgnoreSelected false
                NotifySensorAdd false
                NotifySensorRemove true
                NotifySensorNotPresent false
                NotifyIPMIConnectionState false
                SELEnabled false
                SELSensor "some_sensor"
                SELSensor "another_one"
                SELIgnoreSelected false
                SELClearEvent false
        </Instance>
</Plugin>

--- Additional comment from errata-xmlrpc on 2021-11-09 20:01:21 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 (OpenIPMI bug fix and enhancement update), 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-2021:4483

Comment 1 Pavel Cahyna 2022-01-23 15:27:49 UTC
Hello Igor,

thanks for noting this omission in CentOS Stream 9. As a newer version of OpenIPMI has been made available since then, I think the best would be to solve the problem via rebase to the newest version.

Comment 2 Igor Raits 2022-01-23 15:54:13 UTC
(In reply to Pavel Cahyna from comment #1)
> Hello Igor,
> 
> thanks for noting this omission in CentOS Stream 9. As a newer version of
> OpenIPMI has been made available since then, I think the best would be to
> solve the problem via rebase to the newest version.

Sure, let me update my MR: https://gitlab.com/redhat/centos-stream/rpms/OpenIPMI/-/merge_requests/2

Comment 3 Igor Raits 2022-01-23 15:59:26 UTC
@pcahyna can you please upload new sources to the lookaside (you can obtain them with spectool -g)? I think that will be enough to get the PR building.

Comment 4 Pavel Cahyna 2022-01-26 21:57:41 UTC
Thank you Igor, I've uploaded the sources and will rebuild the package.

Comment 10 errata-xmlrpc 2022-05-17 13:51:07 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 (new packages: OpenIPMI), 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-2022:2600