Skip to content

Conversation

@adamcalabrigo
Copy link
Contributor

@adamcalabrigo adamcalabrigo commented Jan 26, 2026

Pre-submission checklist

  • I've ran the linters locally and fixed lint errors related to the files I modified in this PR. You can install the linters by running pip install -r requirements-dev.txt && pre-commit install
  • pre-commit run

Summary

Issue

There is currently a race condition in platform_manager's device exploration logic: if too much time elapses between when a device is initialized and when its hwmon attributes are enumerated, then DevicePathResolver::resolveSensorPath can fail to find a hwmon path which exists.

Here is an example to illustrate this issue. Several Arista platforms use an I2C CPLD to detect presence of fan modules; defined in a platform_manager configuration, this looks like:

"FAN_SLOT@0": {
  "slotType": "FAN_SLOT",
  "presenceDetection": {
    "sysfsFileHandle": {
      "devicePath": "/SMB_SLOT@0/[FAN_CPLD]",
      "presenceFileName": "fan1_present",
      "desiredValue": 1
    }
  },
  "outgoingI2cBusNames": []
},

In a system where a single CPLD manages multiple fan slots, we have seen issues where platform_manager is not able to correctly detect the FAN_SLOT presence, which depends on checking the hwmon/hwmon[n]/fanX_present sysfs file provided by the CPLD kernel driver, after loading the driver. The platform_manager service ends up logging errors despite the driver correctly creating the sysfs files:

I1024 11:54:06.304951  8228 ExplorationSummary.cpp:60] =========== UNEXPECTED ERRORS ===========
I1024 11:54:06.304960  8228 ExplorationSummary.cpp:62] /SMB_SLOT@0/FAN_SLOT@0/[<ABSENT>]: Error checking for presence in SlotPath FAN_SLOT@0: No sysfs file could be found at DevicePath: /SMB_SLOT@0/[FAN_CPLD] and presenceFileName: fan1_present
I1024 11:54:06.304970  8228 ExplorationSummary.cpp:62] /SMB_SLOT@0/FAN_SLOT@1/[<ABSENT>]: Error checking for presence in SlotPath FAN_SLOT@1: No sysfs file could be found at DevicePath: /SMB_SLOT@0/[FAN_CPLD] and presenceFileName: fan2_present
I1024 11:54:06.304979  8228 ExplorationSummary.cpp:62] /SMB_SLOT@0/FAN_SLOT@2/[<ABSENT>]: Error checking for presence in SlotPath FAN_SLOT@2: No sysfs file could be found at DevicePath: /SMB_SLOT@0/[FAN_CPLD] and presenceFileName: fan3_present
I1024 11:54:06.304989  8228 ExplorationSummary.cpp:62] /SMB_SLOT@0/FAN_SLOT@3/[<ABSENT>]: Error checking for presence in SlotPath FAN_SLOT@3: No sysfs file could be found at DevicePath: /SMB_SLOT@0/[FAN_CPLD] and presenceFileName: fan4_present
I1024 11:54:06.304998  8228 ExplorationSummary.cpp:62] /SMB_SLOT@0/FAN_SLOT@4/[<ABSENT>]: Error checking for presence in SlotPath FAN_SLOT@4: No sysfs file could be found at DevicePath: /SMB_SLOT@0/[FAN_CPLD] and presenceFileName: fan5_present
I1024 11:54:06.305007  8228 ExplorationSummary.cpp:62] /SMB_SLOT@0/FAN_SLOT@5/[<ABSENT>]: Error checking for presence in SlotPath FAN_SLOT@5: No sysfs file could be found at DevicePath: /SMB_SLOT@0/[FAN_CPLD] and presenceFileName: fan6_present
I1024 11:54:06.305017  8228 ExplorationSummary.cpp:62] /SMB_SLOT@0/FAN_SLOT@6/[<ABSENT>]: Error checking for presence in SlotPath FAN_SLOT@6: No sysfs file could be found at DevicePath: /SMB_SLOT@0/[FAN_CPLD] and presenceFileName: fan7_present
I1024 11:54:06.305026  8228 ExplorationSummary.cpp:62] /SMB_SLOT@0/FAN_SLOT@7/[<ABSENT>]: Error checking for presence in SlotPath FAN_SLOT@7: No sysfs file could be found at DevicePath: /SMB_SLOT@0/[FAN_CPLD] and presenceFileName: fan8_present

To determine the sequence of events, I wrote a small script to log millisecond-granularity timestamps and the contents of the CPLD driver's sysfs directory, polled at a 3ms interval. I ran this script concurrently with platform_manager and traced the sequence of events. In sysfs, I saw the following sequence:

2025-10-24 11:53:47.446 - no CPLD device created yet  
2025-10-24 11:53:47.449 - CPLD device created, no hwmon subsystem yet  
2025-10-24 11:53:47.568 - hwmon subsystem created 

And here is the corresponding platform_manager log:

