Commit 639661f1 authored by Shanqing Cai's avatar Shanqing Cai Committed by TensorFlower Gardener
Browse files

tfdbg: fix a few bugs in grpc_debug_server.py

1. Remove an extraneous EventReply yielding from core metadata case. This bug prevented request_watch() and request_unwatch() calls from taking effect from on_core_metadata() of a stream handler. Covering this fix with a new option in start_server_on_separate_thread in grpc_debug_test_server.py and a new test: SessionDebugGrpcGatingTest.testToggleWatchesOnCoreMetadata in session_debug_grpc_test.py.

2. Fix a typo related to op state: READ_WRITE --> READ_ONLY.

3. Fix a race condition in DebugGrpcChannel::ReadEventReply by moving the mutex_lock to the right place. This prevented multiple breakpoints from working, but did not affect multiple watchpoints (which is what's used by NanChucks). Covering the fix by watching two nodes (instead of one) at a time in SessionDebugGrpcGatingTest.testToggleBreakpointsWorks in session_debug_grpc_test.py

Also:
* Refactor the code for getting or creating a DebugGrpcChannel from a grpc:// URL into a helper method: GetOrCreateDebugGrpcChannel().
PiperOrigin-RevId: 169413046
parent 2a4ddfb2
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment