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

mgr/dashboard: Fix data race and use-before-assignment #21590

Merged

Conversation

sebastian-philipp
Copy link
Contributor

@sebastian-philipp sebastian-philipp commented Apr 23, 2018

The race happens, if a task raises an exception very early.
Then, self.getter_thread.event fails as getter_thread is
already None

Also fix use-before-assignment, as t0 and t1 are only defined,
if no exception was raised.

Found-by and required for #21066 . See also #21066/tools.py Line 127

Signed-off-by: Sebastian Wagner sebastian.wagner@suse.com

The race happes, if a task raises an exception very early.
Then, `self.getter_thread.event` fails as `getter_thread` is
already `None`

Also fix use-before-assignment, as `t0` and `t1` are only defined,
if no exception was raised.

Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
Copy link
Contributor

@rjfd rjfd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@tchaikov tchaikov merged commit 713ebcd into ceph:master Apr 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants