-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Labels
area: LWM2Marea: NetworkingbugThe issue is a bug, or the PR is fixing a bugThe issue is a bug, or the PR is fixing a bugpriority: lowLow impact/importance bugLow impact/importance bug
Description
Describe the bug
When running the LwM2M engine, the application gets into an infinite loop and does not respond anymore on native_posix. This happens on my machine after 188 seconds.
When setting CONFIG_NATIVE_POSIX_SLOWDOWN_TO_REAL_TIME=n, the hang also occurs after 188 seconds simulated time.
To Reproduce
Steps to reproduce the behavior:
- cd samples/net/lwm2m_client
- mkdir build; cd build
- cmake -GNinja -DBOARD=native_posix ..
- ninja run
- after 3 min the application does not respond anymore and consumes 100% cpu
Expected behavior
The application should continue to run normally.
Impact
LwM2M cannot be used on native_posix.
Environment (please complete the following information):
- OS: Ubuntu 18.04
- Toolchain: Zephyr SDK
- Version: v1.14.0-rc3
Possible fix
diff --git a/subsys/net/lib/lwm2m/lwm2m_engine.c b/subsys/net/lib/lwm2m/lwm2m_engine.c
index c38fd787ee..28397e732b 100644
--- a/subsys/net/lib/lwm2m/lwm2m_engine.c
+++ b/subsys/net/lib/lwm2m/lwm2m_engine.c
@@ -3808,7 +3808,7 @@ static void lwm2m_engine_service(struct k_work *work)
service_due_timestamp = srv->last_timestamp +
K_MSEC(srv->min_call_period);
/* service is due */
- if (timestamp > service_due_timestamp) {
+ if (timestamp >= service_due_timestamp) {
srv->last_timestamp = k_uptime_get();
k_work_submit(&srv->service_work);
}
Metadata
Metadata
Assignees
Labels
area: LWM2Marea: NetworkingbugThe issue is a bug, or the PR is fixing a bugThe issue is a bug, or the PR is fixing a bugpriority: lowLow impact/importance bugLow impact/importance bug