Fix DDS init on modern kernels: idempotent ChannelFactory.Init + relax cyclonedds pin - #182
Open
PhysicistJohn wants to merge 1 commit into
Open
Conversation
…x cyclonedds pin
Two stacked failures on Ubuntu 24.04 (kernel 6.x):
1. cyclonedds 0.10.2's Domain creation hangs indefinitely on recent
kernels, so run_sim_loop.py dies at ChannelFactoryInitialize with no
error. Relax the pin to >=0.10.2,<12 (the SDK works unmodified
against cyclonedds 11.x).
2. With cyclonedds >= 11, re-creating a Domain for the same id in one
process raises DDSException ("Occurred upon initialisation of a
cyclonedds.domain.Domain"). run_sim_loop.py initializes the channel
factory from both the control loop and the simulator, so the second
Init failed the whole loop:
ChannelFactoryInitialize(0, 'lo') # ok
ChannelFactoryInitialize(0, 'lo') # raises
ChannelFactory is already a Singleton; make Init a no-op when the
domain is live.
Author
|
Note: upstream |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
On Ubuntu 24.04 (kernel 6.x),
gear_sonic/scripts/run_sim_loop.pyfails at DDS initialization in two stacked ways:cyclonedds 0.10.2 hangs. The pinned
cyclonedds==0.10.2wheel'sDomaincreation blocks indefinitely on recent kernels — the sim loop stalls atChannelFactoryInitializewith no error output.Double init raises on cyclonedds ≥ 11. After upgrading cyclonedds, a second failure surfaces: the sim loop initializes the channel factory from both the control-loop side and the simulator side of the same process, and cyclonedds ≥ 11 refuses to re-create a live Domain:
Fix
ChannelFactory.Initreturns early when the domain is already live — the class is already aSingleton, so a secondInitin-process is safe to treat as a no-op.cyclonedds>=0.10.2,<12. The SDK runs unmodified against cyclonedds 11.x (verified: pub/sub onrt/lowstate/rt/lowcmd, channel factory init with explicit interface, on both Python 3.10 and 3.12).Tested
.venv_sim)run_sim_loop.py --no-enable-onscreen --enable-offscreenboots past DDS init