-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Crash in cgo DNS code #304
Comments
Do you have more of the stack trace, including at least the first goroutine? Does this happen every time? |
Looks like this WARN about bad email has nothing to do with the crash. First:
Second:
And so on every time, not sure what's the circumstance leads to this, but I am doing just small things. |
That looks like a segfault when go is doing DNS lookups |
Yeah. Go calls into glibc's |
DNS was working fine because Alertmanager was able to send email to the correct email address. Your tarball https://github.com/prometheus/alertmanager/releases/download/0.1.1/alertmanager-0.1.1.linux-amd64.tar.gz Running on Centos 7.2 x86_64 latest. |
@fabxc @sdurrheimer Was this already built with promu or similar? What version of glibc/musl is baked into that? @roman-vynar While some DNS lookups may work, both crashes strongly indicate that they happened during DNS lookups, in the cgo part (getaddrinfo). |
@juliusv This binary looks like it has been build with the Maybe we should consider always using go internal resolver with the |
Note, I am seeing similar segfaults with alertmanager built manually from master using |
@knyar Interesting, thanks! What Go version are you using? Have you tried the very latest (1.6.2)? It must be either something wrong with the libc, or with Go's cgo handling... |
Can you also try to build with the following
|
The previous version I was using had been built by 1.5.1 (from Jessie backports package). |
Actually, alertmanager built by 1.6.2 eventually crashed in a similar way. |
@knyar Did you encountered another crash since you've rebuilt using |
No, it's been running for 6 days now without crashing. |
@fabxc @juliusv @brian-brazil I think we should put on the table the possibility to always build with the |
Agree, netgo will give me consistent results overall and remove this kind
of issues.
|
Let's make sure it's clear in the README too, for those building by hand. |
and conversely, anyone who needs name resolution not supported in netgo
needs to build by hand.
|
I'm using the binary from the releases page and getting what looks to be the same issue:
|
The next release will use the netgo resolver, meanwhile you can build by hand with You can also use a artifact from one of the recent master circleci builds |
Thanks - I will! |
@roman-vynar @knyar @chbatey Guys, can we have a final feedback if you are still encountering this kind of problem since we use |
I have not been using alertmanager for quite some time so I can't provide any update on this. |
I have not seen this issue on an alertmanager built with |
Ok thx for the feedback. I'm gonna close this issue. |
- When building static binaries with CGO, cgo unix network segfaults - When building dynamically linked binaries with CGO, everything is fine prometheus/alertmanager#304 golang/go#7857 Signed-off-by: Ying Li <[email protected]>
- When building static binaries with CGO, cgo unix network segfaults - When building dynamically linked binaries with CGO, everything is fine prometheus/alertmanager#304 golang/go#7857 Signed-off-by: Ying Li <[email protected]>
- When building static binaries with CGO, cgo unix network segfaults - When building dynamically linked binaries with CGO, everything is fine - When building static binaries with CGO but with -tags netgo passed, everything is fine So update our cross and static builds to include netgo. prometheus/alertmanager#304 golang/go#7857 Signed-off-by: Ying Li <[email protected]>
Alertmanager crashes when notify by email fails:
I expect it to log an error but not crash.
The text was updated successfully, but these errors were encountered: