Coder Social home page Coder Social logo

Comments (4)

eboasson avatar eboasson commented on July 18, 2024 1

Looks to me like you have a firewall blocking all multicast traffic. This causes two problems:

  • Discovery no longer works (several other DDS implementations always cater for unicast discovery, but Cyclone by default doesn't if the interface supports multicast);
  • Some threads are dedicated to receiving data from a single socket, and on shutdown those need to unblocked. The best mechanism I have been able to find for that is sending a packet to the socket, but that does require the IP stack to cooperate.

I suspect the hanging is caused by ROS 2's signal handler being "too nice" if the impossible happens and stopping cleanly turns out to be impossible.

I'd suggest allowing multicast, but you can also disable multicast altogether (it is just that you lose out on a lot of niceties and add a significant amount of overhead):

<General>
  <AllowMulticast>false</AllowMulticast>
</General>
<Discovery>
  <ParticipantIndex>auto</ParticipantIndex>
  <Peers>
    <Peer address="localhost"/>
  </Peers>
</Discovery>

The hanging you could fix by not having threads dedicated to receiving data on a specific socket (Internal/MultipleReceiveThreads = false), but that alone won't get make discovery work. And both options above that should make discovery work should also solve the hanging.

from rmw_cyclonedds.

eboasson avatar eboasson commented on July 18, 2024

I am afraid I don't (won't) have an Apertis 2022 SDK at hand. It certainly sounds like that is exhibiting some behaviour that interacts badly with Cyclone. Unusual, but not impossible.

What I usually suggest is to gather some tracing information from Cyclone DDS because that usually gives some insights in what is going on when everything works but there is no communication. Enabling it is as simple as putting

CYCLONEDDS_URI="<Tr><V>finest</><Out>cdds.log.\${CYCLONEDDS_PID}</>"

in the environment. That log starts with the configuration options, then you get some information on network selection and so on.

It is not so likely to give a clue as to why it hangs. For that, generally the best thing to do is to attach gdb and get stack traces for all threads (thread apply all bt) and look for something suspicious.

from rmw_cyclonedds.

AlexisTM avatar AlexisTM commented on July 18, 2024

For the following logs, no other node was running.

cdds.log.1189.txt

cdds.log.1190.txt

from rmw_cyclonedds.

AlexisTM avatar AlexisTM commented on July 18, 2024

That seems to be the problem indeed. Thank you!

from rmw_cyclonedds.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.