Skip to content

Bluetooth: Mesh: Assert in bt_mesh_adv_unref when sending 2 messages in a row to a proxy client #83904

@PavelVPV

Description

@PavelVPV

Describe the bug
After Bluetooth: Mesh: Introduce separate workq for ADV EXT by LingaoM · Pull Request #78914 · zephyrproject-rtos/zephyr the mesh device asserts in bt_mesh_adv_unref when sending 2 messages in a row to a proxy client: ASSERTION FAIL @ WEST_TOPDIR/zephyr/subsys/bluetooth/mesh/adv.c

There are 2 issues here. First, struct bt_mesh_adv::node variable is shared among 2 FIFOs: one in adv.c and the other one in proxy_msg.c. Second, is the node type should be void * : FIFOs — Zephyr Project Documentation, zephyr/include/zephyr/kernel.h at 0728f5d0e27ed1d1274f1c82b2bdc0ffd31d2aee · zephyrproject-rtos/zephyr but not sys_snode_t (or at least sys_sfnode_t).

The temporary fix is to define a separate variable for the proxy FIFO.

To Reproduce

  1. Provision a mesh device using nRF Mesh app for smartphone
  2. Send any 2 messages in a row to the proxy client (smartphone)
  3. Observe the assertion

Expected behavior
No assertion happens and all messages are sent to the proxy client.

Impact
Proxy feature is broken in Zephyr 4.0.0+

Metadata

Metadata

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions