From fcbb6f12f5ddb68632dfefc149a1eeb6ec4f5b80 Mon Sep 17 00:00:00 2001 From: Greek Date: Sat, 29 Jan 2022 13:31:21 +0100 Subject: [PATCH] BUG FIX: Livelock in rtps_writer when PUSH_MODE=FALSE & DURABILITY=TRANSIENT_LOCAL A Flag was not reset in a sub-branch that is taken when PUSH_MODE=FALSE & DURABILITY=TRANSIENT_LOCAL, that prevented the RTPS writer from ever sending HEARTBEATs. --- src/TODO.txt | 1 + src/rtps_writer.vhd | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/TODO.txt b/src/TODO.txt index a886950..bc09845 100644 --- a/src/TODO.txt +++ b/src/TODO.txt @@ -100,6 +100,7 @@ ros2 run rosidl_adapter srv2idl.py *.srv * The publication_handle of the DDS Specification (e.g. the one returned in the Sample Info) is an implementation specific ID that can identify local and remote DDS Entities LOCALY. * Testbench did not catch Bug, where the Pub ACKNACK was sent to as Sub ACKNACK (ACKNACK Destinations were flipped). Extend testbench to catch this case. +* Testbench did not catch rtps_writer not sending HEARTBEATS if PUSH_MODE=FALSE & DURABILITY=TRANSIENT_LOCAL * Fast-RTPS does not follow DDSI-RTPS Specification - Open Github Issue diff --git a/src/rtps_writer.vhd b/src/rtps_writer.vhd index cfe7711..3fd8f25 100644 --- a/src/rtps_writer.vhd +++ b/src/rtps_writer.vhd @@ -1767,6 +1767,8 @@ begin if (ack_hc = '1') then -- End of Historical Data if (next_seq_nr = last_seq_nr) then + -- Reset + historical_push_next <= '0'; -- DONE stage_next <= IDLE; else @@ -1777,7 +1779,8 @@ begin when 4 => -- Use same "start" sub-state in both versions -- No Cache Changes Available if (min_sn = SEQUENCENUMBER_UNKNOWN) then - + -- Reset + historical_push_next <= '0'; -- DONE stage_next <= IDLE; else @@ -1786,6 +1789,8 @@ begin if (reader_flags(READER_IS_BEST_EFFORT_FLAG) = '0') then cnt_next <= 0; else + -- Reset + historical_push_next <= '0'; -- DONE stage_next <= IDLE; end if;