Open andrewkroh opened 1 year ago
In https://github.com/elastic/go-sysinfo/pull/135 we changed from a custom sysctl implementation to the Go stdlib version. There is a kernel bug^1 in Catalina that causes the stdlib version to return bad data to go-sysinfo. There is issue open in Go to track a possible fix https://github.com/golang/go/issues/60047.
sysctl
https://github.com/elastic/go-sysinfo/pull/172 adds defensive measures to prevent bad data from causing a panic in go-sysinfo. We probably need another change to revert to the custom sysctl implementation for Catalina (darwin/amd64 version 10.15).
goroutine 1 [running]: github.com/elastic/go-sysinfo/providers/darwin.kern_procargs(0xc0003df430?, 0xc0001168c0) github.com/elastic/go-sysinfo@v1.9.0/providers/darwin/process_darwin.go:207 +0x58f github.com/elastic/go-sysinfo/providers/darwin.(*process).Info(0xc0001168c0) github.com/elastic/go-sysinfo@v1.9.0/providers/darwin/process_darwin.go:104 +0x1b4 go.elastic.co/apm/v2.currentProcessTitle() go.elastic.co/apm/v2@v2.0.0/utils_other.go:34 +0x5f go.elastic.co/apm/v2.getCurrentProcess() go.elastic.co/apm/v2@v2.0.0/utils.go:83 +0x65 go.elastic.co/apm/v2.init.1() go.elastic.co/apm/v2@v2.0.0/utils.go:77 +0x2b
https://discuss.elastic.co/t/macos-10-15-7-cannot-execute-filebeat-auditbeat-or-metricbeat/333471
Once I get my patch submitted, reverting to the custom sysctl implementation shouldn't be necessary.
In https://github.com/elastic/go-sysinfo/pull/135 we changed from a custom
sysctl
implementation to the Go stdlib version. There is a kernel bug^1 in Catalina that causes the stdlib version to return bad data to go-sysinfo. There is issue open in Go to track a possible fix https://github.com/golang/go/issues/60047.https://github.com/elastic/go-sysinfo/pull/172 adds defensive measures to prevent bad data from causing a panic in go-sysinfo. We probably need another change to revert to the custom
sysctl
implementation for Catalina (darwin/amd64 version 10.15).https://discuss.elastic.co/t/macos-10-15-7-cannot-execute-filebeat-auditbeat-or-metricbeat/333471