ros2 / sros2

tools to generate and distribute keys for SROS 2
Apache License 2.0
88 stars 43 forks source link

Secure communication between two nodes fails after exchanging multiple messages. #271

Open squizz617 opened 3 years ago

squizz617 commented 3 years ago

Bug report

Required Info:

Steps to reproduce issue

Two nodes are requried; a main node and a relay node.

Expected behavior

Relay node is launched, and relays the message delivered to input topic.

Actual behavior

At one point, the relay node stops working, i.e., doesn't publish to topic output, and Fast-RTPS starts emitting the following error messages whenever the relay node is launched and a message is published to topic input:

2021-07-02 00:11:37.310 [SECURITY Error] WriterHistory cannot add the CacheChange_t -> Function exchange_participant_crypto
2021-07-02 00:11:37.310 [SECURITY Error] WriterHistory cannot add the CacheChange_t -> Function discovered_writer
2021-07-02 00:11:37.310 [RTPS_EDP Error] Security manager returns an error for writer ca.b4.f2.33.81.aa.bd.5d.96.42.1f.9|ff.0.3.c7 -> Function assignRemoteEndpoints
2021-07-02 00:11:37.310 [SECURITY Error] WriterHistory cannot add the CacheChange_t -> Function discovered_reader
2021-07-02 00:11:37.310 [RTPS_EDP Error] Security manager returns an error for writer ca.b4.f2.33.81.aa.bd.5d.96.42.1f.9|ff.0.3.c2 -> Function assignRemoteEndpoints
2021-07-02 00:11:37.310 [SECURITY Error] WriterHistory cannot add the CacheChange_t -> Function discovered_writer
2021-07-02 00:11:37.310 [RTPS_EDP Error] Security manager returns an error for writer ca.b4.f2.33.81.aa.bd.5d.96.42.1f.9|ff.0.4.c7 -> Function assignRemoteEndpoints
2021-07-02 00:11:37.310 [SECURITY Error] WriterHistory cannot add the CacheChange_t -> Function discovered_reader
2021-07-02 00:11:37.310 [RTPS_EDP Error] Security manager returns an error for writer ca.b4.f2.33.81.aa.bd.5d.96.42.1f.9|ff.0.4.c2 -> Function assignRemoteEndpoints
2021-07-02 00:11:37.310 [SECURITY Error] WriterHistory cannot add the CacheChange_t -> Function discovered_writer
2021-07-02 00:11:37.310 [RTPS_EDP Error] Security manager returns an error for reader ca.b4.f2.33.81.aa.bd.5d.96.42.1f.9|ff.2.0.c7 -> Function assignRemoteEndpoints
2021-07-02 00:11:37.310 [SECURITY Error] WriterHistory cannot add the CacheChange_t -> Function discovered_reader
2021-07-02 00:11:37.310 [RTPS_EDP Error] Security manager returns an error for writer ca.b4.f2.33.81.aa.bd.5d.96.42.1f.9|ff.2.0.c2 -> Function assignRemoteEndpoints

Even though the time required for this error to occur is random, it consistently happens across multiple runs of the main node.

clalancette commented 2 years ago

Sorry that we haven't gotten back to you on this. A few questions for you:

  1. Is it possible to share the code for the main node and relay node? That would make reproducing this easier.
  2. Does this happen with CycloneDDS on Foxy?
  3. Does this happen with Fast-RTPS or CycloneDDS on the latest Rolling packages?