openbmc / dbus-sensors

D-Bus configurable sensor scanning applications
Apache License 2.0
27 stars 45 forks source link

psusensor crashing due to activating already-active sensors #31

Open ijsn-20 opened 6 months ago

ijsn-20 commented 6 months ago

I've been observing that psuserver is crashing and re-starting for our system when the chassis first powers on, and I've narrowed it down to the service trying to open() the sensors' sysfs files when they're already open. image

Here's how the issue manifests, as I understand it:

I was wondering if this had been observed by anyone else, or if it's isolated to our configuration. The only changes we have to entity-manager are adding per-sensor power states to schemas/legacy.json, but even without these changes the issue is still observed. One method we had been using to prevent this was to only call sensor->activate() if sensor->isActive() returns false, but I didn't know if there was a more underlying problem at hand.

huang8235 commented 3 months ago

I encountered this problem in hwmontempsensor as well: