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

dev-2.0 stuck trying to exit #2630

Closed
gouthamve opened this Issue Apr 17, 2017 · 5 comments

Comments

Projects
None yet
3 participants
@gouthamve
Copy link
Member

gouthamve commented Apr 17, 2017

Prometheus dev-2.0 branch did not exit after SIGTERM.

Relevant logs: https://gist.github.com/Gouthamve/ba1c52b09034a96d3b73fc85c8939011

I see fdatasync(17) in the middle which makes me think that Prometheus is stuck trying to flush.

cc @fabxc

@gouthamve

This comment has been minimized.

@gouthamve

This comment has been minimized.

Copy link
Member Author

gouthamve commented Apr 17, 2017

Looking at the goroutine dump, I see that this could have been caused by #2629

This is because there are 2 goroutines stuck trying to acquire db.mtx and the exiting is blocked on the db.Close() call which is trying to acquire the lock.

The panic caused by the parser might not have let Querier gracefully RUnlock causing the deadlock.

@fabxc fabxc added the dev-2.0 label Apr 18, 2017

@grobie grobie added the kind/bug label Apr 22, 2017

@gouthamve

This comment has been minimized.

Copy link
Member Author

gouthamve commented Jun 7, 2017

This is due to a panic.

What potentially happened was we panicked due to a bug and that go-routine had acquired a lock. And we cannot gracefully exit until that lock is released. But as this is caused due to a panic, something which should never happen, can we close this?

@fabxc

This comment has been minimized.

Copy link
Member

fabxc commented Jun 7, 2017

I think so yes. We definitely fixed a bunch of cases where we put lock releases into defer statements to prevent this. In general though, if it's a panic, these things might just happen.

@fabxc fabxc closed this Jun 7, 2017

@lock

This comment has been minimized.

Copy link

lock bot commented Mar 23, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked and limited conversation to collaborators Mar 23, 2019

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.