Skip to content

v0.2.0: Improve/fix CPU usage in CmdCoreAgent, including Recv Reply socket split

Pierre-Alain Loizeau requested to merge v0_2_0_CmdRcvCmdRepFix into master
  • CmdRouter and CmdCore: Split the Receive-Reply socket in 2 unidirectional separate sockets to remove timeout constraints between cmd reception and ready replies checks
  • Related ZMQ socket options tuning (some of them maybe to revise later)
  • Shift the State ports to 56805-56806 to allow margin if later changes to command ports
  • Fix timeout of cmd receive socket poll, which is in ms and not in s! This fixes the 100% CPU usage bug.
  • Fix incrementation of wrong index in cmd receive thread, which was effectively preventing multi command buffering as buffer index always 0 (bug never seen in tests!)
  • Make accesses to replies buffer thread safe by adding Threading Lock protection in all occurrences
  • Set all CmdCore threads timeouts (socket poll/buffers get) to 200 ms / 0.2 s (possible after receive/reply split)
  • Fix some logi error and add some error messages in tests helper classes
  • Related fixes/tuning in the tests and reference files

Merge request reports