CONFIG_MENDER_CLIENT_INVENTORY_NETWORK_INFO=y causes a Zephyr crash on nRF9151 DK

CONFIG_MENDER_CLIENT_INVENTORY_NETWORK_INFO=y causes a Zephyr crash on nRF9151 DK

We have observed a Zephyr FATAL ERROR on nRF9151 DK which uses mobile connectivity (LTE).

When CONFIG_MENDER_CLIENT_INVENTORY_NETWORK_INFO=y is enabled, the device boots, connects to LTE, initializes Mender, and completes the first deployment check. Right after that, Zephyr crashes with a secure fault when trying to collect network information for inventory.

With the option disabled, the same integration runs normally.

This is the log we get:

*** Booting nRF Connect SDK v3.2.1-d8887f6f32df ***
*** Using Zephyr OS v4.2.99-ec78104f1569 ***
[00:00:00.256,439] <inf> main: Starting LTE
[00:00:25.644,836] <inf> main: LTE connected
[00:00:25.644,897] <inf> mender: Device type: [nrf9151dk]
[00:00:25.649,200] <inf> main: Mender activated
[00:00:25.649,230] <inf> main:  V0.1
[00:00:25.649,536] <inf> mender: Initialization done
[00:00:25.649,566] <inf> mender: Checking for deployment...
[00:00:29.321,685] <inf> mender: No deployment available
[00:00:29.325,897] <err> os: ***** SECURE FAULT *****
[00:00:29.325,897] <err> os:   Address: 0x4
[00:00:29.325,927] <err> os:   Attribution unit violation
[00:00:29.325,927] <err> os: r0/a1:  0x200216b0  r1/a2:  0x00000000  r2/a3:  0x200216c0
[00:00:29.325,927] <err> os: r3/a4:  0x200216c0 r12/ip:  0x2001c294 r14/lr:  0x00022ba1
[00:00:29.325,958] <err> os:  xpsr:  0x61000000
[00:00:29.325,958] <err> os: Faulting instruction address (r15/pc): 0x00022c7e
[00:00:29.325,988] <err> os: >>> ZEPHYR FATAL ERROR 41: Unknown error on CPU 0
[00:00:29.326,019] <err> os: Current thread: 0x2000ea68 (unknown)
[00:00:29.600,402] <err> os: Halting system

To reproduce:

  1. Follow the setup and build instructions in this repository:
    README.md
  2. Before building, change this line in app/prj.conf:
    app/prj.conf#L64
  3. Change:
CONFIG_MENDER_CLIENT_INVENTORY_NETWORK_INFO=n

to:

CONFIG_MENDER_CLIENT_INVENTORY_NETWORK_INFO=y
  1. Build and flash the application.
  2. Let the device boot, connect to LTE, and complete the first Mender deployment check.
  3. Observe the secure fault right after No deployment available.

Environment:

  • Hardware: nRF9151 DK
  • nRF Connect SDK: v3.2.1-d8887f6f32df
  • Zephyr: v4.2.99-ec78104f1569

For now, our workaround is to keep:

CONFIG_MENDER_CLIENT_INVENTORY_NETWORK_INFO=n

Is this a known limitation or bug in the current mender-mcu network inventory path, or is there something specific we should change in the integration?

Hi Dexter9532, thanks for sharing this! We are not aware of the default network inventory code causing issues like this. We haven’t seen it happening on our reference board(s). The code is quite simple so it should be easy to make some changes helping to identify what exactly is going on. Note that the callback is added as a non-persistent one so there might potentially be some issue with ownership/allocation of some of the network info.