Conversation
|
|
|
20a24d0 to
f069dd4
Compare
|
|
|
|
Why is this fix necessary? All of the callbacks that this adds refs for run as part of handling a batch sent down from the surface, and the surface maintains a ref to the call stack for each pending batch. The batch can't return until these callbacks return, so there should be no way for the call stack to be unreffed before the batches return. What am I missing here? Also, can we add a test that triggers the problem that this solves, so that we won't have regressions in the future? |
|
@markdroth In the second call, we can see the "completion" unref happens before the "perform_stream_op". I suspect batches are getting early-completed on cancellation. |
|
I suspect |
Fixes issue #13327.
De-referencing the stack in the cancellation callback is unsafe. There may be closures on the executor that need the call stack, and cancellation can happen before they are run.