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

Panic when shutting down Metricbeat docker container #21869

Closed
ycombinator opened this issue Oct 15, 2020 · 4 comments · Fixed by #21882
Closed

Panic when shutting down Metricbeat docker container #21869

ycombinator opened this issue Oct 15, 2020 · 4 comments · Fixed by #21882
Assignees
Labels
bug Team:Integrations Label for the Integrations team Team:Platforms Label for the Integrations - Platforms team

Comments

@ycombinator
Copy link
Contributor

  • Version: 7.10.0 BC2

  • Operating System: Linux (Docker)

  • Steps to Reproduce:

    1. Load the 7.10.0 BC2 Docker image for Metricbeat.
      curl https://staging.elastic.co/7.10.0-174bd372/downloads/beats/metricbeat/metricbeat-7.10.0-docker-image-linux-amd64.tar.gz | docker load
      
    2. Run Metricbeat (with the console output for simpler test case).
    docker run docker.elastic.co/beats/metricbeat:7.10.0 -e -E output.console.enabled=true -E output.elasticsearch.enabled=false
    
    1. Stop the Metricbeat container, either by pressing Ctrl+c or by running docker stop ... in a separate window.
  • Observed behavior: Metricbeat shuts down but the add_docker_metadata processor seems to panic.

    2020-10-15T20:51:58.373Z	INFO	[monitoring]	log/log.go:154	Uptime: 8.7036773s
    2020-10-15T20:51:58.373Z	INFO	[monitoring]	log/log.go:131	Stopping metrics logging.
    2020-10-15T20:51:58.373Z	INFO	runtime/panic.go:975	metricbeat stopped.
    2020-10-15T20:51:58.373Z	FATAL	[metricbeat]	instance/beat.go:164	Failed due to panic.	{"panic": "runtime error: invalid memory address or nil pointer dereference", "stack": "github.com/elastic/beats/v7/libbeat/cmd/instance.Run.func1.1\n\t/go/src/github.com/elastic/beats/libbeat/cmd/instance/beat.go:165\nruntime.gopanic\n\t/usr/local/go/src/runtime/panic.go:969\nruntime.panicmem\n\t/usr/local/go/src/runtime/panic.go:212\nruntime.sigpanic\n\t/usr/local/go/src/runtime/signal_unix.go:695\ngithub.com/elastic/beats/v7/libbeat/processors/add_docker_metadata.(*addDockerMetadata).Close\n\t/go/src/github.com/elastic/beats/libbeat/processors/add_docker_metadata/add_docker_metadata.go:216\ngithub.com/elastic/beats/v7/libbeat/processors.Close\n\t/go/src/github.com/elastic/beats/libbeat/processors/processor.go:57\ngithub.com/elastic/beats/v7/libbeat/publisher/processing.(*group).Close\n\t/go/src/github.com/elastic/beats/libbeat/publisher/processing/processors.go:88\ngithub.com/elastic/beats/v7/libbeat/publisher/processing.(*builder).Close\n\t/go/src/github.com/elastic/beats/libbeat/publisher/processing/default.go:369\ngithub.com/elastic/beats/v7/libbeat/cmd/instance.(*Beat).launch.func1\n\t/go/src/github.com/elastic/beats/libbeat/cmd/instance/beat.go:376\ngithub.com/elastic/beats/v7/libbeat/cmd/instance.(*Beat).launch\n\t/go/src/github.com/elastic/beats/libbeat/cmd/instance/beat.go:461\ngithub.com/elastic/beats/v7/libbeat/cmd/instance.Run.func1\n\t/go/src/github.com/elastic/beats/libbeat/cmd/instance/beat.go:189\ngithub.com/elastic/beats/v7/libbeat/cmd/instance.Run\n\t/go/src/github.com/elastic/beats/libbeat/cmd/instance/beat.go:190\ngithub.com/elastic/beats/v7/libbeat/cmd.genRunCmd.func1\n\t/go/src/github.com/elastic/beats/libbeat/cmd/run.go:36\ngithub.com/spf13/cobra.(*Command).execute\n\t/go/pkg/mod/github.com/spf13/[email protected]/command.go:830\ngithub.com/spf13/cobra.(*Command).ExecuteC\n\t/go/pkg/mod/github.com/spf13/[email protected]/command.go:914\ngithub.com/spf13/cobra.(*Command).Execute\n\t/go/pkg/mod/github.com/spf13/[email protected]/command.go:864\nmain.main\n\t/go/src/github.com/elastic/beats/x-pack/metricbeat/main.go:21\nruntime.main\n\t/usr/local/go/src/runtime/proc.go:203"}
    
  • Expected behavior: No panic.

@ycombinator ycombinator added bug Team:Integrations Label for the Integrations team labels Oct 15, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/integrations (Team:Integrations)

@ycombinator
Copy link
Contributor Author

I just re-tested this with Metricbeat 7.9.0 and the panic isn't happening there, so it looks like a bug introduced in 7.10.0.

@jsoriano
Copy link
Member

This is probably related to #16349, I will take a look tomorrow.

@jsoriano jsoriano self-assigned this Oct 15, 2020
@jsoriano jsoriano added the Team:Platforms Label for the Integrations - Platforms team label Oct 15, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/integrations-platforms (Team:Platforms)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Team:Integrations Label for the Integrations team Team:Platforms Label for the Integrations - Platforms team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants