-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Writing to stderr from out_exec_filter plugin, blocks #2609
Comments
Several weeks have passed, and I still sometimes see some oddities with the handling of stderr. Has someone had an opportunity to double check things ? |
I'm seeing the same thing as well.
and then it blocks. Can we please |
Will check default and |
Here is quick patch.
We need to check this condition change doesn't break existing code. |
Above patch doesn't cover all cases. Need more time to fix the potential issue. |
reopen with IO::NULL is not correct way to discard message. Need to specify IO::NULL when launch process. Signed-off-by: Masahiro Nakagawa <[email protected]>
Here is the patch: #2649 |
child_process helper: fix stderr blocking for discard case. fix #2609
Thank you! 🙇 |
child_process helper: fix stderr blocking for discard case. fix #2609 Signed-off-by: Masahiro Nakagawa <[email protected]>
Describe the bug
I'm using
exec_filter
to process some data using Python. My initial command looks likeFor logging, my script is using the standard python3 logging library for debugging.
I noticed the script backing up and spent a while trying to debug it, but I now suspect the lower level
child_process_execute
influentd/lib/fluent/plugin_helper/child_process.rb
to be suspectUpdating the above command to
command /path/to/python/script 2>> /var/log/td-agent/script.log
seems to suddenly unblock processingExpected behavior
Within, out_exec_filter, a child process is called via
which means the parameter defaults to
stderr: :discard
which then arrives at this blockWhile I have not debugged any further than this, I would expect if fluentd's plugin is not handling stderr, then it would at least default to sending it to /dev/null or some other place. There was
Your Environment
The text was updated successfully, but these errors were encountered: