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

Segmentation fault caused by sequential Asio calls [9820] #1484

Closed
pablorcum opened this issue Oct 13, 2020 · 2 comments
Closed

Segmentation fault caused by sequential Asio calls [9820] #1484

pablorcum opened this issue Oct 13, 2020 · 2 comments

Comments

@pablorcum
Copy link
Contributor

pablorcum commented Oct 13, 2020

Expected Behavior

Run HelloWorldExample from Fast-RTPS together with another application that also uses Asio.

Current Behavior

As soon as I start the HelloWorldExample with ./HelloWorldExample publisher, the segmentation fault occurs.

Steps to Reproduce

The error occurs alongside a simple eCAL instance, which also uses Asio for communication.

  1. Download and unzip the eCAL build libraries from installecallibs.zip.
  2. Download the modified HelloWorldExample from helloWorld.zip. I've included the executable and the sources to prove that the modifications are minimal.
  3. You may have to add the libraries from (1) to the path. Use export LD_LIBRARY_PATH=pathToECALLibs:pathToFast-RTPSLibs.
  4. Check with ldd that all libraries required to run HelloWorldExample are available.
  5. Execute ./HelloWorldExample publisher.

System information

  • Fast-RTPS version: v1.8,4 with Asio v1.12.2
  • OS: Ubuntu 20.04.1, QNX

Additional context

Analyzing the core dump looks like an issue with Asio. I tried the exactly same configuration but building Fast-RTPS with Asio v1.13.0 (only one version later than status-quo) and everything works fine. In fact, I tried several versions of Asio, and all of them worked. It looks like the bug was definitely fixed in v1.13.0.

@imontesino imontesino changed the title Segmentation fault caused by sequential Asio calls Segmentation fault caused by sequential Asio calls [9820] Nov 5, 2020
@pablorcum
Copy link
Contributor Author

pablorcum commented Apr 12, 2021

This can be fixed by adding the define ASIO_DISABLE_VISIBILITY at src/cpp/CMakeLists.txt. It will facilitate parallel independent usage of different Asio sets within the same application. It needs at least Asio v1.13.0 though.

@felixf4xu
Copy link

This can be fixed by adding the define ASIO_DISABLE_VISIBILITY at src/cpp/CMakeLists.txt. It will facilitate parallel independent usage of different Asio sets within the same application. It needs at least Asio v1.13.0 though.

Do you know from which version of Fast-DDS is asio v1.13.0 used?

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

No branches or pull requests

2 participants