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

Potential issue when sending SIGHUP before ready #2563

Closed
juliusv opened this Issue Apr 4, 2017 · 5 comments

Comments

Projects
None yet
6 participants
@juliusv
Copy link
Member

juliusv commented Apr 4, 2017

From a user on IRC:

The user reported Prometheus blocking on startup. Then:

"I was able to find the root cause of the problem. It was related to my program sending a SIGHUP to prometheus to reload it's configuration before prometheus registered the SIGHUP handler"

We should investigate whether our startup HUP signal handling is broken.

@gouthamve

This comment has been minimized.

Copy link
Member

gouthamve commented Jul 21, 2017

If someone wants to look into this, here are some pointers:
Out HUP handler is registered just before this: https://github.com/prometheus/prometheus/blob/master/cmd/prometheus/main.go#L188

Since it is hard to actually send a HUP before stuff starts, I think the best thing we can do is to add time.Sleep() at that point and see if something is off.
Then move the sleep to after localstorage starts. After notifier.Start() and so on to see if anything breaks anywhere.

If nothing breaks, I think it is safe to close this.

@alwindoss

This comment has been minimized.

Copy link

alwindoss commented Aug 20, 2017

I am willing to work on this issue.
I am new to prometheus and relatively new to "go" and have worked on some hobby projects. Could someone help me through the initials here.

@grobie

This comment has been minimized.

Copy link
Member

grobie commented Nov 12, 2017

@krasi-georgiev can you confirm this is fixed with the main.go refactoring? This would be a great test.

@krasi-georgiev

This comment has been minimized.

Copy link
Member

krasi-georgiev commented Nov 12, 2017

yes just tested with a sleep before close(reloadReady) and it doesn't block the startup

will add it to the main.go tests issue

@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.