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: Fix panic in parsers due to missing Log #10288

Merged
merged 1 commit into from
Dec 16, 2021

Conversation

srebhan
Copy link
Contributor

@srebhan srebhan commented Dec 16, 2021

resolves #10285
resolves #10286

Plugins using the SetParserFunc do not initialize the parsers' Log field properly (nor do they call Init()). This PR fixes the resulting panic by doing the initialization properly.

A quick search shows that file, tail and directory_monitor seem to be hit by this bug.

@telegraf-tiger
Copy link
Contributor

Thanks so much for the pull request!
🤝 ✒️ Just a reminder that the CLA has not yet been signed, and we'll need it before merging. Please sign the CLA when you get a chance, then post a comment here saying !signed-cla

@telegraf-tiger telegraf-tiger bot added the fix pr to fix corresponding bug label Dec 16, 2021
@srebhan srebhan added the plugin/parser 1. Request for new parser plugins 2. Issues/PRs that are related to parser plugins label Dec 16, 2021
@srebhan
Copy link
Contributor Author

srebhan commented Dec 16, 2021

!signed-cla

@telegraf-tiger
Copy link
Contributor

Thanks so much for the pull request!
🤝 ✒️ Just a reminder that the CLA has not yet been signed, and we'll need it before merging. Please sign the CLA when you get a chance, then post a comment here saying !signed-cla

@srebhan
Copy link
Contributor Author

srebhan commented Dec 16, 2021

!signed-cla

@telegraf-tiger
Copy link
Contributor

Thanks so much for the pull request!
🤝 ✒️ Just a reminder that the CLA has not yet been signed, and we'll need it before merging. Please sign the CLA when you get a chance, then post a comment here saying !signed-cla

@tarjei
Copy link

tarjei commented Dec 16, 2021

I tested this PR and it fixed #10285 for me.

@hluaces
Copy link

hluaces commented Dec 16, 2021

In #10286 I provided a Dockerfile that reproduced the issue.

With the artifact provided on this PR for RPM-based x86_64 systems the issue seems to be solved.

Copy link
Contributor

@MyaLongmire MyaLongmire 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 for the quick fix!

@reimda reimda merged commit d1d81b7 into influxdata:master Dec 16, 2021
reimda pushed a commit that referenced this pull request Dec 16, 2021
reimda pushed a commit that referenced this pull request Dec 16, 2021
@tarjei
Copy link

tarjei commented Dec 17, 2021

@srebhan when do you think this will be in a new release?

@srebhan
Copy link
Contributor Author

srebhan commented Dec 17, 2021

@tarjei there will be a 1.21.1 release, not exactly sure when...

@srebhan
Copy link
Contributor Author

srebhan commented Dec 17, 2021

@tarjei oh it's already on the Download page... :-)

powersj pushed a commit to powersj/telegraf that referenced this pull request Jan 21, 2022
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/parser 1. Request for new parser plugins 2. Issues/PRs that are related to parser plugins
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Telegraf 1.21.0 - segmentation violation when using logparser SIGSEV inputs.tail w/grok crashes in 1.21.0
6 participants