Skip to content

Conversation

@mautier
Copy link

@mautier mautier commented Jun 26, 2021

When starting up tensorboard and the plugin in a directory where there
is no profile data, TorchProfilerPlugin.is_active() hangs forever. This
makes the tensorboard server hang, and client-side webpage remain blank.

This commit fixes the issue by ensuring that the thread monitoring the
run directories for data notifies the _is_active_initialized_event
flag not only when data is found, but also when the search is complete
and no data was found.

A simple unit test is added which validates the fix: without this
commit, the test hangs indefinitely.

When starting up tensorboard and the plugin in a directory where there
is no profile data, `TorchProfilerPlugin.is_active()` hangs forever. This
makes the tensorboard server hang, and client-side webpage remain blank.

This commit fixes the issue by ensuring that the thread monitoring the
run directories for data notifies the `_is_active_initialized_event`
flag not only when data is found, but also when the search is complete
and no data was found.

A simple unit test is added which validates the fix: without this
commit, the test hangs indefinitely.
@mautier mautier force-pushed the bugfix/tb_plugin/fix_startup_hang_when_no_data branch from 8740b99 to a4e3406 Compare June 26, 2021 12:32
@guotuofeng
Copy link
Contributor

This is a known issue, #270. We will think about it and gave a symmetrical fix.

@guotuofeng
Copy link
Contributor

guotuofeng commented Jun 28, 2021

The fix is no exhaustive and it will be closed.

@guotuofeng
Copy link
Contributor

#340 should fix the issue

@mautier
Copy link
Author

mautier commented Jul 10, 2021

Awesome thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants