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

fix thread handling of node_status_publisher. #2058

Merged
merged 1 commit into from
Mar 6, 2019

Conversation

s-azumi
Copy link

@s-azumi s-azumi commented Mar 1, 2019

Status

PRODUCTION / DEVELOPMENT

Description

This tries to solve autowarefoundation/autoware_ai#589.

#2028 couldn't path the tests because of autoware_health_checker::NodeStatusPublisher.
I think its cause is that the thread is not dead during the test.

@sgermanserrano
Copy link

@s-azumi @gbiggs @kfunaoka @hakuturu583
Thread handling in the autoware_health_checker node is causing issues in the packages it affects. As @dejanpan comments in #1943 there are no comments or design document for the new feature.

Copy link

@sgermanserrano sgermanserrano left a comment

Choose a reason for hiding this comment

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

If my understanding is correct the fix proposed in this PR will work for just 1 node making use of the health checker as the publish_thread_ variable will be overwritten if 2 nodes make use of the ENABLE method

@sgermanserrano
Copy link

If the autoware_health_checker package is performing the same tasks as diagnostic_aggregator I'd suggest using that one instead to reduce maintainability needs

@hakuturu583
Copy link

@sgermanserrano I posted design issun for this feature. But no one gave opinion to us.

@hakuturu583
Copy link

@sgermanserrano diagnostic_aggrigator only handles hardware errors.
It does not handle software diagnostic function.

@kfunaoka
Copy link

kfunaoka commented Mar 5, 2019

@hakuturu583 It seems each node has an instance of NodeStatusPublisher. In other words, each node launches only one thread in NodeStatusPublisher::ENABLE(). Is my understanding correct?

@sgermanserrano
Copy link

sgermanserrano commented Mar 5, 2019

@sgermanserrano diagnostic_aggrigator only handles hardware errors.
It does not handle software diagnostic function.

@hakuturu583 thanks for the clarification. Is it then close to what bond does?

I'm reading autowarefoundation/autoware_ai#494 but I cannot find how the new feature works, can you provide a ReadMe within the package? Also, how is thread completion handled? Would this PR #2058 address that? are there any other conditions (apart from the Destructor) when .join should be called?

@kfunaoka
Copy link

kfunaoka commented Mar 5, 2019

Since this bug is hotfix level, I've looked into the code. At 6a5c720, NodeStatusPublisher is instantiated only once in each node, and NodeStatusPublisher::ENABLE() is called only once in each node. This pull request also fixes the CI error in #2028.

@hakuturu583 Would you add README.md in new designated pull request?

@kfunaoka
Copy link

kfunaoka commented Mar 6, 2019

I've requested README.md and answers at https://github.com/CPFL/Autoware/issues/1860#issuecomment-469940811.

@s-azumi s-azumi merged commit 00d8f41 into develop Mar 6, 2019
@s-azumi s-azumi deleted the fix/health_checker_thread branch March 6, 2019 07:15
anubhavashok pushed a commit to NuronLabs/autoware.ai that referenced this pull request Sep 7, 2021
@mitsudome-r mitsudome-r added the version:autoware-ai Autoware.AI label Jun 14, 2022
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.

5 participants