I1024 11:53:47.501047  8228 PlatformExplorer.cpp:231] Exploring SlotPath /SMB_SLOT@0/FAN_SLOT@0
I1024 11:53:47.501058  8228 DevicePathResolver.cpp:120] Resolving SysfsPath for DevicePath /SMB_SLOT@0/[FAN_CPLD]
E1024 11:53:47.501169  8228 DevicePathResolver.cpp:140] Couldn't find PresencePath under /hwmon/hwmon[n]. Reason: Couldn't find hwmon[num] nor iio:device[num] folder under /sys/bus/i2c/devices/18-0060 for /SMB_SLOT@0/[FAN_CPLD]
E1024 11:53:47.501187  8228 DevicePathResolver.cpp:144] Failed to resolve PresencePath under (/sys/bus/i2c/devices/18-0060/fan1_present) nor (/hwmon/hwmon[n])
I1024 11:53:47.501191  8228 DevicePathResolver.cpp:120] Resolving SysfsPath for DevicePath /SMB_SLOT@0/[FAN_CPLD]
E1024 11:53:47.501232  8228 DevicePathResolver.cpp:140] Couldn't find PresencePath under /hwmon/hwmon[n]. Reason: Couldn't find hwmon[num] nor iio:device[num] folder under /sys/bus/i2c/devices/18-0060 for /SMB_SLOT@0/[FAN_CPLD]
E1024 11:53:47.501237  8228 DevicePathResolver.cpp:144] Failed to resolve PresencePath under (/sys/bus/i2c/devices/18-0060/fan1_present) nor (/hwmon/hwmon[n])
E1024 11:53:47.501255  8228 PlatformExplorer.cpp:264] Error checking for presence in SlotPath FAN_SLOT@0: No sysfs file could be found at DevicePath: /SMB_SLOT@0/[FAN_CPLD] and presenceFileName: fan1_present
I1024 11:53:47.501262  8228 PlatformExplorer.cpp:231] Exploring SlotPath /SMB_SLOT@0/FAN_SLOT@1
I1024 11:53:47.501266  8228 DevicePathResolver.cpp:120] Resolving SysfsPath for DevicePath /SMB_SLOT@0/[FAN_CPLD]
E1024 11:53:47.501305  8228 DevicePathResolver.cpp:140] Couldn't find PresencePath under /hwmon/hwmon[n]. Reason: Couldn't find hwmon[num] nor iio:device[num] folder under /sys/bus/i2c/devices/18-0060 for /SMB_SLOT@0/[FAN_CPLD]
E1024 11:53:47.501309  8228 DevicePathResolver.cpp:144] Failed to resolve PresencePath under (/sys/bus/i2c/devices/18-0060/fan2_present) nor (/hwmon/hwmon[n])
I1024 11:53:47.501313  8228 DevicePathResolver.cpp:120] Resolving SysfsPath for DevicePath /SMB_SLOT@0/[FAN_CPLD]
E1024 11:53:47.501348  8228 DevicePathResolver.cpp:140] Couldn't find PresencePath under /hwmon/hwmon[n]. Reason: Couldn't find hwmon[num] nor iio:device[num] folder under /sys/bus/i2c/devices/18-0060 for /SMB_SLOT@0/[FAN_CPLD]
E1024 11:53:47.501353  8228 DevicePathResolver.cpp:144] Failed to resolve PresencePath under (/sys/bus/i2c/devices/18-0060/fan2_present) nor (/hwmon/hwmon[n])
E1024 11:53:47.501360  8228 PlatformExplorer.cpp:264] Error checking for presence in SlotPath FAN_SLOT@1: No sysfs file could be found at DevicePath: /SMB_SLOT@0/[FAN_CPLD] and presenceFileName: fan2_present
I1024 11:53:47.501364  8228 PlatformExplorer.cpp:231] Exploring SlotPath /SMB_SLOT@0/FAN_SLOT@2
I1024 11:53:47.501369  8228 DevicePathResolver.cpp:120] Resolving SysfsPath for DevicePath /SMB_SLOT@0/[FAN_CPLD]
E1024 11:53:47.501405  8228 DevicePathResolver.cpp:140] Couldn't find PresencePath under /hwmon/hwmon[n]. Reason: Couldn't find hwmon[num] nor iio:device[num] folder under /sys/bus/i2c/devices/18-0060 for /SMB_SLOT@0/[FAN_CPLD]
E1024 11:53:47.501409  8228 DevicePathResolver.cpp:144] Failed to resolve PresencePath under (/sys/bus/i2c/devices/18-0060/fan3_present) nor (/hwmon/hwmon[n])
I1024 11:53:47.501413  8228 DevicePathResolver.cpp:120] Resolving SysfsPath for DevicePath /SMB_SLOT@0/[FAN_CPLD]
E1024 11:53:47.501446  8228 DevicePathResolver.cpp:140] Couldn't find PresencePath under /hwmon/hwmon[n]. Reason: Couldn't find hwmon[num] nor iio:device[num] folder under /sys/bus/i2c/devices/18-0060 for /SMB_SLOT@0/[FAN_CPLD]
E1024 11:53:47.501451  8228 DevicePathResolver.cpp:144] Failed to resolve PresencePath under (/sys/bus/i2c/devices/18-0060/fan3_present) nor (/hwmon/hwmon[n])
E1024 11:53:47.501458  8228 PlatformExplorer.cpp:264] Error checking for presence in SlotPath FAN_SLOT@2: No sysfs file could be found at DevicePath: /SMB_SLOT@0/[FAN_CPLD] and presenceFileName: fan3_present
I1024 11:53:47.501463  8228 PlatformExplorer.cpp:231] Exploring SlotPath /SMB_SLOT@0/FAN_SLOT@3
I1024 11:53:47.501467  8228 DevicePathResolver.cpp:120] Resolving SysfsPath for DevicePath /SMB_SLOT@0/[FAN_CPLD]
E1024 11:53:47.501502  8228 DevicePathResolver.cpp:140] Couldn't find PresencePath under /hwmon/hwmon[n]. Reason: Couldn't find hwmon[num] nor iio:device[num] folder under /sys/bus/i2c/devices/18-0060 for /SMB_SLOT@0/[FAN_CPLD]
E1024 11:53:47.501507  8228 DevicePathResolver.cpp:144] Failed to resolve PresencePath under (/sys/bus/i2c/devices/18-0060/fan4_present) nor (/hwmon/hwmon[n])
I1024 11:53:47.501510  8228 DevicePathResolver.cpp:120] Resolving SysfsPath for DevicePath /SMB_SLOT@0/[FAN_CPLD]
E1024 11:53:47.501544  8228 DevicePathResolver.cpp:140] Couldn't find PresencePath under /hwmon/hwmon[n]. Reason: Couldn't find hwmon[num] nor iio:device[num] folder under /sys/bus/i2c/devices/18-0060 for /SMB_SLOT@0/[FAN_CPLD]
E1024 11:53:47.501549  8228 DevicePathResolver.cpp:144] Failed to resolve PresencePath under (/sys/bus/i2c/devices/18-0060/fan4_present) nor (/hwmon/hwmon[n])
E1024 11:53:47.501556  8228 PlatformExplorer.cpp:264] Error checking for presence in SlotPath FAN_SLOT@3: No sysfs file could be found at DevicePath: /SMB_SLOT@0/[FAN_CPLD] and presenceFileName: fan4_present
I1024 11:53:47.501560  8228 PlatformExplorer.cpp:231] Exploring SlotPath /SMB_SLOT@0/FAN_SLOT@4
I1024 11:53:47.501565  8228 DevicePathResolver.cpp:120] Resolving SysfsPath for DevicePath /SMB_SLOT@0/[FAN_CPLD]
E1024 11:53:47.501600  8228 DevicePathResolver.cpp:140] Couldn't find PresencePath under /hwmon/hwmon[n]. Reason: Couldn't find hwmon[num] nor iio:device[num] folder under /sys/bus/i2c/devices/18-0060 for /SMB_SLOT@0/[FAN_CPLD]
E1024 11:53:47.501605  8228 DevicePathResolver.cpp:144] Failed to resolve PresencePath under (/sys/bus/i2c/devices/18-0060/fan5_present) nor (/hwmon/hwmon[n])
I1024 11:53:47.501608  8228 DevicePathResolver.cpp:120] Resolving SysfsPath for DevicePath /SMB_SLOT@0/[FAN_CPLD]
E1024 11:53:47.501642  8228 DevicePathResolver.cpp:140] Couldn't find PresencePath under /hwmon/hwmon[n]. Reason: Couldn't find hwmon[num] nor iio:device[num] folder under /sys/bus/i2c/devices/18-0060 for /SMB_SLOT@0/[FAN_CPLD]
E1024 11:53:47.501646  8228 DevicePathResolver.cpp:144] Failed to resolve PresencePath under (/sys/bus/i2c/devices/18-0060/fan5_present) nor (/hwmon/hwmon[n])
E1024 11:53:47.501653  8228 PlatformExplorer.cpp:264] Error checking for presence in SlotPath FAN_SLOT@4: No sysfs file could be found at DevicePath: /SMB_SLOT@0/[FAN_CPLD] and presenceFileName: fan5_present
I1024 11:53:47.501657  8228 PlatformExplorer.cpp:231] Exploring SlotPath /SMB_SLOT@0/FAN_SLOT@5
I1024 11:53:47.501661  8228 DevicePathResolver.cpp:120] Resolving SysfsPath for DevicePath /SMB_SLOT@0/[FAN_CPLD]
E1024 11:53:47.501696  8228 DevicePathResolver.cpp:140] Couldn't find PresencePath under /hwmon/hwmon[n]. Reason: Couldn't find hwmon[num] nor iio:device[num] folder under /sys/bus/i2c/devices/18-0060 for /SMB_SLOT@0/[FAN_CPLD]
E1024 11:53:47.501701  8228 DevicePathResolver.cpp:144] Failed to resolve PresencePath under (/sys/bus/i2c/devices/18-0060/fan6_present) nor (/hwmon/hwmon[n])
I1024 11:53:47.501704  8228 DevicePathResolver.cpp:120] Resolving SysfsPath for DevicePath /SMB_SLOT@0/[FAN_CPLD]
E1024 11:53:47.501738  8228 DevicePathResolver.cpp:140] Couldn't find PresencePath under /hwmon/hwmon[n]. Reason: Couldn't find hwmon[num] nor iio:device[num] folder under /sys/bus/i2c/devices/18-0060 for /SMB_SLOT@0/[FAN_CPLD]
E1024 11:53:47.501743  8228 DevicePathResolver.cpp:144] Failed to resolve PresencePath under (/sys/bus/i2c/devices/18-0060/fan6_present) nor (/hwmon/hwmon[n])
E1024 11:53:47.501750  8228 PlatformExplorer.cpp:264] Error checking for presence in SlotPath FAN_SLOT@5: No sysfs file could be found at DevicePath: /SMB_SLOT@0/[FAN_CPLD] and presenceFileName: fan6_present
I1024 11:53:47.501754  8228 PlatformExplorer.cpp:231] Exploring SlotPath /SMB_SLOT@0/FAN_SLOT@6
I1024 11:53:47.501758  8228 DevicePathResolver.cpp:120] Resolving SysfsPath for DevicePath /SMB_SLOT@0/[FAN_CPLD]
E1024 11:53:47.501793  8228 DevicePathResolver.cpp:140] Couldn't find PresencePath under /hwmon/hwmon[n]. Reason: Couldn't find hwmon[num] nor iio:device[num] folder under /sys/bus/i2c/devices/18-0060 for /SMB_SLOT@0/[FAN_CPLD]
E1024 11:53:47.501797  8228 DevicePathResolver.cpp:144] Failed to resolve PresencePath under (/sys/bus/i2c/devices/18-0060/fan7_present) nor (/hwmon/hwmon[n])
I1024 11:53:47.501801  8228 DevicePathResolver.cpp:120] Resolving SysfsPath for DevicePath /SMB_SLOT@0/[FAN_CPLD]
E1024 11:53:47.501834  8228 DevicePathResolver.cpp:140] Couldn't find PresencePath under /hwmon/hwmon[n]. Reason: Couldn't find hwmon[num] nor iio:device[num] folder under /sys/bus/i2c/devices/18-0060 for /SMB_SLOT@0/[FAN_CPLD]
E1024 11:53:47.501839  8228 DevicePathResolver.cpp:144] Failed to resolve PresencePath under (/sys/bus/i2c/devices/18-0060/fan7_present) nor (/hwmon/hwmon[n])
E1024 11:53:47.501846  8228 PlatformExplorer.cpp:264] Error checking for presence in SlotPath FAN_SLOT@6: No sysfs file could be found at DevicePath: /SMB_SLOT@0/[FAN_CPLD] and presenceFileName: fan7_present
I1024 11:53:47.501850  8228 PlatformExplorer.cpp:231] Exploring SlotPath /SMB_SLOT@0/FAN_SLOT@7
I1024 11:53:47.501854  8228 DevicePathResolver.cpp:120] Resolving SysfsPath for DevicePath /SMB_SLOT@0/[FAN_CPLD]
E1024 11:53:47.501889  8228 DevicePathResolver.cpp:140] Couldn't find PresencePath under /hwmon/hwmon[n]. Reason: Couldn't find hwmon[num] nor iio:device[num] folder under /sys/bus/i2c/devices/18-0060 for /SMB_SLOT@0/[FAN_CPLD]
E1024 11:53:47.501894  8228 DevicePathResolver.cpp:144] Failed to resolve PresencePath under (/sys/bus/i2c/devices/18-0060/fan8_present) nor (/hwmon/hwmon[n])
I1024 11:53:47.501897  8228 DevicePathResolver.cpp:120] Resolving SysfsPath for DevicePath /SMB_SLOT@0/[FAN_CPLD]
E1024 11:53:47.501930  8228 DevicePathResolver.cpp:140] Couldn't find PresencePath under /hwmon/hwmon[n]. Reason: Couldn't find hwmon[num] nor iio:device[num] folder under /sys/bus/i2c/devices/18-0060 for /SMB_SLOT@0/[FAN_CPLD]
E1024 11:53:47.501935  8228 DevicePathResolver.cpp:144] Failed to resolve PresencePath under (/sys/bus/i2c/devices/18-0060/fan8_present) nor (/hwmon/hwmon[n])
E1024 11:53:47.501942  8228 PlatformExplorer.cpp:264] Error checking for presence in SlotPath FAN_SLOT@7: No sysfs file could be found at DevicePath: /SMB_SLOT@0/[FAN_CPLD] and presenceFileName: fan8_present

