Fix timeout for no metadata run session - #305
Conversation
Static memory analysisDefault configuration MTU: 512 B
TOTAL: 34500 B |
|
@mergify backport humble iron |
🟠 Waiting for conditions to matchDetails
|
fallenmi
left a comment
There was a problem hiding this comment.
This review was prepared with OpenAI Codex assistance under the account owner's authorization.
The new blocking fallback runs before guard conditions are inspected. Guard conditions do not mark an XRCE context as need_to_be_ran, so a wait set containing an already-triggered guard enters this branch whenever a session exists. uxr_run_session_timeout() is then given the full per-session timeout, and hasTriggered is not checked until after that call returns. With an infinite RMW timeout, this can wait indefinitely for unrelated XRCE traffic. rmw_trigger_guard_condition() only sets the flag, so a guard raised while this fallback is blocked cannot interrupt it either.
I compiled the exact production rmw_wait.c from the PR merge-base, exact head, current rolling, and GitHub's synthetic current merge against a deterministic session/guard oracle. With one session, an already-triggered guard, and a 5-second wait:
- merge-base
6833232797d1034860125e949f34067a850eeb43and currentrollingb6e02669d42fd5aeddc1e5b71bac65afd76cddf7returnedRMW_RET_OKafter requesting a0 mssession run; - exact head
52f23f9a342ca35006325691a3d6cfe05ff8345fand synthetic merge1fce9ed4782d8c4892cb20d7e1f45cac37446061still returnedRMW_RET_OK, but only after requesting a5000 mssession run.
The existing guard-condition test checks only the eventual return code, so it does not catch this latency regression. Please preserve immediate guard delivery when adding the timer-only blocking behavior, and add a timing/wakeup regression for both a pre-triggered guard and a guard triggered during the wait.
☑️ Command disallowed due to command restrictions in the Mergify configuration.Details
|
|
Tick the box to add this pull request to the merge queue (same as
|
Signed-off-by: acuadros95 <acuadros1995@gmail.com>
Signed-off-by: acuadros95 <acuadros1995@gmail.com>
Signed-off-by: acuadros95 <acuadros1995@gmail.com>
|
Tick the box to add this pull request to the merge queue (same as
|
Signed-off-by: David Laseca Perez <davidlaseca@eprosima.com>
Signed-off-by: David Laseca Perez <davidlaseca@eprosima.com>
Signed-off-by: David Laseca Perez <davidlaseca@eprosima.com>
Signed-off-by: David Laseca Perez <davidlaseca@eprosima.com>
Signed-off-by: David Laseca Perez <davidlaseca@eprosima.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## rolling #305 +/- ##
===========================================
+ Coverage 53.67% 54.94% +1.26%
===========================================
Files 101 102 +1
Lines 5781 5917 +136
Branches 921 943 +22
===========================================
+ Hits 3103 3251 +148
+ Misses 2348 2330 -18
- Partials 330 336 +6 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Spin is not waiting if a session only haves timers, ending in a 100% CPU usage with code like this one: int32_publisher.
Also, we should run all sessions atleast once, to ensure a response to incoming data (From Hard liveliness check for example).
Related issue: #297