dbus-sensor: setting the upper non-critical(unc) threshold value smaller than reading value would get 3 logs ( assert log, de-assert log and then assert log)

Max Lai/WYHQ/Wiwynn Max_Lai at wiwynn.com
Wed Feb 19 12:32:01 AEDT 2020

Hi James,
Our validation team met a problem in dbus-sensor recently. The bug is about that if we set the upper non-critical (unc) threshold value smaller than reading value, we should get only one assert log but we got 3 logs ( assert log, de-assert log and then assert log) .
We traced the code of Ipmbsensor. The picture below is the code flow of Ipmbsensor.

[cid:image001.png at 01D5E707.664E4310]

We found that when we set the threshold , the function match (configMatch) which is registered in Ipmbsensor would catch the signal like the below

[cid:image002.png at 01D5E707.664E4310]

When it trigger the handler (eventhandler) and then enter the function of createsensor() and later enter the function of setInitialProperties(). In the setInitialProperties(), It would initial the property (setting the threshold of alarm to default (false) is the root cause). This would trigger Ipmbsensor to send the deassert log. We was wondering that why setting the threshold would initial the property. Is the code flow we draw is correct? Is there any misunderstanding in our thought ? What is the purpose of registering match this signal ?

Our source revision : fb64f45d3399b182ceadffb8fa86ee68c0aa0a11

Note: We found that this issue didn't happen in CPUSensor and HwmonTempSensor.

Max Lai

This email contains confidential or legally privileged information and is for the sole use of its intended recipient. 
Any unauthorized review, use, copying or distribution of this email or the content of this email is strictly prohibited.
If you are not the intended recipient, you may reply to the sender and should delete this e-mail immediately.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ozlabs.org/pipermail/openbmc/attachments/20200219/a444e99c/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 34211 bytes
Desc: image001.png
URL: <http://lists.ozlabs.org/pipermail/openbmc/attachments/20200219/a444e99c/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.png
Type: image/png
Size: 109041 bytes
Desc: image002.png
URL: <http://lists.ozlabs.org/pipermail/openbmc/attachments/20200219/a444e99c/attachment-0003.png>

More information about the openbmc mailing list