On doca3.3.0-ubuntu2404, after rebooting the server, the openibd service fails to start properly, with missing advanced module loading

After rebooting the device, check the openibd service:

root@jg04-11u-is-h20-3:~# systemctl status openibd.service
× openibd.service - openibd - configure Mellanox devices
Loaded: loaded (/usr/lib/systemd/system/openibd.service; enabled; preset: enabled)
Active: failed (Result: exit-code) since Fri 2026-05-08 02:13:28 UTC; 5h 3min ago
Docs: file:/etc/infiniband/openib.conf
Main PID: 2712 (code=exited, status=1/FAILURE)
CPU: 1.337s

May 08 02:13:27 jg04-11u-is-h20-3 systemd[1]: Starting openibd.service - openibd - configure Mellanox devices…
May 08 02:13:27 jg04-11u-is-h20-3 root[2727]: openibd: running in manual mode
May 08 02:13:27 jg04-11u-is-h20-3 root[3152]: openibd: start(): Detected loaded old version of module ‘mlx5_core’.
May 08 02:13:27 jg04-11u-is-h20-3 root[3154]: openibd: Calling stop…
May 08 02:13:28 jg04-11u-is-h20-3 openibd[2712]: [32B blob data]
May 08 02:13:28 jg04-11u-is-h20-3 openibd[2712]: rmmod: ERROR: Module mlx5_core is in use
May 08 02:13:28 jg04-11u-is-h20-3 systemd[1]: openibd.service: Main process exited, code=exited, status=1/FAILURE
May 08 02:13:28 jg04-11u-is-h20-3 systemd[1]: openibd.service: Failed with result ‘exit-code’.
May 08 02:13:28 jg04-11u-is-h20-3 systemd[1]: Failed to start openibd.service - openibd - configure Mellanox devices.
May 08 02:13:28 jg04-11u-is-h20-3 systemd[1]: openibd.service: Consumed 1.337s CPU time.
root@jg04-11u-is-h20-3:~#

Service startup failed.

root@jg04-11u-is-h20-3:~# lsmod | grep ib
mlx5_ib 561152 0
ib_uverbs 208896 1 mlx5_ib
macsec 77824 1 mlx5_ib
mlx5_core 3158016 2 mlx5_fwctl,mlx5_ib
ib_core 528384 2 ib_uverbs,mlx5_ib
mlx_compat 12288 7 mlxdevm,mlx5_fwctl,fwctl,ib_core,ib_uverbs,mlx5_ib,mlx5_core
libahci 53248 1 ahci
root@jg04-11u-is-h20-3:~#

Check for missing module loading.
Check related log information.

