-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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 a potential bug that ThreadError may occur on SIGUSR1 #2678
Conversation
It may cause the following error: [error]: unexpected error error_class=ThreadError error=#<ThreadError: killed thread> as reported in https://groups.google.com/d/msg/fluentd/Ten_apYLAX8/PD4jYk8KDwAJ because the new thread may finish before calling "run" method at main thread. In addition replace { ... } style blocks for them with do ... end style, because the later style will clarify such mistakes. Signed-off-by: Takuro Ashie <ashie@clear-code.com>
Looks good. Thanks! |
Which fluentd version this fix is given?? I am facing the same issue in fluent-plugins-3.4.1-1.0.2.x86_64 |
Thanks, I am not good at fluentd. So that means my fluentd version is 1.2.2 and older than the fixed version right!! 2023-03-08 17:45:01 +0800 [error]: #0 unexpected error error_class=ThreadError error="killed thread" 2023-03-08 17:45:01 +0800 [error]: #0 unexpected error error_class=ThreadError error="killed thread" 2023-03-08 17:45:01 +0800 [error]: #0 suppressed same stacktrace |
Yes! |
Thanks again, my td-agent package is td-agent-3.2.0-0.el7.x86_64. |
If you are updating to the latest version of td-agent v4, the following blog may be helpful. |
We have had this log rotation happening 4 times a day for like 1 year and working fine, now suddenly this bug is triggered, we are not sure what can trigger this bug, Are there specific scenarios that can trigger this bug? Also is there a way to just edit the supervisor.rb of fluent 1.2.2 file with the fix mentioned in this bug by removing extra run from the code if we dont want to upgrade, will it work? |
Which issue(s) this PR fixes:
None in GitHub issues, but it will fix the following bug report:
We ClearCode Inc. recently received same bug reports from our some customers.
Their fluentd is v0.12 but I think the same potential bug still exists in the latest version.
What this PR does / why we need it:
This PR removes redundant
run
calls for some Thread objects.It may cause the following error on SIGUSR1:
as reported in
because the new thread may finish before calling "run" method at main
thread.
In addition this PR also replaces
{ ... }
style blocks for them withdo ... end
style,because the later style will clarify such mistakes.
Docs Changes:
None.
Release Note:
Same as title