open-power / hostboot

System initialization firmware for Power systems
Apache License 2.0
74 stars 97 forks source link

Have you tested the restart of BMC or the restart of pldmd on the BMC side? #201

Closed Grubby0624 closed 2 years ago

Grubby0624 commented 2 years ago

https://github.com/open-power/hostboot/blob/4d128014b63a8c84c4b67a4c4b92b2d30554d27a/src/usr/pldm/extended/pdr_manager.C#L690 If BMC pldmd restarts during the hostboot boot process, BMC will request the pdr of all hosts and then request the state of the sensors added by all host, which will trigger the invoker function that reads all sensor states, but in the invoke_state_sensor_handler assert handler.sensor_handler != NULL?

ibmzach commented 2 years ago

The entry you linked to is only used for creating effecters, not sensors, as you can see here: https://github.com/open-power/hostboot/blob/4d128014b63a8c84c4b67a4c4b92b2d30554d27a/src/usr/pldm/extended/hb_pdrs.C#L528

So the BMC should never send a getStateSensorStates request for it.

Also, we have tested restarting pldmd on the BMC, and with 7d1ad4 merged, it doesn't trigger an assertion failure.