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 on signal during startup #514

Closed
graphaelli opened this issue Jan 17, 2018 · 0 comments · Fixed by #580
Closed

panic on signal during startup #514

graphaelli opened this issue Jan 17, 2018 · 0 comments · Fixed by #580
Assignees
Labels

Comments

@graphaelli
Copy link
Member

Still investigating if the kibana dashboard setup is related or just a convenient way to reproduce this. Reliably getting a panic on ctrl-c immediately after start up using:

$ ./apm-server -e -E setup.kibana.host=localhost:5601 -E setup.dashboards.enabled=true
...
2018-01-17T16:51:38.291-0500	INFO	[monitoring]	log/log.go:95	Starting metrics logging every 30s
2018-01-17T16:51:38.292-0500	INFO	elasticsearch/client.go:145	Elasticsearch url: http://localhost:9200
2018-01-17T16:51:38.298-0500	INFO	elasticsearch/client.go:689	Connected to Elasticsearch version 6.2.0
2018-01-17T16:51:38.298-0500	INFO	kibana/client.go:69	Kibana url: http://localhost:5601
^C
2018-01-17T16:51:38.736-0500	INFO	beater/beater.go:72	stopping apm-server...
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x6c pc=0x42aad44]
goroutine 25 [running]:
net/http.(*Server).Shutdown(0x0, 0x52a4280, 0xc4202ba180, 0x0, 0x0)
	/usr/local/Cellar/go/1.9.2/libexec/src/net/http/server.go:2488 +0x54
github.com/elastic/apm-server/beater.stop(0x0, 0x12a05f200)
	/go/src/github.com/elastic/apm-server/beater/server.go:51 +0x9b
github.com/elastic/apm-server/beater.(*beater).Stop(0xc42014e500)
	/go/src/github.com/elastic/apm-server/beater/beater.go:73 +0x6f
github.com/elastic/apm-server/vendor/github.com/elastic/beats/libbeat/beat.(Beater).Stop-fm()
	/go/src/github.com/elastic/apm-server/vendor/github.com/elastic/beats/libbeat/cmd/instance/beat.go:288 +0x2f
sync.(*Once).Do(0xc420158250, 0xc4201d2140)
	/usr/local/Cellar/go/1.9.2/libexec/src/sync/once.go:44 +0xbe
github.com/elastic/apm-server/vendor/github.com/elastic/beats/libbeat/service.HandleSignals.func1(0xc420394300, 0xc420158250, 0xc4201d2140)
	/go/src/github.com/elastic/apm-server/vendor/github.com/elastic/beats/libbeat/service/service.go:34 +0x99
created by github.com/elastic/apm-server/vendor/github.com/elastic/beats/libbeat/service.HandleSignals
	/go/src/github.com/elastic/apm-server/vendor/github.com/elastic/beats/libbeat/service/service.go:31 +0x106
@graphaelli graphaelli added the bug label Jan 17, 2018
@jalvz jalvz self-assigned this Jan 30, 2018
jalvz pushed a commit to jalvz/apm-server that referenced this issue Jan 30, 2018
…server before assigning it (ie. read before write)

fixes elastic#514
@jalvz jalvz closed this as completed in #580 Feb 1, 2018
jalvz added a commit that referenced this issue Feb 1, 2018
#580)

Introduce a flag and a mutex in the beater so that we can't stop the server before assigning it (ie. read before write)
fixes #514
jalvz added a commit that referenced this issue Feb 1, 2018
#580)

Introduce a flag and a mutex in the beater so that we can't stop the server before assigning it (ie. read before write)
fixes #514
jalvz added a commit that referenced this issue Feb 1, 2018
#580)

Introduce a flag and a mutex in the beater so that we can't stop the server before assigning it (ie. read before write)
fixes #514
jalvz added a commit to jalvz/apm-server that referenced this issue Feb 1, 2018
elastic#580)

Introduce a flag and a mutex in the beater so that we can't stop the server before assigning it (ie. read before write)
fixes elastic#514
jalvz added a commit to jalvz/apm-server that referenced this issue Feb 1, 2018
elastic#580)

Introduce a flag and a mutex in the beater so that we can't stop the server before assigning it (ie. read before write)
fixes elastic#514
jalvz added a commit to jalvz/apm-server that referenced this issue Feb 1, 2018
elastic#580)

Introduce a flag and a mutex in the beater so that we can't stop the server before assigning it (ie. read before write)
fixes elastic#514
jalvz added a commit to jalvz/apm-server that referenced this issue Feb 1, 2018
elastic#580)

Introduce a flag and a mutex in the beater so that we can't stop the server before assigning it (ie. read before write)
fixes elastic#514
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants