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

Remove Thread#run to avoid unexpected interruption. #2170

Merged
merged 1 commit into from
Nov 9, 2018

Conversation

repeatedly
Copy link
Member

Thread#run causes unexpected interruption and it affects
the behaviour of some libraries, e.g. DataError in zlib.
Use condition variable instead to handle thread execution.

This change is based on jl2005's #1984 patch.

Ref #1847 / #1903

Signed-off-by: Masahiro Nakagawa [email protected]

Thread#run causes unexpected interruption and it affects
the behaviour of some libraries, e.g. DataError in zlib.
Use condition variable instead to handle thread execution.

This change is based on jl2005's #1984 patch.

Signed-off-by: Masahiro Nakagawa <[email protected]>
@repeatedly repeatedly added bug Something isn't working v1 labels Nov 8, 2018
@repeatedly repeatedly self-assigned this Nov 8, 2018
@repeatedly repeatedly requested a review from cosmo0920 November 8, 2018 01:00
Copy link
Contributor

@cosmo0920 cosmo0920 left a comment

Choose a reason for hiding this comment

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

Looks good.
I've confirmed that DataError does not occur with @jl2005 's test case: f63e5d9.
Adding test cases for removing Thread#run is future work?

@repeatedly
Copy link
Member Author

@cosmo0920 ji2005's test case is passed with old implementation because the problem is rare timing issue with ruby's VM and C extension implementation.
So writing test is hard. We need feedback from users with fluentd v1.3.

Copy link
Contributor

@cosmo0920 cosmo0920 left a comment

Choose a reason for hiding this comment

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

LGTM!

@cosmo0920 ji2005's test case is passed with old implementation because the problem is rare timing issue with ruby's VM and C extension implementation.
So writing test is hard. We need feedback from users with fluentd v1.3.

I see. ji2005's test case seems to be unstable.

@repeatedly repeatedly merged commit f287c60 into master Nov 9, 2018
@repeatedly repeatedly deleted the output-remove-thread-run branch November 11, 2018 13:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working v1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants