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(inputs.phpfpm): Check error before continue processing #15176

Merged
merged 2 commits into from
Apr 17, 2024

Conversation

PierreF
Copy link
Contributor

@PierreF PierreF commented Apr 17, 2024

Summary

The PHP-FPM input could crash with a nil pointer dereferencing when timeout is used and the connect can't be established (e.g. the PHP-FPM server isn't running).

Checklist

  • No AI generated code was used in this PR

Related issues

resolves #15175

@telegraf-tiger telegraf-tiger bot added fix pr to fix corresponding bug plugin/input 1. Request for new input plugins 2. Issues/PRs that are related to input plugins labels Apr 17, 2024
@srebhan
Copy link
Member

srebhan commented Apr 17, 2024

@PierreF sorry I missed this PR and created #15179... :-( I think we should check the errors earlier... Happy to close my PR and take yours, what do you think?

@PierreF PierreF force-pushed the phpfpm-fix-crash-with-timeout branch from 35085cc to 673d82a Compare April 17, 2024 13:28
@PierreF
Copy link
Contributor Author

PierreF commented Apr 17, 2024

No problem. I've updated my PR to contains your fix (your commit, with check of errors done earlier) and include my test.

Signed-off-by: Pierre Fersing <pierre.fersing@bleemeo.com>
@telegraf-tiger
Copy link
Contributor

Copy link
Member

@srebhan srebhan left a comment

Choose a reason for hiding this comment

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

Thank you very much for the fix @PierreF!

@srebhan srebhan added the ready for final review This pull request has been reviewed and/or tested by multiple users and is ready for a final review. label Apr 17, 2024
@srebhan srebhan changed the title fix(inputs.phpfpm): Fix nil pointer crash when timeout is used fix(inputs.phpfpm): Check error before continue processing Apr 17, 2024
@DStrand1 DStrand1 removed their assignment Apr 17, 2024
@powersj powersj merged commit 31b2b50 into influxdata:master Apr 17, 2024
27 checks passed
@github-actions github-actions bot added this to the v1.30.2 milestone Apr 17, 2024
powersj pushed a commit that referenced this pull request Apr 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix pr to fix corresponding bug plugin/input 1. Request for new input plugins 2. Issues/PRs that are related to input plugins ready for final review This pull request has been reviewed and/or tested by multiple users and is ready for a final review.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PHP-FPM could crash when timeout is configured
4 participants