Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upRules manager Panic caused by closing a channel more than once. #4133
Comments
This comment has been minimized.
This comment has been minimized.
daveworth
commented
May 4, 2018
|
I would love to take on fixing this bug. |
This comment has been minimized.
This comment has been minimized.
|
the report was from @beorn7 and I already opened a PR(link above) with a suggested fix , but that is without managing to replicate it. |
This comment has been minimized.
This comment has been minimized.
daveworth
commented
May 4, 2018
|
|
This comment has been minimized.
This comment has been minimized.
|
thanks |
krasi-georgiev
changed the title
Rules manager needs refactoring to fix a Panic caused by closing a channel more than once.
Rules manager Panic caused by closing a channel more than once.
May 15, 2018
This comment has been minimized.
This comment has been minimized.
|
@daveworth you can have a go if you want as I couldn't replicate it and a better PR would be finding what caused closing this channel twice rather than preventing for double closing the same channel. |
This comment has been minimized.
This comment has been minimized.
|
I think this race is more likely to happen the other way, TERM and then HUP. |
This comment has been minimized.
This comment has been minimized.
daveworth
commented
Jun 15, 2018
|
|
This comment has been minimized.
This comment has been minimized.
codwu
commented
Jun 19, 2018
|
I have thousands of rules in my Prometheus. It is easy to replicate it when sending SIGTERM. |
This comment has been minimized.
This comment has been minimized.
|
Here's a test that gives "close of closed channel", using the fixture yaml from #4306 :
What is the expected state of |
This comment has been minimized.
This comment has been minimized.
|
Not panicing would be the expected state :) It should no longer be writing anything to storage. Emptying groups was also my thought on handling this. |
This comment has been minimized.
This comment has been minimized.
|
Given that |
This comment has been minimized.
This comment has been minimized.
|
The other option is that we make it so an Update can't be called after a shutdown is initiated. It might be better to centralise that logic in once place rather than spreading it around in each subsystem. |
brian-brazil
added a commit
that referenced
this issue
Jun 28, 2018
brian-brazil
referenced this issue
Jun 28, 2018
Merged
Reorder startup and shutdown to prevent panics. #4321
brian-brazil
closed this
in
#4321
Jul 4, 2018
brian-brazil
added a commit
that referenced
this issue
Jul 4, 2018
brian-brazil
added a commit
that referenced
this issue
Jul 11, 2018
mknapphrt
added a commit
to mknapphrt/prometheus
that referenced
this issue
Jul 26, 2018
gouthamve
added a commit
to gouthamve/prometheus
that referenced
this issue
Aug 1, 2018
bobmshannon
pushed a commit
to bobmshannon/prometheus
that referenced
this issue
Nov 19, 2018
This comment has been minimized.
This comment has been minimized.
lock
bot
commented
Mar 22, 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. |
krasi-georgiev commentedMay 2, 2018
•
edited
caused when sending a SIGHUP. and SIGTERM right after that.
I looked briefly and seems like an easy one to solve.