forked from tensorflow/tensorboard
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix EventFileWriter deadlock on exception in background thread (tenso…
…rflow#6168) ## Motivation for features / changes To address tensorflow#6167 ## Technical description of changes This is a bug fix for possible deadlock when writing events through `EventFileWriter`. The PR adds logic in `_AsyncWriterThread` to catch exception to propagate it to the calling thread and adds logic to `_AsyncWriter` to propagate exception raised in `_AsyncWriterThread` ## Detailed steps to verify changes work correctly (as executed by you) New unit test that is not passing on master ## Alternate designs / implementations considered * Instead of popping an item from the queue on exception, it's possible to make `wait`/`flush` methods re-check the status periodically * Instead of raising an exception in the foreground thread, it's possible to ignore the raised exception altogether and just start dropping events * It's possible to drop the data after it cannot be added to the queue for a certain period of time Signed-off-by: Mik Vyatskov <[email protected]>
- Loading branch information
1 parent
e8c54b6
commit 7420d5d
Showing
2 changed files
with
84 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters