GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |
GeezerVison is showing github.com — Auto-port 4.2: Resume SslHandler when the delegated task was consumed elsewhere by netty-project-bot · Pull Request #18406 · netty/netty Conversation
Contributor
Auto-port of #18372 to 4.2 Motivation:
Modification: When Add a regression test that uses an Result: The handshake can no longer get stuck when a delegated task was consumed before the Note: I could not find a code path in Tested with
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions) Motivation: `SslTasksRunner.run()` returns silently when `SSLEngine.getDelegatedTask()` returns `null`, treating it as "the task was processed in the meantime". Nobody is guaranteed to call `runComplete()` in that case, so `STATE_PROCESS_TASK` stays set forever. `decode()` and `flush()` then return early for every subsequent call and the handshake stalls until it times out, even though the engine is ready to make progress. Modification: When `getDelegatedTask()` returns `null`, hop onto the `EventExecutor` and resume if `STATE_PROCESS_TASK` is still set. We only run one task at a time (`STATE_PROCESS_TASK` makes `decode()` and `flush()` return early while it is set), so there is no other runner that could still be executing a task and we can always resume. If the state was already cleared, somebody else resumed and we do nothing. Add a regression test that uses an `SSLEngine` which consumes the first delegated task itself and returns `null` for it. Without the fix the handshake never completes. Result: The handshake can no longer get stuck when a delegated task was consumed before the `SslTasksRunner` got to run it. Note: I could not find a code path in `SslHandler` that reaches this branch with the JDK engine or `ReferenceCountedOpenSslEngine` today, so this is a hardening change. It was found while looking at a timed out `KQueueSocketSslEchoTest` on #18368 and is not shown to be the cause of it. Tested with `./mvnw -pl handler -am test -Dtest=SslHandlerTest` (59 run, 0 failures, 1 skipped; checkstyle ran as part of it). The new test fails without the change. (cherry picked from commit 63ac5f2)
|
There was an error while loading. Please reload this page.
✅ All tests passed ✅🏷️ Commit: 827acb4 Learn more about TestLens at testlens.app/docs. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.