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 — Don't leak FixedChannelPool slots on unrelated IllegalArgumentException by allthingssecurity · Pull Request #17609 · netty/netty Don't leak FixedChannelPool slots on unrelated IllegalArgumentException #17609New issueHave 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
Merged
normanmaurer
merged 1 commit into
netty:4.2
from
allthingssecurity:fix-fixedchannelpool-iae-slot-leak
+58
−4
Merged
Changes from all commits
Commits
File filterConversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading. Please reload this page. Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading. Please reload this page. Diff viewDiff view
Don't leak FixedChannelPool slots on unrelated IllegalArgumentException
Motivation: FixedChannelPool.release(...) does not give back the acquired slot if the release failed with an IllegalArgumentException, as this is what SimpleChannelPool uses when the Channel was not acquired from the pool. However the release also fails with any exception thrown by user code, for example ChannelPoolHandler.channelReleased(), ChannelHealthChecker.isHealthy() or an overridden offerChannel(). If that exception is an IllegalArgumentException, the Channel is closed but still counted as acquired. The slot is lost forever, and with maxConnections = 1 every later acquire() waits forever or times out. Modification: - Fail the release of a Channel that was not acquired from the pool with a package-private ChannelNotAcquiredFromPoolException. It extends IllegalArgumentException and keeps the message, so code that catches IllegalArgumentException still works. - Only skip the decrement in FixedChannelPool for that exception. - Add a test where channelReleased() throws an IllegalArgumentException. - Check in testReleaseDifferentPool that releasing a Channel to the wrong pool does not give back a slot of that pool. Result: A release that fails for any other reason than "not acquired from this pool" always gives back its slot. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Uh oh!
There was an error while loading. Please reload this page.
commit 6f2db9e4d77ec0471775e212498c4972b2e3d256
There are no files selected for viewing
Oops, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
|
| You are visitor 01402775 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |