Bug 1927022 - collectd-ipmi causes core dump
Summary: collectd-ipmi causes core dump
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: OpenIPMI
Version: 33
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Josef Ridky
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-02-09 21:11 UTC by Michael Lipp
Modified: 2021-08-11 01:20 UTC (History)
14 users (show)

Fixed In Version: OpenIPMI-2.0.31-7.fc33 OpenIPMI-2.0.31-7.fc34
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-08-11 01:06:31 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Michael Lipp 2021-02-09 21:11:12 UTC
Description of problem:

Activating the collectd-ipmi plugin causes a core dump

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

collectd-5.11.0-10.fc33.x86_64
collectd-ipmi-5.11.0-10.fc33.x86_64

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

Comment 1 Bert DeKnuydt 2021-06-04 13:37:37 UTC
More or less the same on Fedora 34:

collectd-5.12.0-2.fc34.x86_64
collectd-ipmi-5.12.0-2.fc34.x86_64

In the journal:
xxxxx.esat.kuleuven.be collectd[26349]: collectd: selector.c:429: valid_fd: Assertion `fdc != NULL' failed.

Collectd then stops with a SIGABRT.

Only removal of collectd-ipmi makes it work again.

Comment 2 Michael Lipp 2021-06-04 13:55:53 UTC
Same for me, (still) does not work on FC 34.

Comment 3 Iulian V. 2021-07-21 21:57:03 UTC
I have the same issue, but decided to investigate a bit and built OpenIMPI (2.0.31) locally to see what is going on. It seems that in the add_fd method triggers a 'use before allocation' bug.

I've tried to fix and it does work, and I decided to go to OpenIPMI to report the issue.
Found that somebody else reported it already: https://sourceforge.net/p/openipmi/bugs/93/ and it has been closed.
I cannot quickly tell in what version of the library this will appear fixed, as OpenIPMI 2.0.31 was released in Jan 2021, the bug was fixed in July 2021 but the milestone is set to be "v1.0_(example)" ?

I confirm proposed fix there works (removal of the two suggested lines).

Comment 4 Fedora Admin user for bugzilla script actions 2021-07-30 00:04:19 UTC
This package has changed maintainer in Fedora. Reassigning to the new maintainer of this component.

Comment 5 Fedora Admin user for bugzilla script actions 2021-08-02 12:08:40 UTC
This package has changed maintainer in Fedora. Reassigning to the new maintainer of this component.

Comment 6 Fedora Update System 2021-08-02 14:52:51 UTC
FEDORA-2021-046a22dbcd has been submitted as an update to Fedora 34. https://bodhi.fedoraproject.org/updates/FEDORA-2021-046a22dbcd

Comment 7 Fedora Update System 2021-08-02 14:52:51 UTC
FEDORA-2021-3957b5ef7a has been submitted as an update to Fedora 33. https://bodhi.fedoraproject.org/updates/FEDORA-2021-3957b5ef7a

Comment 8 Bert DeKnuydt 2021-08-02 16:18:57 UTC
Updates to OpenIPMI 2.0.31-7 solve the problem on Fedora 34. Tnx!

Comment 9 Fedora Update System 2021-08-03 01:45:22 UTC
FEDORA-2021-046a22dbcd has been pushed to the Fedora 34 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-046a22dbcd`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-046a22dbcd

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 10 Fedora Update System 2021-08-03 01:51:23 UTC
FEDORA-2021-3957b5ef7a has been pushed to the Fedora 33 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-3957b5ef7a`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-3957b5ef7a

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 11 Fedora Update System 2021-08-11 01:06:31 UTC
FEDORA-2021-3957b5ef7a has been pushed to the Fedora 33 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 12 Fedora Update System 2021-08-11 01:20:03 UTC
FEDORA-2021-046a22dbcd has been pushed to the Fedora 34 stable repository.
If problem still persists, please make note of it in this bug report.


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