Based on the timestamps, the FAN_SLOT device exploration occurs between 11:53:47.501047 and 11:53:47.501942, which is entirely between when the CPLD device has been created (11:53:47.449) and when the hwmon subsystem is created (11:53:47.568). With this same configuration, I sometimes observed platform_manager completing device exploration with no errors. In the case where platform_manager succeeded with no errors, the CPLD hwmon creation took only 64ms; in the case where it fails, the hwmon creation took 119ms.

platform _manager does not take into account that device creation and hwmon enumeration are not atomic: therefore there could be 10s to 100s of milliseconds between when an I2C device is created in the kernel and when its hwmon endpoints are published. The service does not account for this.

Solution

This PR presents one proposed solution to this issue. In DevicePathResolver.cpp, I have updated the DevicePathResolver::resolveSensorPath function to implement a retry loop with exponential backoff, making detection of hwmon subsystems robust to small fluctuations in timing. If the endpoint is already enumerated, then there is no added overhead. If the endpoint is not present, then the function will wait 10 ms + backoff for the device path. In the worst case, where the driver has failed to create an endpoint, the function would add a maximum of 5 seconds for any sensor path.

Positive aspects of this approach:

  • Drivers ready quickly succeed in <10ms, adding little overhead to platform_manager exploration time.
  • Non-functioning drivers will add at most 5 seconds to platform_manager exploration time.
  • Exponential backoff reduces CPU usage vs. constant polling.
  • The function logs when retries occur so slow drivers can be identified and improved.

