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

Improve robustness of leaked observer warning #1410

Merged
merged 3 commits into from
Jun 21, 2024

Conversation

pavelkumbrasev
Copy link
Contributor

Description

The Leaked proxy observers warning could appear during the shutdown process even if there was no memory leak (related structures were destroying concurrently).
This patch improves reliability of the warning by removing dependency on global variable destructor and moving warning to the release_resources (all of the proxies should be destroyed 100%).

Fixes # - issue number(s) if exists

Type of change

Choose one or multiple, leave empty if none of the other choices apply

Add a respective label(s) to PR if you have permissions

  • bug fix - change that fixes an issue
  • new feature - change that adds functionality
  • tests - change in tests
  • infrastructure - change in infrastructure and CI
  • documentation - documentation update

Tests

  • added - required for new features and some bug fixes
  • not needed

Documentation

  • updated in # - add PR number
  • needs to be updated
  • not needed

Breaks backward compatibility

  • Yes
  • No
  • Unknown

Notify the following users

List users with @ to send notifications

Other information

Copy link
Contributor

@dnmokhov dnmokhov left a comment

Choose a reason for hiding this comment

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

LGTM, but adjust the test to get rid of the warning.

Comment on lines 859 to 861
tbb::parallel_for(0, 100000, [] (int) {
for (volatile int i = 0; i < 1000; ++i);
});
Copy link
Contributor

Choose a reason for hiding this comment

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

volatile warning in C++20

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Improved

Signed-off-by: pavelkumbrasev <[email protected]>
@dnmokhov dnmokhov merged commit fc18ad2 into master Jun 21, 2024
22 checks passed
@dnmokhov dnmokhov deleted the dev/pavelkkumbrasev/improve_proxy_leaked_warning branch June 21, 2024 20:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants