NVMe Emulation: Failed to Modify Stateful Region

When trying to create a DOCA transport using the NVMe emulation reference application I run into the following error

[11:52:59.574754][14604][DOCA][ERR][doca_devemu_pci_dev.cpp:2434][doca_devemu_pci_type_modify_bar_stateful_region_default_values] exception occurred:
[11:52:59.574877][14604][DOCA][ERR][doca_devemu_pci_dev.cpp:2434][doca_devemu_pci_type_modify_bar_stateful_region_default_values] DOCA exception [DOCA_ERROR_DRIVER]
with message Failed to send generic message
[11:52:59.574909][14604][DOCA][ERR][doca_transport.c:476][spdk_nvmef_doca_pci_type_create_and_start] Failed to modify bar stateful region: DOCA_ERROR_DRIVER
[11:52:59.575065][14604][DOCA][ERR][doca_transport.c:519][doca_create_emulation_manager] Failed to initialize PCI type: DOCA_ERROR_DRIVER
[11:52:59.575077][14604][DOCA][ERR][doca_devemu_pci_type.cpp:357][doca_devemu_pci_type_stop] doca_devemu_pci_type_stop failed: type name 'NVME Type': type already stopped
[11:52:59.575088][14604][DOCA][ERR][nvme_pci_common.c:285][cleanup_pci_resources] Failed to stop DOCA Emulated PCI Type: Bad State
[11:52:59.575101][14604][DOCA][ERR][doca_transport.c:639][spdk_nvmef_doca_create] Emulation manager initialization failed: DOCA_ERROR_DRIVER
[11:52:59.578580][2025-04-30 11:52:59.578580] transport.c:239:spdk_nvmef_transport_create: *ERROR*: Unable to create new transport of type doca
[11:52:59.578664][2025-04-30 11:52:59.578664] nvmef_rpc.c:1996:rpc_nvmef_create_transport: *ERROR*: Transport type 'doca' create failed

The commands I’m running are

sudo PYTHONPATH=/opt/mellanox/doca/applications/nvme_emulation /usr/bin/spdk_rpc.py --plugin rpc_nvmf_doca nvmf_doca_create_function -d mlx5_0
sudo PYTHONPATH=/opt/mellanox/doca/applications/nvme_emulation /usr/bin/spdk_rpc.py nvmf_create_transport -t doca -u 8192 -i 131072 -c 819

DOCA Version 2.10.0
Ubuntu 22.04
Kernel 5.15.0-25-generic

Does anyone know how I might fix it? I can see that we’re failing after trying to update the default values of the stateful region.

Hi, I encountered the same problem.
Has this issue been resolved?