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 open file handler issue #2028

Closed
ruflin opened this issue Jul 13, 2016 · 2 comments

Comments

Projects
None yet
3 participants
@ruflin
Copy link
Collaborator

commented Jul 13, 2016

If during the start of a harvester and error happens during opening the file, it can happen that the file descriptor is not properly closed. This error was found in 5.x and is fixed in #2020 but applies also all 1.x filebeat versions.

The openFile method must be adjusted so that also in case of an error during the first file checks, the file descriptor is closed properly: https://github.com/elastic/beats/blob/master/filebeat/harvester/log.go#L151

ruflin added a commit to ruflin/beats that referenced this issue Jul 13, 2016

@urso

This comment has been minimized.

Copy link
Collaborator

commented Jul 19, 2016

in golang open registers a finalizer with file-handles, closing files after garbage collecting os.File objects.

tsg added a commit that referenced this issue Jul 19, 2016

@tsg

This comment has been minimized.

Copy link
Collaborator

commented Jul 19, 2016

#2029 was merged.

@tsg tsg closed this Jul 19, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.