-
Notifications
You must be signed in to change notification settings - Fork 152
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
Quickly segfaults on FreeBSD #90
Comments
Thanks for reporting this. I'll try to reproduce it. Are you running on an |
Yes, this is amd64. |
I cannot reproduce this. I got a FreeBSD 12.1 x64 zfs Droplet on Digitalocean, and the latest go1.14.2.freebsd distribution from dl.golang.org. I ran Do you see any difference between your setup and mine? |
I will keep it running for a few days. |
It could have something to do with the type of files you're monitoring. I'll see if I can find a configuration that reproduces the failure quickly. |
I just checked again: It's still up and running after 4 days. So yes, if you have any way to reproduce this it would be awesome. |
We have some progress to report. I still don't have any easy recipe for reproducing the problem, but we've determined that the failure is related to asyncronous preemption, which was introduced in go 1.14 (see https://golang.org/doc/go1.14#runtime). We can see this asynchronous preemption in progress by using truss:
Note the Finally, we've found that disabling asynchronous preemption eliminates the problem. If we invoke the grok_exporter like this, nothing crashes:
I see that grok_exporter is calling kevent in tailer/fswatcher/fseventProducerLoop_darwin.go, function runKeventLoop. So I think that the early return in the case of EINTR must be failing to set a variable, or some code later on must be wrongly assuming that some gochans will be non-empty. But unfortunately my go skills aren't good enough to provide a patch. |
There are some details for a problem report:
with nil error or line, it seems that channels tail.Errors() and tail.Lines() are empty, and it's causing SIGSEGV. |
Fixed with #103 |
grok_exporter 1.0.0.RC3 (and master too) quickly segfault on FreeBSD. It takes anywhere from 0.1s to about 3 minutes.
This happens when built with Go 1.14. So far we haven't observed the problem using Go 1.13.
The text was updated successfully, but these errors were encountered: