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

Keep reference to DomainParticipantFactory #770

Merged
merged 2 commits into from
Oct 14, 2024

Conversation

MiguelCompany
Copy link
Collaborator

@MiguelCompany MiguelCompany commented Jun 12, 2024

We've seen several issues related with destruction order lately.

This PR aims to mitigate them by leveraging Fast DDS DomainParticipantFactory::get_shared_instance().

It should then avoid the automatic destruction of the factory (and the participants it created) until all the contexts in the process have been destroyed.

This can be backported to Jazzy and Iron, but not Humble, since get_shared_instance() is only available from Fast DDS 2.8.0 onwards.

Copy link
Collaborator

@fujitatomoya fujitatomoya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MiguelCompany thanks for the explanation, lgtm with green CI.

@ahcorde
Copy link
Contributor

ahcorde commented Jun 21, 2024

  • Linux Build Status
  • Linux-aarch64 Build Status
  • Linux-rhel Build Status
  • Windows Build Status

@MiguelCompany MiguelCompany force-pushed the hotfix/keep-factory-shared-ptr branch from 73f7936 to 94cffad Compare July 10, 2024 08:05
@MiguelCompany
Copy link
Collaborator Author

@fujitatomoya @ahcorde I rebased this one to get the changes from #763 (I think the test failures were due to that)

@fujitatomoya
Copy link
Collaborator

  • Linux Build Status
  • Linux-aarch64 Build Status
  • Linux-rhel Build Status
  • Windows Build Status

@ahcorde
Copy link
Contributor

ahcorde commented Oct 11, 2024

  • Linux Build Status
  • Linux-aarch64 Build Status
  • Linux-rhel Build Status
  • Windows Build Status

@clalancette
Copy link
Contributor

I'm going to run one more CI here, just to make sure everything is good, before merging.

  • Linux Build Status
  • Linux-aarch64 Build Status
  • Linux-rhel Build Status
  • Windows Build Status
  • Windows Debug Build Status

@clalancette
Copy link
Contributor

Ah, CI isn't working because this needs to be rebased. @MiguelCompany can you do that?

@MiguelCompany MiguelCompany force-pushed the hotfix/keep-factory-shared-ptr branch from 94cffad to 8851bfd Compare October 14, 2024 06:45
@MiguelCompany
Copy link
Collaborator Author

Ah, CI isn't working because this needs to be rebased. @MiguelCompany can you do that?

Done!

@clalancette
Copy link
Contributor

clalancette commented Oct 14, 2024

Here we go:

  • Linux Build Status
  • Linux-aarch64 Build Status
  • Linux-rhel Build Status
  • Windows Build Status
  • Windows Debug Build Status

@clalancette
Copy link
Contributor

The failures here are all in known flakes, so going ahead and merging this.

@clalancette clalancette merged commit 9d2150f into ros2:rolling Oct 14, 2024
3 checks passed
@MiguelCompany MiguelCompany deleted the hotfix/keep-factory-shared-ptr branch October 16, 2024 06:07
@MiguelCompany
Copy link
Collaborator Author

@clalancette @fujitatomoya Should we backport this?

@fujitatomoya
Copy link
Collaborator

@MiguelCompany i say we should especially for jazzy and humble, but this is breaking ABI change?

@MiguelCompany
Copy link
Collaborator Author

I say we should especially for jazzy and humble, but this is breaking ABI change?

@fujitatomoya Strictly speaking, this is an ABI break. But since it is on the internal package rmw_fastrtps_shared_cpp, which is only used by the other two packages, it would not be a problem if we release new versions of the three packages in this repo at the same time.

@MiguelCompany
Copy link
Collaborator Author

BTW, it cannot be backported to Humble, because get_shared_instance() was added in Fast DDS 2.8.0, and Humble uses 2.6.x

@fujitatomoya
Copy link
Collaborator

@MiguelCompany i am okay with backport for jazzy, lets hear from other opinion.

@gavanderhoorn
Copy link

@MiguelCompany i am okay with backport for jazzy, lets hear from other opinion.

If this hasn't yet been backported, I would really appreciate a backport to Jazzy.

@fujitatomoya
Copy link
Collaborator

@clalancette what do you think about backporting jazzy? IMO, this should be no problem and better bug fix for jazzy LTS.

@clalancette
Copy link
Contributor

@clalancette what do you think about backporting jazzy? IMO, this should be no problem and better bug fix for jazzy LTS.

I'm not entirely sure, but I think this may be involved in what is causing our crashes on RHEL with flake8. I'm still debugging that, but commenting out the call to delete_participant here makes the crash stop happening.

Thus I think we should hold off on backporting this until we figure out what that problem is.

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

Successfully merging this pull request may close these issues.

6 participants