-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Description
Describe the bug
In Mesh implementation in net.c there is a ivu_timer that has a 24-hour timeout, yet it fires immediately causing invalid behavior of IV Update Procedure. After changing the timeout to 10 seconds the timer was behaving as expected. Possibly the large value of timeout is causing invalid behavior. I believe that this issue is related to the recent changes in k_timeout_t.
To Reproduce
Run MESH/NODE/IVU/BV-01-C test in PTS and follow the instructions.
It should be also possible to reproduce it by testing against another Zephyr node:
Provision two nodes. Enable IV Update test mode in both. Start IV Update procedure in one of them and observe the behavior of the other one.
I verified the invalid behavior by looking at debug logs.
Expected behavior
ivu_timer firing after 24 hour period.
Screenshots or console output
<snippet>
[00:00:17.298,980] <dbg> bt_mesh_beacon.secure_beacon_recv: net_idx 0x0000 iv_index 0x0000000b, current iv_index 0x0000000a
[00:00:17.298,980] <dbg> bt_mesh_net.bt_mesh_net_iv_update: IV Update state entered. New index 0x0000000b
[00:00:17.299,011] <dbg> bt_mesh_net.bt_mesh_net_beacon_update: NetIndex 0 Using current key
[00:00:17.299,041] <dbg> bt_mesh_net.bt_mesh_net_beacon_update: flags 0x02, IVI 0x0000000b
[00:00:17.299,530] <dbg> bt_mesh_net.ivu_refresh: IVU in Progress for 24 hours
[00:00:17.299,652] <dbg> bt_mesh_net.ivu_refresh: IVU in Progress for 48 hours
[00:00:17.299,865] <dbg> bt_mesh_net.ivu_refresh: IVU in Progress for 72 hours
[00:00:17.300,018] <dbg> bt_mesh_net.ivu_refresh: IVU in Progress for 96 hours
[00:00:17.300,048] <dbg> bt_mesh_net.bt_mesh_net_iv_update: Normal mode entered
[00:00:17.300,109] <dbg> bt_mesh_net.bt_mesh_net_beacon_update: NetIndex 0 Using current key
[00:00:17.300,109] <dbg> bt_mesh_net.bt_mesh_net_beacon_update: flags 0x00, IVI 0x0000000b
[00:00:17.300,567] <dbg> bt_mesh_beacon.beacon_send:
[00:00:17.300,567] <dbg> bt_mesh_beacon.secure_beacon_send:
[00:00:17.300,598] <dbg> bt_mesh_net.ivu_refresh: IVU Normal mode for 24 hours
[00:00:17.300,720] <dbg> bt_mesh_net.ivu_refresh: IVU Normal mode for 48 hours
[00:00:17.300,842] <dbg> bt_mesh_net.ivu_refresh: IVU Normal mode for 72 hours
[00:00:17.300,964] <dbg> bt_mesh_net.ivu_refresh: IVU Normal mode for 96 hours
</snippet>
Environment
- OS: Linux
- Toolchain: Zephyr SDK
- HW: nRF52840DK
- SHA: d96a1a5