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

event loop thread should never dump server stats #159

Closed
ongardie opened this issue Jun 5, 2015 · 0 comments
Closed

event loop thread should never dump server stats #159

ongardie opened this issue Jun 5, 2015 · 0 comments
Assignees
Labels
Milestone

Comments

@ongardie
Copy link
Member

ongardie commented Jun 5, 2015

Right now a timer or SIGUSR1 will cause the event loop thread to dump server stats to the debug log, which requires several high-level mutexes (Raft's, the state machine's etc). This opens up the potential for deadlock or for simply denying service to the event loop handlers. ServerStats should only be dumped from worker threads.

@ongardie ongardie added the bug label Jun 5, 2015
@ongardie ongardie modified the milestone: 1.1.0 Jul 6, 2015
@ongardie ongardie self-assigned this Jul 6, 2015
nhardt pushed a commit to nhardt/logcabin that referenced this issue Aug 21, 2015
Before the stats were being dumped from the event loop thread (on a
timer and SIGUSR1), which risked blocking the event loop thread for too
long and introduced the possibility of deadlock (in theory; I never saw
that in practice). Now, the event loop thread is only used to signal a
dedicated stats dumper thread.

Close logcabin#159: event loop thread should never dump server stats
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant