netty / netty-incubator-transport-io_uring

Apache License 2.0
195 stars 39 forks source link

Fix race condition in IOUringEventLoop that prevents shutdown #227

Closed bryce-anderson closed 1 year ago

bryce-anderson commented 1 year ago

Motivation:

Short lived IOUringEventLoop's can fail to shutdown, being stuck in the read-completion phase. This is because under race conditions we can get a task that skips the submission of the eventFd and then exits.

Modifications:

Result:

Less stalled threads on shutdown.

bryce-anderson commented 1 year ago

For details about the debugging done to find this see https://github.com/netty/netty-incubator-transport-io_uring/pull/226

bryce-anderson commented 1 year ago

Discussed with @chrisvest offline, and presuming this is good to go, we should port the test to Netty5.

idelpivnitskiy commented 1 year ago

Thanks a lot for fixing it!

normanmaurer commented 1 year ago

@bryce-anderson can you also open a PR for netty 5 ?