root@jg04-11u-is-h20-3:~# dmesg | grep -E “mlx5_core|ib_ipoib” | head -20
[ 28.412741] mlx5_core 0000:29:00.0: firmware version: 28.47.2682
[ 28.412851] mlx5_core 0000:29:00.0: 504.112 Gb/s available PCIe bandwidth (32.0 GT/s PCIe x16 link)
[ 28.732960] mlx5_core 0000:29:00.0: Flow counters bulk query buffer size increased, bulk_query_len(8)
[ 28.747710] mlx5_core 0000:29:00.0: Port module event: module 0, Cable plugged
[ 28.749131] mlx5_core 0000:29:00.0: mlx5_pcie_event:329:(pid 1211): Detected insufficient power on the PCIe slot (27W).
[ 28.756254] mlx5_core 0000:3b:00.0: firmware version: 28.47.2682
[ 28.756676] mlx5_core 0000:3b:00.0: 504.112 Gb/s available PCIe bandwidth (32.0 GT/s PCIe x16 link)
[ 29.089065] mlx5_core 0000:3b:00.0: E-Switch: Total vports 18, per vport: max uc(128) max mc(2048)
[ 29.098350] mlx5_core 0000:3b:00.0: Flow counters bulk query buffer size increased, bulk_query_len(8)
[ 29.111801] mlx5_core 0000:3b:00.0: Port module event: module 0, Cable plugged
[ 29.113375] mlx5_core 0000:3b:00.0: mlx5_pcie_event:329:(pid 3180): Detected insufficient power on the PCIe slot (27W).
[ 29.233182] mlx5_core 0000:3b:00.0: MLX5E: StrdRq(1) RqSz(8) StrdSz(2048) RxCqeCmprss(0 enhanced)
[ 29.245921] mlx5_core 0000:3b:00.1: firmware version: 28.47.2682
[ 29.246250] mlx5_core 0000:3b:00.1: 504.112 Gb/s available PCIe bandwidth (32.0 GT/s PCIe x16 link)
[ 29.579071] mlx5_core 0000:3b:00.1: Flow counters bulk query buffer size increased, bulk_query_len(8)
[ 29.595365] mlx5_core 0000:3b:00.1: Port module event: module 1, Cable plugged
[ 29.596826] mlx5_core 0000:3b:00.1: mlx5_pcie_event:329:(pid 3209): Detected insufficient power on the PCIe slot (27W).
[ 29.603301] mlx5_core 0000:4b:00.0: firmware version: 28.47.2682
[ 29.603801] mlx5_core 0000:4b:00.0: 504.112 Gb/s available PCIe bandwidth (32.0 GT/s PCIe x16 link)
[ 29.920358] mlx5_core 0000:4b:00.0: Flow counters bulk query buffer size increased, bulk_query_len(8)
root@jg04-11u-is-h20-3:~# journalctl -k -b --since “2026-05-08 02:13:20” --until “2026-05-08 02:13:30” | grep -E “mlx5|openib|rmmod”
May 08 02:13:27 jg04-11u-is-h20-3 kernel: mlx5_core 0000:29:00.0: firmware version: 28.47.2682
May 08 02:13:27 jg04-11u-is-h20-3 kernel: mlx5_core 0000:29:00.0: 504.112 Gb/s available PCIe bandwidth (32.0 GT/s PCIe x16 link)
May 08 02:13:27 jg04-11u-is-h20-3 kernel: mlx5_core 0000:29:00.0: Flow counters bulk query buffer size increased, bulk_query_len(8)
May 08 02:13:27 jg04-11u-is-h20-3 kernel: mlx5_core 0000:29:00.0: Port module event: module 0, Cable plugged
May 08 02:13:27 jg04-11u-is-h20-3 kernel: mlx5_core 0000:29:00.0: mlx5_pcie_event:329:(pid 1211): Detected insufficient power on the PCIe slot (27W).
May 08 02:13:27 jg04-11u-is-h20-3 kernel: mlx5_core 0000:3b:00.0: firmware version: 28.47.2682
May 08 02:13:27 jg04-11u-is-h20-3 kernel: mlx5_core 0000:3b:00.0: 504.112 Gb/s available PCIe bandwidth (32.0 GT/s PCIe x16 link)
May 08 02:13:28 jg04-11u-is-h20-3 kernel: mlx5_core 0000:3b:00.0: E-Switch: Total vports 18, per vport: max uc(128) max mc(2048)
May 08 02:13:28 jg04-11u-is-h20-3 kernel: mlx5_core 0000:3b:00.0: Flow counters bulk query buffer size increased, bulk_query_len(8)
May 08 02:13:28 jg04-11u-is-h20-3 kernel: mlx5_core 0000:3b:00.0: Port module event: module 0, Cable plugged
May 08 02:13:28 jg04-11u-is-h20-3 kernel: mlx5_core 0000:3b:00.0: mlx5_pcie_event:329:(pid 3180): Detected insufficient power on the PCIe slot (27W).
May 08 02:13:28 jg04-11u-is-h20-3 kernel: mlx5_core 0000:3b:00.0: MLX5E: StrdRq(1) RqSz(8) StrdSz(2048) RxCqeCmprss(0 enhanced)
May 08 02:13:28 jg04-11u-is-h20-3 kernel: mlx5_core 0000:3b:00.1: firmware version: 28.47.2682
May 08 02:13:28 jg04-11u-is-h20-3 kernel: mlx5_core 0000:3b:00.1: 504.112 Gb/s available PCIe bandwidth (32.0 GT/s PCIe x16 link)
May 08 02:13:28 jg04-11u-is-h20-3 kernel: mlx5_core 0000:3b:00.1: Flow counters bulk query buffer size increased, bulk_query_len(8)
May 08 02:13:28 jg04-11u-is-h20-3 kernel: mlx5_core 0000:3b:00.1: Port module event: module 1, Cable plugged
May 08 02:13:28 jg04-11u-is-h20-3 kernel: mlx5_core 0000:3b:00.1: mlx5_pcie_event:329:(pid 3209): Detected insufficient power on the PCIe slot (27W).
May 08 02:13:28 jg04-11u-is-h20-3 kernel: mlx5_core 0000:4b:00.0: firmware version: 28.47.2682
May 08 02:13:28 jg04-11u-is-h20-3 kernel: mlx5_core 0000:4b:00.0: 504.112 Gb/s available PCIe bandwidth (32.0 GT/s PCIe x16 link)
May 08 02:13:29 jg04-11u-is-h20-3 kernel: mlx5_core 0000:4b:00.0: Flow counters bulk query buffer size increased, bulk_query_len(8)
May 08 02:13:29 jg04-11u-is-h20-3 kernel: mlx5_core 0000:4b:00.0: Port module event: module 0, Cable plugged
May 08 02:13:29 jg04-11u-is-h20-3 kernel: mlx5_core 0000:4b:00.0: mlx5_pcie_event:329:(pid 12): Detected insufficient power on the PCIe slot (27W).
May 08 02:13:29 jg04-11u-is-h20-3 kernel: mlx5_core 0000:5d:00.0: firmware version: 28.47.2682
May 08 02:13:29 jg04-11u-is-h20-3 kernel: mlx5_core 0000:5d:00.0: 504.112 Gb/s available PCIe bandwidth (32.0 GT/s PCIe x16 link)
May 08 02:13:29 jg04-11u-is-h20-3 kernel: mlx5_core 0000:5d:00.0: E-Switch: Total vports 18, per vport: max uc(128) max mc(2048)
May 08 02:13:29 jg04-11u-is-h20-3 kernel: mlx5_core 0000:5d:00.0: Flow counters bulk query buffer size increased, bulk_query_len(8)
May 08 02:13:29 jg04-11u-is-h20-3 kernel: mlx5_core 0000:5d:00.0: Port module event: module 0, Cable plugged
May 08 02:13:29 jg04-11u-is-h20-3 kernel: mlx5_core 0000:5d:00.0: mlx5_pcie_event:329:(pid 12): Detected insufficient power on the PCIe slot (27W).
May 08 02:13:29 jg04-11u-is-h20-3 kernel: mlx5_core 0000:5d:00.0: MLX5E: StrdRq(1) RqSz(8) StrdSz(2048) RxCqeCmprss(0 enhanced)
May 08 02:13:29 jg04-11u-is-h20-3 kernel: mlx5_core 0000:5d:00.1: firmware version: 28.47.2682
May 08 02:13:29 jg04-11u-is-h20-3 kernel: mlx5_core 0000:5d:00.1: 504.112 Gb/s available PCIe bandwidth (32.0 GT/s PCIe x16 link)
May 08 02:13:29 jg04-11u-is-h20-3 kernel: mlx5_core 0000:5d:00.1: Flow counters bulk query buffer size increased, bulk_query_len(8)
May 08 02:13:29 jg04-11u-is-h20-3 kernel: mlx5_core 0000:5d:00.1: Port module event: module 1, Cable plugged
May 08 02:13:29 jg04-11u-is-h20-3 kernel: mlx5_core 0000:5d:00.1: mlx5_pcie_event:329:(pid 12): Detected insufficient power on the PCIe slot (27W).
root@jg04-11u-is-h20-3:~#

Could the experts please help analyze how to resolve this?

I ran into the same issue in my environment and wanted to share my findings in case they are helpful.

My servers are equipped with a relatively large number of Mellanox NICs. After reboot, openibd would occasionally fail during boot with:

rmmod: ERROR: Module mlx5_core is in use

As a result:

  • Some RDMA modules (e.g. ib_umad) were not loaded.

  • Running systemctl restart openibd.service restored the missing RDMA modules.

After investigating the systemd boot sequence, I found that adding stronger ordering constraints to openibd.service consistently resolved the issue in my environment.

Workaround

Create a systemd drop-in for openibd.service:

sudo systemctl edit openibd.service

Add the following content:

[Unit]
Before=network-pre.target
Before=systemd-networkd.service
Before=networkd-dispatcher.service
Wants=network-pre.target

Then reload the systemd configuration:

sudo systemctl daemon-reload

Finally, reboot the machine:

sudo reboot

After applying the change, I observed that:

  • openibd no longer failed during boot.

  • ib_umad and the other RDMA modules loaded correctly.

  • The issue has not reoccurred in my environment.

I have not yet identified the exact component holding a reference to mlx5_core, so this should be considered a workaround rather than a confirmed root cause. However, the fix has been stable in my environment.

Hopefully this helps others encountering the same issue.

update:
/etc/systemd/system/openibd.service.d/override.conf should be:

[Unit]
Wants=network-pre.target
After=systemd-udev-trigger.service
Before=network-pre.target systemd-networkd.service networkd-dispatcher.service network.target network.service networking.service remote-fs-pre.target
[Service]
ExecStartPre=/usr/bin/udevadm settle --timeout=60

and in my machine, doca version is doca-all/DOCA-HOST-3.2.1 and there is a bug, which should be fixed by

sed -i 's/global_init "$1"/global_init "$@"/' /etc/init.d/openibd