-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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 file handle leak when handling errors in filestream #37973
Conversation
Files were not closed properly in some rare error cases.
Pinging @elastic/elastic-agent-data-plane (Team:Elastic-Agent-Data-Plane) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is still a f.Close()
left in openFile
that could lead to double closing the file in case of an error.
It's here:
beats/filebeat/input/filestream/input.go
Line 285 in eedae74
f.Close() |
💚 Build Succeeded
History
cc @rdner |
💚 Build Succeeded
History
cc @rdner |
💚 Build Succeeded
History
cc @rdner |
💚 Build Succeeded
History
cc @rdner |
💚 Build Succeeded
History
cc @rdner |
💔 Build Failed
Failed CI StepsHistory
cc @rdner |
Files were not closed properly in some rare error cases. (cherry picked from commit f7e5b4c) # Conflicts: # filebeat/input/filestream/input.go
…filestream (#37995) * Fix file handle leak when handling errors in filestream (#37973) Files were not closed properly in some rare error cases. (cherry picked from commit f7e5b4c) # Conflicts: # filebeat/input/filestream/input.go --------- Co-authored-by: Denis <[email protected]>
Files were not closed properly in some rare error cases. (cherry picked from commit f7e5b4c) # Conflicts: # filebeat/input/filestream/input.go
…filestream (#38013) * Fix file handle leak when handling errors in filestream (#37973) Files were not closed properly in some rare error cases. (cherry picked from commit f7e5b4c) # Conflicts: # filebeat/input/filestream/input.go --------- Co-authored-by: Denis <[email protected]>
Files were not closed properly in some rare error cases.
Checklist
- [ ] I have made corresponding changes to the documentation- [ ] I have made corresponding change to the default configuration files- [ ] I have added tests that prove my fix is effective or that my feature worksCHANGELOG.next.asciidoc
orCHANGELOG-developer.next.asciidoc
.How to test this PR locally
The existing tests should make sure that the existing functionality is not broken.
Related issues