If cpuinfoapp has already read the CPU details and then XeonCPU property changes it will try to create another CPUInfo D-Bus object with the same path as an already existing object, causing a failure in sd_bus_add_object_vtable. To reproduce, emit a fake signal:
# busctl emit /xyz/openbmc_project/inventory/system/board/<chassis>/CPU_1 org.freedesktop.DBus.Properties PropertiesChanged sa{sv}as xyz.openbmc_project.Configuration.XeonCPU 1 Bus t 0 0
and observe cpuinfoapp crash:
Jun 11 01:58:15 cpuinfoapp[11371]: get cpu configuration match
Jun 11 01:58:25 cpuinfoapp[11371]: property Address
Jun 11 01:58:25 cpuinfoapp[11371]: property Bus
Jun 11 01:58:25 cpuinfoapp[11371]: property CpuID
Jun 11 01:58:25 cpuinfoapp[11371]: property Name
Jun 11 01:58:25 cpuinfoapp[11371]: property PiromI2cAddress
Jun 11 01:58:25 cpuinfoapp[11371]: property PiromI2cBus
Jun 11 01:58:25 cpuinfoapp[11371]: property RequiredTempSensor
Jun 11 01:58:25 cpuinfoapp[11371]: property Type
Jun 11 01:58:25 cpuinfoapp[11371]: terminate called after throwing an instance of 'sdbusplus::exception::SdBusError'
Jun 11 01:58:25 cpuinfoapp[11371]: what(): sd_bus_add_object_vtable: org.freedesktop.DBus.Error.FileExists: File exists
If
cpuinfoapp
has already read the CPU details and then XeonCPU property changes it will try to create anotherCPUInfo
D-Bus object with the same path as an already existing object, causing a failure insd_bus_add_object_vtable
. To reproduce, emit a fake signal:and observe
cpuinfoapp
crash:Solution might be as simple as changing https://github.com/openbmc/smbios-mdr/blob/a30229e13b8f320bdd23442e39b3a43b94b5545b/src/cpuinfo_main.cpp#L543 to delete the old
CPUInfo
before creating the new one.