Test Plan

The platform_manager binary builds successfully and clang-format passes.

To verify the proposed solution, I loaded the same example setup with a CPLD managing eight fan slots. Here is the platform_manager log after this improvement:

I1024 14:48:41.820082  7774 PlatformExplorer.cpp:231] Exploring SlotPath /SMB_SLOT@0/FAN_SLOT@0
I1024 14:48:41.820103  7774 DevicePathResolver.cpp:168] Resolving SysfsPath for DevicePath /SMB_SLOT@0/[FAN_CPLD]
I1024 14:48:41.830277  7774 DevicePathResolver.cpp:74] Waiting for sensor device for /SMB_SLOT@0/[FAN_CPLD] (retry 1, elapsed 10 ms)
I1024 14:48:41.970785  7774 DevicePathResolver.cpp:52] Found sensor device for /SMB_SLOT@0/[FAN_CPLD] after 4 retries (150 ms)
I1024 14:48:41.970821  7774 DevicePathResolver.cpp:183] Resolved PresencePath to /sys/bus/i2c/devices/18-0060/hwmon/hwmon19/fan1_present
I1024 14:48:41.970832  7774 DevicePathResolver.cpp:168] Resolving SysfsPath for DevicePath /SMB_SLOT@0/[FAN_CPLD]
I1024 14:48:41.970911  7774 DevicePathResolver.cpp:183] Resolved PresencePath to /sys/bus/i2c/devices/18-0060/hwmon/hwmon19/fan1_present
I1024 14:48:41.970931  7774 PresenceChecker.cpp:50] The file fan1_present at DevicePath /SMB_SLOT@0/[FAN_CPLD] resolves to /sys/bus/i2c/devices/18-0060/hwmon/hwmon19/fan1_present
I1024 14:48:41.975746  7774 PresenceChecker.cpp:91] Value at /sys/bus/i2c/devices/18-0060/hwmon/hwmon19/fan1_present is 1. desiredValue is 1. Assuming presence of PmUnit at /SMB_SLOT@0/FAN_SLOT@0
I1024 14:48:41.975758  7774 DevicePathResolver.cpp:168] Resolving SysfsPath for DevicePath /SMB_SLOT@0/[FAN_CPLD]
I1024 14:48:41.975802  7774 DevicePathResolver.cpp:183] Resolved PresencePath to /sys/bus/i2c/devices/18-0060/hwmon/hwmon19/fan1_present
I1024 14:48:41.975807  7774 PresenceChecker.cpp:50] The file fan1_present at DevicePath /SMB_SLOT@0/[FAN_CPLD] resolves to /sys/bus/i2c/devices/18-0060/hwmon/hwmon19/fan1_present
I1024 14:48:41.979359  7774 PlatformExplorer.cpp:421] Going with PmUnit name `FAN` defined in config for /SMB_SLOT@0/FAN_SLOT@0
I1024 14:48:41.979374  7774 DataStore.cpp:108] At SlotPath /SMB_SLOT@0/FAN_SLOT@0, updating to PmUnit with name: FAN
I1024 14:48:41.979383  7774 DataStore.cpp:148] Resolved /SMB_SLOT@0/FAN_SLOT@0 to default PmUnitConfig of FAN. No ProductSubversion was read from IDPROM at the slotPath.
I1024 14:48:41.979393  7774 PlatformExplorer.cpp:182] Exploring PmUnit FAN at /SMB_SLOT@0/FAN_SLOT@0
I1024 14:48:41.979401  7774 PlatformExplorer.cpp:185] Exploring PCI Devices for PmUnit FAN at SlotPath /SMB_SLOT@0/FAN_SLOT@0. Count 0
I1024 14:48:41.979409  7774 PlatformExplorer.cpp:192] Exploring I2C Devices for PmUnit FAN at SlotPath /SMB_SLOT@0/FAN_SLOT@0. Count 0
I1024 14:48:41.979417  7774 PlatformExplorer.cpp:215] Exploring Slots for PmUnit FAN at SlotPath /SMB_SLOT@0/FAN_SLOT@0. Count 0
I1024 14:48:41.979426  7774 PlatformExplorer.cpp:231] Exploring SlotPath /SMB_SLOT@0/FAN_SLOT@1
I1024 14:48:41.979436  7774 DevicePathResolver.cpp:168] Resolving SysfsPath for DevicePath /SMB_SLOT@0/[FAN_CPLD]
I1024 14:48:41.979516  7774 DevicePathResolver.cpp:183] Resolved PresencePath to /sys/bus/i2c/devices/18-0060/hwmon/hwmon19/fan2_present
I1024 14:48:41.979526  7774 DevicePathResolver.cpp:168] Resolving SysfsPath for DevicePath /SMB_SLOT@0/[FAN_CPLD]
I1024 14:48:41.979590  7774 DevicePathResolver.cpp:183] Resolved PresencePath to /sys/bus/i2c/devices/18-0060/hwmon/hwmon19/fan2_present
I1024 14:48:41.979600  7774 PresenceChecker.cpp:50] The file fan2_present at DevicePath /SMB_SLOT@0/[FAN_CPLD] resolves to /sys/bus/i2c/devices/18-0060/hwmon/hwmon19/fan2_present
I1024 14:48:41.982748  7774 PresenceChecker.cpp:91] Value at /sys/bus/i2c/devices/18-0060/hwmon/hwmon19/fan2_present is 1. desiredValue is 1. Assuming presence of PmUnit at /SMB_SLOT@0/FAN_SLOT@1
I1024 14:48:41.982762  7774 DevicePathResolver.cpp:168] Resolving SysfsPath for DevicePath /SMB_SLOT@0/[FAN_CPLD]
I1024 14:48:41.982834  7774 DevicePathResolver.cpp:183] Resolved PresencePath to /sys/bus/i2c/devices/18-0060/hwmon/hwmon19/fan2_present
I1024 14:48:41.982845  7774 PresenceChecker.cpp:50] The file fan2_present at DevicePath /SMB_SLOT@0/[FAN_CPLD] resolves to /sys/bus/i2c/devices/18-0060/hwmon/hwmon19/fan2_present
I1024 14:48:41.984737  7774 PlatformExplorer.cpp:421] Going with PmUnit name `FAN` defined in config for /SMB_SLOT@0/FAN_SLOT@1
I1024 14:48:41.984748  7774 DataStore.cpp:108] At SlotPath /SMB_SLOT@0/FAN_SLOT@1, updating to PmUnit with name: FAN
I1024 14:48:41.984752  7774 DataStore.cpp:148] Resolved /SMB_SLOT@0/FAN_SLOT@1 to default PmUnitConfig of FAN. No ProductSubversion was read from IDPROM at the slotPath.
I1024 14:48:41.984756  7774 PlatformExplorer.cpp:182] Exploring PmUnit FAN at /SMB_SLOT@0/FAN_SLOT@1
I1024 14:48:41.984760  7774 PlatformExplorer.cpp:185] Exploring PCI Devices for PmUnit FAN at SlotPath /SMB_SLOT@0/FAN_SLOT@1. Count 0
I1024 14:48:41.984763  7774 PlatformExplorer.cpp:192] Exploring I2C Devices for PmUnit FAN at SlotPath /SMB_SLOT@0/FAN_SLOT@1. Count 0
I1024 14:48:41.984767  7774 PlatformExplorer.cpp:215] Exploring Slots for PmUnit FAN at SlotPath /SMB_SLOT@0/FAN_SLOT@1. Count 0
I1024 14:48:41.984771  7774 PlatformExplorer.cpp:231] Exploring SlotPath /SMB_SLOT@0/FAN_SLOT@2
I1024 14:48:41.984775  7774 DevicePathResolver.cpp:168] Resolving SysfsPath for DevicePath /SMB_SLOT@0/[FAN_CPLD]
I1024 14:48:41.984816  7774 DevicePathResolver.cpp:183] Resolved PresencePath to /sys/bus/i2c/devices/18-0060/hwmon/hwmon19/fan3_present
I1024 14:48:41.984821  7774 DevicePathResolver.cpp:168] Resolving SysfsPath for DevicePath /SMB_SLOT@0/[FAN_CPLD]
I1024 14:48:41.984850  7774 DevicePathResolver.cpp:183] Resolved PresencePath to /sys/bus/i2c/devices/18-0060/hwmon/hwmon19/fan3_present
I1024 14:48:41.984854  7774 PresenceChecker.cpp:50] The file fan3_present at DevicePath /SMB_SLOT@0/[FAN_CPLD] resolves to /sys/bus/i2c/devices/18-0060/hwmon/hwmon19/fan3_present
I1024 14:48:41.988743  7774 PresenceChecker.cpp:91] Value at /sys/bus/i2c/devices/18-0060/hwmon/hwmon19/fan3_present is 1. desiredValue is 1. Assuming presence of PmUnit at /SMB_SLOT@0/FAN_SLOT@2
I1024 14:48:41.988756  7774 DevicePathResolver.cpp:168] Resolving SysfsPath for DevicePath /SMB_SLOT@0/[FAN_CPLD]
I1024 14:48:41.988828  7774 DevicePathResolver.cpp:183] Resolved PresencePath to /sys/bus/i2c/devices/18-0060/hwmon/hwmon19/fan3_present
I1024 14:48:41.988838  7774 PresenceChecker.cpp:50] The file fan3_present at DevicePath /SMB_SLOT@0/[FAN_CPLD] resolves to /sys/bus/i2c/devices/18-0060/hwmon/hwmon19/fan3_present
I1024 14:48:41.991739  7774 PlatformExplorer.cpp:421] Going with PmUnit name `FAN` defined in config for /SMB_SLOT@0/FAN_SLOT@2
I1024 14:48:41.991750  7774 DataStore.cpp:108] At SlotPath /SMB_SLOT@0/FAN_SLOT@2, updating to PmUnit with name: FAN
I1024 14:48:41.991759  7774 DataStore.cpp:148] Resolved /SMB_SLOT@0/FAN_SLOT@2 to default PmUnitConfig of FAN. No ProductSubversion was read from IDPROM at the slotPath.
I1024 14:48:41.991767  7774 PlatformExplorer.cpp:182] Exploring PmUnit FAN at /SMB_SLOT@0/FAN_SLOT@2
I1024 14:48:41.991775  7774 PlatformExplorer.cpp:185] Exploring PCI Devices for PmUnit FAN at SlotPath /SMB_SLOT@0/FAN_SLOT@2. Count 0
I1024 14:48:41.991782  7774 PlatformExplorer.cpp:192] Exploring I2C Devices for PmUnit FAN at SlotPath /SMB_SLOT@0/FAN_SLOT@2. Count 0
I1024 14:48:41.991790  7774 PlatformExplorer.cpp:215] Exploring Slots for PmUnit FAN at SlotPath /SMB_SLOT@0/FAN_SLOT@2. Count 0
I1024 14:48:41.991798  7774 PlatformExplorer.cpp:231] Exploring SlotPath /SMB_SLOT@0/FAN_SLOT@3
I1024 14:48:41.991807  7774 DevicePathResolver.cpp:168] Resolving SysfsPath for DevicePath /SMB_SLOT@0/[FAN_CPLD]
I1024 14:48:41.991879  7774 DevicePathResolver.cpp:183] Resolved PresencePath to /sys/bus/i2c/devices/18-0060/hwmon/hwmon19/fan4_present
I1024 14:48:41.991888  7774 DevicePathResolver.cpp:168] Resolving SysfsPath for DevicePath /SMB_SLOT@0/[FAN_CPLD]
I1024 14:48:41.991950  7774 DevicePathResolver.cpp:183] Resolved PresencePath to /sys/bus/i2c/devices/18-0060/hwmon/hwmon19/fan4_present
I1024 14:48:41.991959  7774 PresenceChecker.cpp:50] The file fan4_present at DevicePath /SMB_SLOT@0/[FAN_CPLD] resolves to /sys/bus/i2c/devices/18-0060/hwmon/hwmon19/fan4_present
I1024 14:48:41.995746  7774 PresenceChecker.cpp:91] Value at /sys/bus/i2c/devices/18-0060/hwmon/hwmon19/fan4_present is 1. desiredValue is 1. Assuming presence of PmUnit at /SMB_SLOT@0/FAN_SLOT@3
I1024 14:48:41.995761  7774 DevicePathResolver.cpp:168] Resolving SysfsPath for DevicePath /SMB_SLOT@0/[FAN_CPLD]
I1024 14:48:41.995831  7774 DevicePathResolver.cpp:183] Resolved PresencePath to /sys/bus/i2c/devices/18-0060/hwmon/hwmon19/fan4_present
I1024 14:48:41.995841  7774 PresenceChecker.cpp:50] The file fan4_present at DevicePath /SMB_SLOT@0/[FAN_CPLD] resolves to /sys/bus/i2c/devices/18-0060/hwmon/hwmon19/fan4_present
I1024 14:48:41.998747  7774 PlatformExplorer.cpp:421] Going with PmUnit name `FAN` defined in config for /SMB_SLOT@0/FAN_SLOT@3
I1024 14:48:41.998759  7774 DataStore.cpp:108] At SlotPath /SMB_SLOT@0/FAN_SLOT@3, updating to PmUnit with name: FAN
I1024 14:48:41.998767  7774 DataStore.cpp:148] Resolved /SMB_SLOT@0/FAN_SLOT@3 to default PmUnitConfig of FAN. No ProductSubversion was read from IDPROM at the slotPath.
I1024 14:48:41.998776  7774 PlatformExplorer.cpp:182] Exploring PmUnit FAN at /SMB_SLOT@0/FAN_SLOT@3
I1024 14:48:41.998783  7774 PlatformExplorer.cpp:185] Exploring PCI Devices for PmUnit FAN at SlotPath /SMB_SLOT@0/FAN_SLOT@3. Count 0
I1024 14:48:41.998790  7774 PlatformExplorer.cpp:192] Exploring I2C Devices for PmUnit FAN at SlotPath /SMB_SLOT@0/FAN_SLOT@3. Count 0
I1024 14:48:41.998798  7774 PlatformExplorer.cpp:215] Exploring Slots for PmUnit FAN at SlotPath /SMB_SLOT@0/FAN_SLOT@3. Count 0
I1024 14:48:41.998806  7774 PlatformExplorer.cpp:231] Exploring SlotPath /SMB_SLOT@0/FAN_SLOT@4
I1024 14:48:41.998814  7774 DevicePathResolver.cpp:168] Resolving SysfsPath for DevicePath /SMB_SLOT@0/[FAN_CPLD]
I1024 14:48:41.998888  7774 DevicePathResolver.cpp:183] Resolved PresencePath to /sys/bus/i2c/devices/18-0060/hwmon/hwmon19/fan5_present
I1024 14:48:41.998897  7774 DevicePathResolver.cpp:168] Resolving SysfsPath for DevicePath /SMB_SLOT@0/[FAN_CPLD]
I1024 14:48:41.998959  7774 DevicePathResolver.cpp:183] Resolved PresencePath to /sys/bus/i2c/devices/18-0060/hwmon/hwmon19/fan5_present
I1024 14:48:41.998968  7774 PresenceChecker.cpp:50] The file fan5_present at DevicePath /SMB_SLOT@0/[FAN_CPLD] resolves to /sys/bus/i2c/devices/18-0060/hwmon/hwmon19/fan5_present
I1024 14:48:42.002225  7774 PresenceChecker.cpp:91] Value at /sys/bus/i2c/devices/18-0060/hwmon/hwmon19/fan5_present is 1. desiredValue is 1. Assuming presence of PmUnit at /SMB_SLOT@0/FAN_SLOT@4
I1024 14:48:42.002236  7774 DevicePathResolver.cpp:168] Resolving SysfsPath for DevicePath /SMB_SLOT@0/[FAN_CPLD]
I1024 14:48:42.002305  7774 DevicePathResolver.cpp:183] Resolved PresencePath to /sys/bus/i2c/devices/18-0060/hwmon/hwmon19/fan5_present
I1024 14:48:42.002314  7774 PresenceChecker.cpp:50] The file fan5_present at DevicePath /SMB_SLOT@0/[FAN_CPLD] resolves to /sys/bus/i2c/devices/18-0060/hwmon/hwmon19/fan5_present
I1024 14:48:42.011401  7774 PlatformExplorer.cpp:421] Going with PmUnit name `FAN` defined in config for /SMB_SLOT@0/FAN_SLOT@4
I1024 14:48:42.011426  7774 DataStore.cpp:108] At SlotPath /SMB_SLOT@0/FAN_SLOT@4, updating to PmUnit with name: FAN
I1024 14:48:42.011437  7774 DataStore.cpp:148] Resolved /SMB_SLOT@0/FAN_SLOT@4 to default PmUnitConfig of FAN. No ProductSubversion was read from IDPROM at the slotPath.
I1024 14:48:42.011446  7774 PlatformExplorer.cpp:182] Exploring PmUnit FAN at /SMB_SLOT@0/FAN_SLOT@4
I1024 14:48:42.011454  7774 PlatformExplorer.cpp:185] Exploring PCI Devices for PmUnit FAN at SlotPath /SMB_SLOT@0/FAN_SLOT@4. Count 0
I1024 14:48:42.011463  7774 PlatformExplorer.cpp:192] Exploring I2C Devices for PmUnit FAN at SlotPath /SMB_SLOT@0/FAN_SLOT@4. Count 0
I1024 14:48:42.011471  7774 PlatformExplorer.cpp:215] Exploring Slots for PmUnit FAN at SlotPath /SMB_SLOT@0/FAN_SLOT@4. Count 0
I1024 14:48:42.011481  7774 PlatformExplorer.cpp:231] Exploring SlotPath /SMB_SLOT@0/FAN_SLOT@5
I1024 14:48:42.011493  7774 DevicePathResolver.cpp:168] Resolving SysfsPath for DevicePath /SMB_SLOT@0/[FAN_CPLD]
I1024 14:48:42.011586  7774 DevicePathResolver.cpp:183] Resolved PresencePath to /sys/bus/i2c/devices/18-0060/hwmon/hwmon19/fan6_present
I1024 14:48:42.011596  7774 DevicePathResolver.cpp:168] Resolving SysfsPath for DevicePath /SMB_SLOT@0/[FAN_CPLD]
I1024 14:48:42.011664  7774 DevicePathResolver.cpp:183] Resolved PresencePath to /sys/bus/i2c/devices/18-0060/hwmon/hwmon19/fan6_present
I1024 14:48:42.011675  7774 PresenceChecker.cpp:50] The file fan6_present at DevicePath /SMB_SLOT@0/[FAN_CPLD] resolves to /sys/bus/i2c/devices/18-0060/hwmon/hwmon19/fan6_present
I1024 14:48:42.016337  7774 PresenceChecker.cpp:91] Value at /sys/bus/i2c/devices/18-0060/hwmon/hwmon19/fan6_present is 1. desiredValue is 1. Assuming presence of PmUnit at /SMB_SLOT@0/FAN_SLOT@5
I1024 14:48:42.016352  7774 DevicePathResolver.cpp:168] Resolving SysfsPath for DevicePath /SMB_SLOT@0/[FAN_CPLD]
I1024 14:48:42.016428  7774 DevicePathResolver.cpp:183] Resolved PresencePath to /sys/bus/i2c/devices/18-0060/hwmon/hwmon19/fan6_present
I1024 14:48:42.016441  7774 PresenceChecker.cpp:50] The file fan6_present at DevicePath /SMB_SLOT@0/[FAN_CPLD] resolves to /sys/bus/i2c/devices/18-0060/hwmon/hwmon19/fan6_present
I1024 14:48:42.120936  7774 PlatformExplorer.cpp:421] Going with PmUnit name `FAN` defined in config for /SMB_SLOT@0/FAN_SLOT@5
I1024 14:48:42.120965  7774 DataStore.cpp:108] At SlotPath /SMB_SLOT@0/FAN_SLOT@5, updating to PmUnit with name: FAN
I1024 14:48:42.120975  7774 DataStore.cpp:148] Resolved /SMB_SLOT@0/FAN_SLOT@5 to default PmUnitConfig of FAN. No ProductSubversion was read from IDPROM at the slotPath.
I1024 14:48:42.120985  7774 PlatformExplorer.cpp:182] Exploring PmUnit FAN at /SMB_SLOT@0/FAN_SLOT@5
I1024 14:48:42.120993  7774 PlatformExplorer.cpp:185] Exploring PCI Devices for PmUnit FAN at SlotPath /SMB_SLOT@0/FAN_SLOT@5. Count 0
I1024 14:48:42.121001  7774 PlatformExplorer.cpp:192] Exploring I2C Devices for PmUnit FAN at SlotPath /SMB_SLOT@0/FAN_SLOT@5. Count 0
I1024 14:48:42.121009  7774 PlatformExplorer.cpp:215] Exploring Slots for PmUnit FAN at SlotPath /SMB_SLOT@0/FAN_SLOT@5. Count 0
I1024 14:48:42.121018  7774 PlatformExplorer.cpp:231] Exploring SlotPath /SMB_SLOT@0/FAN_SLOT@6
I1024 14:48:42.121029  7774 DevicePathResolver.cpp:168] Resolving SysfsPath for DevicePath /SMB_SLOT@0/[FAN_CPLD]
I1024 14:48:42.121127  7774 DevicePathResolver.cpp:183] Resolved PresencePath to /sys/bus/i2c/devices/18-0060/hwmon/hwmon19/fan7_present
I1024 14:48:42.121138  7774 DevicePathResolver.cpp:168] Resolving SysfsPath for DevicePath /SMB_SLOT@0/[FAN_CPLD]
I1024 14:48:42.121203  7774 DevicePathResolver.cpp:183] Resolved PresencePath to /sys/bus/i2c/devices/18-0060/hwmon/hwmon19/fan7_present
I1024 14:48:42.121212  7774 PresenceChecker.cpp:50] The file fan7_present at DevicePath /SMB_SLOT@0/[FAN_CPLD] resolves to /sys/bus/i2c/devices/18-0060/hwmon/hwmon19/fan7_present
I1024 14:48:42.123747  7774 PresenceChecker.cpp:91] Value at /sys/bus/i2c/devices/18-0060/hwmon/hwmon19/fan7_present is 1. desiredValue is 1. Assuming presence of PmUnit at /SMB_SLOT@0/FAN_SLOT@6
I1024 14:48:42.123760  7774 DevicePathResolver.cpp:168] Resolving SysfsPath for DevicePath /SMB_SLOT@0/[FAN_CPLD]
I1024 14:48:42.123833  7774 DevicePathResolver.cpp:183] Resolved PresencePath to /sys/bus/i2c/devices/18-0060/hwmon/hwmon19/fan7_present
I1024 14:48:42.123843  7774 PresenceChecker.cpp:50] The file fan7_present at DevicePath /SMB_SLOT@0/[FAN_CPLD] resolves to /sys/bus/i2c/devices/18-0060/hwmon/hwmon19/fan7_present
I1024 14:48:42.126558  7774 PlatformExplorer.cpp:421] Going with PmUnit name `FAN` defined in config for /SMB_SLOT@0/FAN_SLOT@6
I1024 14:48:42.126570  7774 DataStore.cpp:108] At SlotPath /SMB_SLOT@0/FAN_SLOT@6, updating to PmUnit with name: FAN
I1024 14:48:42.126579  7774 DataStore.cpp:148] Resolved /SMB_SLOT@0/FAN_SLOT@6 to default PmUnitConfig of FAN. No ProductSubversion was read from IDPROM at the slotPath.
I1024 14:48:42.126587  7774 PlatformExplorer.cpp:182] Exploring PmUnit FAN at /SMB_SLOT@0/FAN_SLOT@6
I1024 14:48:42.126594  7774 PlatformExplorer.cpp:185] Exploring PCI Devices for PmUnit FAN at SlotPath /SMB_SLOT@0/FAN_SLOT@6. Count 0
I1024 14:48:42.126602  7774 PlatformExplorer.cpp:192] Exploring I2C Devices for PmUnit FAN at SlotPath /SMB_SLOT@0/FAN_SLOT@6. Count 0
I1024 14:48:42.126609  7774 PlatformExplorer.cpp:215] Exploring Slots for PmUnit FAN at SlotPath /SMB_SLOT@0/FAN_SLOT@6. Count 0
I1024 14:48:42.126618  7774 PlatformExplorer.cpp:231] Exploring SlotPath /SMB_SLOT@0/FAN_SLOT@7
I1024 14:48:42.126627  7774 DevicePathResolver.cpp:168] Resolving SysfsPath for DevicePath /SMB_SLOT@0/[FAN_CPLD]
I1024 14:48:42.126715  7774 DevicePathResolver.cpp:183] Resolved PresencePath to /sys/bus/i2c/devices/18-0060/hwmon/hwmon19/fan8_present
I1024 14:48:42.126725  7774 DevicePathResolver.cpp:168] Resolving SysfsPath for DevicePath /SMB_SLOT@0/[FAN_CPLD]
I1024 14:48:42.126789  7774 DevicePathResolver.cpp:183] Resolved PresencePath to /sys/bus/i2c/devices/18-0060/hwmon/hwmon19/fan8_present
I1024 14:48:42.126799  7774 PresenceChecker.cpp:50] The file fan8_present at DevicePath /SMB_SLOT@0/[FAN_CPLD] resolves to /sys/bus/i2c/devices/18-0060/hwmon/hwmon19/fan8_present
I1024 14:48:42.129736  7774 PresenceChecker.cpp:91] Value at /sys/bus/i2c/devices/18-0060/hwmon/hwmon19/fan8_present is 1. desiredValue is 1. Assuming presence of PmUnit at /SMB_SLOT@0/FAN_SLOT@7
I1024 14:48:42.129748  7774 DevicePathResolver.cpp:168] Resolving SysfsPath for DevicePath /SMB_SLOT@0/[FAN_CPLD]
I1024 14:48:42.129820  7774 DevicePathResolver.cpp:183] Resolved PresencePath to /sys/bus/i2c/devices/18-0060/hwmon/hwmon19/fan8_present
I1024 14:48:42.129831  7774 PresenceChecker.cpp:50] The file fan8_present at DevicePath /SMB_SLOT@0/[FAN_CPLD] resolves to /sys/bus/i2c/devices/18-0060/hwmon/hwmon19/fan8_present
I1024 14:48:42.131558  7774 PlatformExplorer.cpp:421] Going with PmUnit name `FAN` defined in config for /SMB_SLOT@0/FAN_SLOT@7
I1024 14:48:42.131569  7774 DataStore.cpp:108] At SlotPath /SMB_SLOT@0/FAN_SLOT@7, updating to PmUnit with name: FAN
I1024 14:48:42.131578  7774 DataStore.cpp:148] Resolved /SMB_SLOT@0/FAN_SLOT@7 to default PmUnitConfig of FAN. No ProductSubversion was read from IDPROM at the slotPath.
I1024 14:48:42.131586  7774 PlatformExplorer.cpp:182] Exploring PmUnit FAN at /SMB_SLOT@0/FAN_SLOT@7
I1024 14:48:42.131594  7774 PlatformExplorer.cpp:185] Exploring PCI Devices for PmUnit FAN at SlotPath /SMB_SLOT@0/FAN_SLOT@7. Count 0
I1024 14:48:42.131601  7774 PlatformExplorer.cpp:192] Exploring I2C Devices for PmUnit FAN at SlotPath /SMB_SLOT@0/FAN_SLOT@7. Count 0
I1024 14:48:42.131609  7774 PlatformExplorer.cpp:215] Exploring Slots for PmUnit FAN at SlotPath /SMB_SLOT@0/FAN_SLOT@7. Count 0

There are no errors reported. From the log, we can see that all fan slots are now correctly identified as present, and the improvement only added 150ms of time to the total device exploration time:

I1024 14:48:41.820103  7774 DevicePathResolver.cpp:168] Resolving SysfsPath for DevicePath /SMB_SLOT@0/[FAN_CPLD]
I1024 14:48:41.830277  7774 DevicePathResolver.cpp:74] Waiting for sensor device for /SMB_SLOT@0/[FAN_CPLD] (retry 1, elapsed 10 ms)
I1024 14:48:41.970785  7774 DevicePathResolver.cpp:52] Found sensor device for /SMB_SLOT@0/[FAN_CPLD] after 4 retries (150 ms)

Here's the sysfs sequence during the platform_manager exploration, where the hwmon endpoint takes 139ms to enumerate:

2025-10-24 14:48:41.764 - no fan_cpld device created yet 
2025-10-24 14:48:41.768 - fan_cpld device created, no hwmon subsystem yet 
2025-10-24 14:48:41.907 - hwmon subsystem created

@meta-cla meta-cla bot added the CLA Signed label Jan 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant