Skip to content

Kick sharding is unsafe #38

@dklempner

Description

@dklempner

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.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions