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

Kick sharding is unsafe #38

Closed
dklempner opened this issue Jan 15, 2015 · 1 comment
Closed

Kick sharding is unsafe #38

dklempner opened this issue Jan 15, 2015 · 1 comment
Assignees

Comments

@dklempner
Copy link
Contributor

iomgr currently uses a sharding mechanism where multiple pollsets may share kick-pipes.

This is unsafe: consider two threads with two separate pollsets sharing a kick pipe. The first thread is polling on pollset A. The second thread is about to poll on pollset B. A third thread tries to kick pollset B. That wakes up the first thread, which drains the pipe. Now thread 2 enters poll and never sees the wakeup.

It is possible to avoid this in principle by ensuring only the target of the wakeup does the drain, but we're probably better off just freelisting and dynamically assigning kick pipes to begin with.

@dklempner
Copy link
Contributor Author

This was fixed with the kick pipe refactor from #96

apolcyn referenced this issue in apolcyn/grpc Jul 25, 2016
Add PHP docs to public site
ctiller added a commit that referenced this issue Oct 18, 2016
@lock lock bot locked as resolved and limited conversation to collaborators Oct 6, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant