in_exec: Ensure to sleep for prevending fork bomb #1348

merged 3 commits into from Dec 16, 2016


None yet

3 participants

autopp commented Dec 5, 2016

Since 0.12.18, in_exec dose not sleep run_interval when command or output parsing failed.
This causes the fork bomb.
This is prevended by moving sleep @run_interval to ensure clause.

(Sorry, the added test case may not be good...)

autopp added some commits Dec 2, 2016
autopp ensure to sleep even if command or parsing fails 0d5b434
autopp add tests for the case of invalid command given
For testing, add new mode to exec_script.rb.
In this mode, exec_script.rb output a charactor to stderr and then
output a invalid json string to stdout.

The test case checks that the total length of command's stderr (this
means the count of command execution) is appropriate.
@tagomoris tagomoris added the v0.12 label Dec 6, 2016
@repeatedly repeatedly was assigned by tagomoris Dec 6, 2016
@tagomoris tagomoris added the bug label Dec 6, 2016

ping @repeatedly ?


I'm waiting patch update.


Ahh, wait. My comment isn't appear...

+ end
+ assert_equal true, d.emits.empty?
+ assert_equal true,, 4)
autopp commented Dec 15, 2016

@repeatedly Thanks for your review and advice! I updated the test code.
Is it necessary to rebase commits?

@repeatedly repeatedly merged commit 93b8edb into fluent:v0.12 Dec 16, 2016

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed

Is it necessary to rebase commits?

Not needed.


autopp commented Dec 16, 2016 edited

Thanks you!

@autopp autopp deleted the autopp:ensure_sleep_in_exec branch Dec 16, 2016
@autopp autopp restored the autopp:ensure_sleep_in_exec branch Dec 18, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment