openthread: What situations may cause otPlatSettingsGet Failure?
Describe the bug A clear and concise description of what the bug is. When otPlatSettingsGet Failure occurs, otbr-agent will restart. We don’t know what situations will cause otPlatSettingsGet Failure.
Thu Sep 5 13:57:25 2024 user.warn otbr-agent[2911]: 1d.00:11:43.738 [W] Mle-----------: Failed to process UDP: Security
Thu Sep 5 13:57:27 2024 user.warn otbr-agent[2911]: 1d.00:11:46.191 [W] P-Daemon------: Daemon read: Connection reset by peer
Thu Sep 5 13:57:27 2024 user.warn otbr-agent[2911]: 1d.00:11:46.211 [W] P-Daemon------: Daemon read: Connection reset by peer
Thu Sep 5 13:57:27 2024 user.warn otbr-agent[2911]: 1d.00:11:46.238 [W] P-Daemon------: Daemon read: Connection reset by peer
Thu Sep 5 13:57:34 2024 user.warn otbr-agent[2911]: 1d.00:11:53.303 [W] Mle-----------: Failed to process UDP: Security
Thu Sep 5 13:57:48 2024 user.warn otbr-agent[2911]: 1d.00:12:07.191 [W] Mle-----------: Failed to process UDP: Security
Thu Sep 5 13:58:03 2024 user.warn otbr-agent[2911]: 1d.00:12:21.592 [W] Mle-----------: Failed to process UDP: Security
Thu Sep 5 13:58:15 2024 user.warn otbr-agent[2911]: 1d.00:12:34.406 [W] Mle-----------: Failed to process UDP: Security
Thu Sep 5 13:58:16 2024 user.warn otbr-agent[2911]: 1d.00:12:35.327 [W] Mle-----------: Failed to process UDP: Duplicated
Thu Sep 5 13:58:17 2024 user.warn otbr-agent[2911]: 1d.00:12:36.383 [W] Mle-----------: Failed to process UDP: Duplicated
Thu Sep 5 13:58:26 2024 user.warn otbr-agent[2911]: 1d.00:12:45.014 [W] Mle-----------: Failed to process UDP: Security
Thu Sep 5 13:58:36 2024 user.warn otbr-agent[2911]: 1d.00:12:55.167 [W] Mle-----------: Failed to process UDP: Security
Thu Sep 5 13:58:47 2024 user.warn otbr-agent[2911]: 1d.00:13:06.443 [W] Mle-----------: Failed to process UDP: Security
Thu Sep 5 13:59:03 2024 user.warn otbr-agent[2911]: 1d.00:13:22.240 [W] Mle-----------: Failed to process UDP: Security
Thu Sep 5 13:59:15 2024 user.warn otbr-agent[2911]: 1d.00:13:34.335 [W] Mle-----------: Failed to process UDP: Security
Thu Sep 5 13:59:25 2024 user.warn otbr-agent[2911]: 1d.00:13:44.330 [W] Mle-----------: Failed to process UDP: Security
Thu Sep 5 13:59:34 2024 user.warn otbr-agent[2911]: 1d.00:13:52.860 [W] Mle-----------: Failed to process UDP: Security
Thu Sep 5 13:59:50 2024 user.warn otbr-agent[2911]: 1d.00:14:09.522 [W] Mle-----------: Failed to process UDP: Security
Thu Sep 5 13:59:59 2024 user.warn otbr-agent[2911]: 1d.00:14:18.290 [W] Mle-----------: Failed to process UDP: Security
Thu Sep 5 14:00:13 2024 user.warn otbr-agent[2911]: 1d.00:14:31.821 [W] P-RadioSpinel-: Handle transmit done failed: ChannelAccessFailure
Thu Sep 5 14:00:15 2024 user.warn otbr-agent[2911]: 1d.00:14:34.030 [W] Mle-----------: Failed to process UDP: Security
Thu Sep 5 14:00:25 2024 user.warn otbr-agent[2911]: 1d.00:14:44.156 [W] Mle-----------: Failed to process UDP: Security
Thu Sep 5 14:00:35 2024 user.warn otbr-agent[2911]: 1d.00:14:53.705 [W] Mle-----------: Failed to process UDP: Security
Thu Sep 5 14:00:46 2024 user.warn otbr-agent[2911]: 1d.00:15:04.732 [W] Mle-----------: Failed to process UDP: Security
Thu Sep 5 14:00:58 2024 user.warn otbr-agent[2911]: 1d.00:15:16.852 [W] Mle-----------: Failed to process UDP: Security
Thu Sep 5 14:01:10 2024 user.warn otbr-agent[2911]: 1d.00:15:29.408 [W] Mle-----------: Failed to process UDP: Security
Thu Sep 5 14:01:22 2024 user.warn otbr-agent[2911]: 1d.00:15:41.452 [W] Mle-----------: Failed to process UDP: Security
Thu Sep 5 14:01:34 2024 user.warn otbr-agent[2911]: 1d.00:15:53.461 [W] Mle-----------: Failed to process UDP: Security
Thu Sep 5 14:01:46 2024 user.warn otbr-agent[2911]: 1d.00:16:05.017 [W] Mle-----------: Failed to process UDP: Security
Thu Sep 5 14:02:02 2024 user.warn otbr-agent[2911]: 1d.00:16:21.238 [W] Mle-----------: Failed to process UDP: Security
Thu Sep 5 14:02:13 2024 user.warn otbr-agent[2911]: 1d.00:16:32.371 [W] Mle-----------: Failed to process UDP: Security
Thu Sep 5 14:02:24 2024 user.warn otbr-agent[2911]: 1d.00:16:43.302 [W] Mle-----------: Failed to process UDP: Security
Thu Sep 5 14:02:35 2024 user.warn otbr-agent[2911]: 1d.00:16:53.798 [W] Mle-----------: Failed to process UDP: Security
Thu Sep 5 14:02:49 2024 user.warn otbr-agent[2911]: 1d.00:17:07.788 [W] Mle-----------: Failed to process UDP: Security
Thu Sep 5 14:03:02 2024 user.warn otbr-agent[2911]: 1d.00:17:21.457 [W] Mle-----------: Failed to process UDP: Security
Thu Sep 5 14:03:10 2024 user.warn otbr-agent[2911]: 1d.00:17:29.108 [W] Mle-----------: Failed to process UDP: Security
Thu Sep 5 14:03:17 2024 user.warn otbr-agent[2911]: 1d.00:17:36.198 [W] P-Netif-------: ADD [U] fd36:ff76:692:a2ba:0:ff:fe00:fc37 failed (InvalidArgs)
Thu Sep 5 14:03:17 2024 user.warn otbr-agent[2911]: 1d.00:17:36.198 [W] P-Netif-------: Failed to process event, error:InvalidArgs
Thu Sep 5 14:03:17 2024 user.err otbr-agent[2911]: [ERR ]-MDNS----: Failed to register service OpenThread BorderRouter #A858 (51733)._meshcop._udp: Name Conflict
Thu Sep 5 14:03:17 2024 user.warn otbr-agent[2911]: [WARN]-BA------: Result of publish meshcop service OpenThread BorderRouter #A858 (51733)._meshcop._udp.local: Duplicated
Thu Sep 5 14:03:17 2024 user.crit otbr-agent[2911]: 1d.00:17:36.257 [C] Platform------: otPlatSettingsGet() at settings.cpp:259: Failure
Thu Sep 5 14:03:17 2024 user.crit otbr-agent[2911]: 1d.00:17:36.257 [C] Platform------: otPlatSettingsGet() at settings.cpp:259: Failure
To Reproduce Information to reproduce the behavior, including: No exact steps
- Git commit id simplicity_sdk v2024.6.1
- IEEE 802.15.4 hardware platform EFR32MG21F768
- Build steps
- Network topology
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 30 (11 by maintainers)
After verification, the issue has been solved. I think we can close the issue.
OpenThread APIs are not thread safe - they need to be called from a single execution context.
There is progress on this issue. Our extended ubus method of otbr calls the otDatasetGetActive and otDatasetGetActiveTlvs APIs. We’ve removed them and started a new round of tests. Thank you for your support. I will update if there is any progress.
@bukepo There are two new pieces of information: 1 It’s not the part of the ot-br-posix code that we changed that caused this issue. Because after removing the code, the issue can still be reproduced. 2 These few commands can easily reproduce the issue. ubus call otbr commissioner start, ubus call otbr commissioner stop, ubus call otbr status
@bukepo Thanks for the reminder, there is a modification that call the otDatasetGetActiveTlvs(). @lancersky2017 has removed it. We’ll verify the fix. It will take about a week. I will get back to you with the results.
Could you check whether the modifications can cause multiple threads to access OpenThread instance? OpenThread core stack is designed to run in single thread. I suspect the error occurs in some race conditions.