commit | 9702c9d1751e5b90f7c1b53c3afbbd4ab2d5e817 | [log] [tgz] |
---|---|---|
author | Zev Weiss <zev@bewilderbeest.net> | Wed Apr 21 22:41:51 2021 -0500 |
committer | Ed Tanous <ed@tanous.net> | Wed May 26 18:56:08 2021 +0000 |
tree | 1e6117c1e9704ff84d93f621e8347a23413ec4c7 | |
parent | 13b63f8f597d396db8b5bd182ac2e5814d599e2f [diff] |
cpusensor: access inventoryIfaces by reference instead of by value Previously this lookup was copying the value out of the map instead of taking a reference to it, so the subsequent reassignment didn't actually update the contents of the map. In certain unusual situations involving repeated sensor discovery attempts (the case in question being a host CPU whose PECI implementation doesn't support reading DIMM temperatures, preventing the sensor from ever reaching the READY state and thus PECI pings continuing indefinitely), this can lead to a host reboot causing the cpusensor daemon to attempt to re-register a dbus interface it had already registered previously, followed shortly by a crash: terminate called after throwing an instance of 'sdbusplus::exception::SdBusError' what(): sd_bus_add_object_vtable: org.freedesktop.DBus.Error.FileExists: File exists With this patch in place, cpusensor runs smoothly across a host reboot. Change-Id: Ie4ceb9e42db2237a8a08e7c52953b016d1e8b56e Signed-off-by: Zev Weiss <zev@bewilderbeest.net> Suggested-by: Ed Tanous <ed@tanous.net>
dbus-sensors is a collection of sensor applications that provide the xyz.openbmc_project.Sensor collection of interfaces. They read sensor values from hwmon, d-bus, or direct driver access to provide readings. Some advance non-sensor features such as fan presence, pwm control, and automatic cpu detection (x86) are also supported.
runtime re-configurable from d-bus (entity-manager or the like)
isolated: each sensor type is isolated into its own daemon, so a bug in one sensor is unlikely to affect another, and single sensor modifications are possible
async single-threaded: uses sdbusplus/asio bindings
multiple data inputs: hwmon, d-bus, direct driver access