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

Goroutine panic #5734

Closed
liar666 opened this issue Nov 28, 2017 · 2 comments
Closed

Goroutine panic #5734

liar666 opened this issue Nov 28, 2017 · 2 comments
Labels

Comments

@liar666
Copy link

liar666 commented Nov 28, 2017

What I did:

docker pull docker.elastic.co/beats/metricbeat:6.0.0
# ... I had to rename/tag the official image to local/metricbeat600 as there are too many '/' is the official name and my docker refused to run...
docker run --net=host -it local/metricbeat600

What I get:
2017/11/28 15:14:34.571211 metrics.go:23: INFO Metrics logging every 30s
2017/11/28 15:14:34.571211 beat.go:426: INFO Home path: [/usr/share/metricbeat] Config path: [/usr/share/metricbeat] Data path: [/usr/share/metricbeat/data] Logs path: [/usr/share/metricbeat/logs]
2017/11/28 15:14:34.572039 beat.go:433: INFO Beat UUID: 007386bc-b8aa-4b0a-bf5c-7ca7d6cf1729
2017/11/28 15:14:34.572081 beat.go:192: INFO Setup Beat: metricbeat; Version: 6.0.0
2017/11/28 15:14:37.572559 add_cloud_metadata.go:292: INFO add_cloud_metadata: hosting provider type not detected.
2017/11/28 15:14:37.573122 client.go:123: INFO Elasticsearch url: http://elasticsearch:9200
2017/11/28 15:14:37.573874 module.go:80: INFO Beat name: X751LAB
2017/11/28 15:14:37.574433 beat.go:260: INFO metricbeat start running.
2017/11/28 15:14:37.578756 reload.go:128: INFO Config reloader started
2017/11/28 15:14:37.582418 reload.go:259: INFO Starting 2 runners ...
2017/11/28 15:14:37.582477 reload.go:220: INFO Loading of config files completed.
2017/11/28 15:14:39.675836 log.go:175: ERR recovered from panic while fetching 'system/process' for host ''. Recovering, but please report this: runtime error: slice bounds out of range.
2017/11/28 15:14:39.676198 log.go:176: ERR Stacktrace: goroutine 132 [running]:
runtime/debug.Stack(0x2a67c9d, 0x2b, 0xc42003f1c8)
/usr/local/go/src/runtime/debug/stack.go:24 +0x79
github.com/elastic/beats/libbeat/logp.Recover(0xc42023ea00, 0x40)
/go/src/github.com/elastic/beats/libbeat/logp/log.go:176 +0x12f
panic(0x26f4340, 0x38c9a00)
/usr/local/go/src/runtime/panic.go:489 +0x2cf
github.com/elastic/beats/metricbeat/module/system/process.(*ProcStats).includeTopProcesses(0xc420194120, 0xc42013c600, 0x1, 0x1, 0x1, 0xc42013c600, 0x0)
/go/src/github.com/elastic/beats/metricbeat/module/system/process/helper.go:414 +0x4ab
github.com/elastic/beats/metricbeat/module/system/process.(*ProcStats).GetProcStats(0xc420194120, 0x100000000, 0x0, 0x28c3800, 0xc420445b10, 0x0)
/go/src/github.com/elastic/beats/metricbeat/module/system/process/helper.go:390 +0x6c8
github.com/elastic/beats/metricbeat/module/system/process.(*MetricSet).Fetch(0xc420266000, 0x2, 0x0, 0x2, 0x2, 0xc420445bd0)
/go/src/github.com/elastic/beats/metricbeat/module/system/process/process.go:82 +0x47
github.com/elastic/beats/metricbeat/mb/module.(*metricSetWrapper).multiEventFetch(0xc42016fac0, 0x7f662a670d40, 0xc420266000, 0x38f7940, 0xc4202c91d0)
/go/src/github.com/elastic/beats/metricbeat/mb/module/wrapper.go:238 +0x4f
github.com/elastic/beats/metricbeat/mb/module.(*metricSetWrapper).fetch(0xc42016fac0, 0x38f7940, 0xc4202c91d0)
/go/src/github.com/elastic/beats/metricbeat/mb/module/wrapper.go:222 +0x118
github.com/elastic/beats/metricbeat/mb/module.(*metricSetWrapper).startPeriodicFetching(0xc42016fac0, 0x38f7940, 0xc4202c91d0)
/go/src/github.com/elastic/beats/metricbeat/mb/module/wrapper.go:199 +0x5d
github.com/elastic/beats/metricbeat/mb/module.(*metricSetWrapper).run(0xc42016fac0, 0xc4202c6600, 0xc4202c6de0)
/go/src/github.com/elastic/beats/metricbeat/mb/module/wrapper.go:186 +0x5b8
github.com/elastic/beats/metricbeat/mb/module.(*Wrapper).Start.func1(0xc4203d0d90, 0xc4202c6600, 0xc4202c6de0, 0xc42016fac0)
/go/src/github.com/elastic/beats/metricbeat/mb/module/wrapper.go:110 +0xbd
created by github.com/elastic/beats/metricbeat/mb/module.(*Wrapper).Start
/go/src/github.com/elastic/beats/metricbeat/mb/module/wrapper.go:111 +0x14e
2017/11/28 15:14:40.362309 client.go:651: INFO Connected to Elasticsearch version 6.0.0

I'm using Ubuntu 17.10. docker version 1.13.1, build 092cba3

I'm running as user (whom is part of the system's "docker" group)

@andrewkroh
Copy link
Member

andrewkroh commented Nov 28, 2017

Thanks for reporting. This looks to be same issue as #5700 and we have a PR open to fix it #5729.

As a work-around you can disable the "include top N" feature (docs) or disable the process metricset.

metricbeat.modules:
- module: system
   metricset: [process]
   process.include_top_n.enabled: false # add this line to /usr/share/metricbeat/modules.d/system.yml in the container.

@andrewkroh
Copy link
Member

I had to rename/tag the official image to local/metricbeat600 as there are too many '/' is the official name and my docker refused to run

I didn't have an issue with docker run -it --rm docker.elastic.co/beats/metricbeat:6.0.0

$ docker version
Client:
 Version:      17.09.0-ce
 API version:  1.32
 Go version:   go1.8.3
 Git commit:   afdb6d4
 Built:        Tue Sep 26 22:40:09 2017
 OS/Arch:      darwin/amd64

Server:
 Version:      17.09.0-ce
 API version:  1.32 (minimum version 1.12)
 Go version:   go1.8.3
 Git commit:   afdb6d4
 Built:        Tue Sep 26 22:45:38 2017
 OS/Arch:      linux/amd64
 Experimental: true

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants