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

Run createTransportRunnable outside of lock. #1527

Merged
merged 1 commit into from Mar 7, 2016

Conversation

zhangkun83
Copy link
Contributor

Because scheduleConnection() is run under lock, if we ran
createTransportRunnable inside scheduleConnection(),
savedDelayedTransport.setTransport() will be under lock which violates
the assumption made in #1408 that

there is an implicit rule today that channel layer will not hold any lock while calling into transport

and had caused deadlock with InProcessTransport.

This is a partial back-port of 0e14516
from master. A large portion of changes on tests is not ported because
of conflict caused by API changes in master.

Because `scheduleConnection()` is run under lock, if we ran
`createTransportRunnable` inside `scheduleConnection()`,
`savedDelayedTransport.setTransport()` will be under lock which violates
the assumption made in grpc#1408 that

> there is an implicit rule today that channel layer will not hold any lock while calling into transport

and had caused deadlock with `InProcessTransport`.

This is a partial back-port of 0e14516
from master. A large portion of changes on tests is not ported because
of conflict caused by API changes in master.
@ejona86
Copy link
Member

ejona86 commented Mar 7, 2016

@zhangkun83 LGTM

@zhangkun83 zhangkun83 merged commit ea43d76 into grpc:v0.13.x Mar 7, 2016
@lock lock bot locked as resolved and limited conversation to collaborators Jan 21, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants