Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Startup Issue w/ SystemD [6213] #664

Closed
tparys opened this issue Aug 9, 2019 · 1 comment
Closed

Startup Issue w/ SystemD [6213] #664

tparys opened this issue Aug 9, 2019 · 1 comment

Comments

@tparys
Copy link
Contributor

tparys commented Aug 9, 2019

Been chasing a couple startup issues with Fast-RTPS based programs, and found one that seems a bug in Fast-RTPS.

The offending line is in src/cpp/utils/IPFinder.cpp ...

if (ifa->ifa_addr == NULL || (ifa->ifa_flags & IFF_RUNNING) == 0)

The issue is that the code should use IFF_UP, instead of IFF_RUNNING. Basically, IFF_RUNNING contains a number of other checks including whether or network cables are plugged in. See This Discussion on Stack Overflow for some more details.

In our system, the interface is up and has an address assigned, but that flag flicks off for a brief moment, around the time that the Fast-RTPS applications start. Fast-RTPS doesn't see the flag, skips that locator, and discovery with other CPU's does not take place.

So, we've changed that line to this in our copy of the library, and seems much more stable.

if (ifa->ifa_addr == NULL || (ifa->ifa_flags & IFF_UP) == 0)
@JLBuenoLopez
Copy link
Contributor

Hi @tparys,

Fast DDS 2.5.1 includes the dynamic network interfaces feature which currently has limited support (UDPv4 without whitelisting). Fast DDS 2.6.0 will include complete support for TCP and UDP transports. Consequently, even if the network interface is not found while Fast DDS is initialized, you can use this feature to trigger a rescan of the network interfaces by Fast DDS. I hope this is helpful with your use case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants