Skip to content

Commit

Permalink
Fix various memory leaks under Windows (elastic#12100)
Browse files Browse the repository at this point in the history
A function in go-sysinfo used under Windows to split a command-line into arguments was leaking memory.

This code was used in various places:

add_process_metadata processor. (enabled by default in all Beats)
Packetbeat's process monitor. (disabled by default).
Auditbeat's system/process metricset.
This PR updates vendored go-sysinfo to the most recent version, which fixes the leak.

(cherry picked from commit a5b3f0a)
  • Loading branch information
adriansr committed May 9, 2019
1 parent c01de67 commit 069ab53
Show file tree
Hide file tree
Showing 14 changed files with 232 additions and 42 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.next.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,12 @@ https://github.com/elastic/beats/compare/v6.7.2...6.8[Check the HEAD diff]

*Affecting all Beats*

- Fixed a memory leak when using the add_process_metadata processor under Windows. {pull}12100[12100]

*Auditbeat*

- Package dataset: Log error when Homebrew is not installed. {pull}11667[11667]
- Process dataset: Fixed a memory leak under Windows. {pull}12100[12100]

*Filebeat*

Expand All @@ -50,6 +53,8 @@ https://github.com/elastic/beats/compare/v6.7.2...6.8[Check the HEAD diff]

*Packetbeat*

- Fixed a memory leak when using process monitoring under Windows. {pull}12100[12100]

*Winlogbeat*

*Functionbeat*
Expand Down
4 changes: 2 additions & 2 deletions NOTICE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -541,15 +541,15 @@ Apache License 2.0

--------------------------------------------------------------------
Dependency: github.com/elastic/go-sysinfo
Revision: ab4f04edfc3d6b3864f5f06a068ddab9ad79774f
Revision: 9a4be54a53be4c48b44d351d52fb425a5e274be5
License type (autodetected): Apache-2.0
./vendor/github.com/elastic/go-sysinfo/LICENSE.txt:
--------------------------------------------------------------------
Apache License 2.0

-------NOTICE.txt-----
Elastic go-sysinfo
Copyright 2017-2018 Elasticsearch B.V.
Copyright 2017-2019 Elasticsearch B.V.

This product includes software developed at
Elasticsearch, B.V. (https://www.elastic.co/).
Expand Down
51 changes: 51 additions & 0 deletions vendor/github.com/elastic/go-sysinfo/CHANGELOG.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion vendor/github.com/elastic/go-sysinfo/NOTICE.txt

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

47 changes: 44 additions & 3 deletions vendor/github.com/elastic/go-sysinfo/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions vendor/github.com/elastic/go-sysinfo/go.mod

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

27 changes: 27 additions & 0 deletions vendor/github.com/elastic/go-sysinfo/go.sum

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 18 additions & 6 deletions vendor/github.com/elastic/go-sysinfo/providers/linux/host_linux.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 069ab53

Please sign in to comment.