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 — Build stability fix + .gitignore update by trustin · Pull Request #1 · netty/netty Conversation
This was referenced
Closed
This was referenced
normanmaurer
added a commit
that referenced
this pull request
#14475) …4472) Motivation: Corretto does not use "likes" and so we need to ensure we compute it without these. Modifications: Manually compose the classifier to use Result: Always use the correct classifier no matter on which linux system we compile
normanmaurer
added a commit
that referenced
this pull request
#14833) …4830) Motivation: We need to check if pendingUnencryptedWrites is null before accessing it as the SslHandler might have been removed in the meantime. ``` io.netty.handler.codec.DecoderException: java.lang.NullPointerException: Cannot invoke "io.netty.handler.ssl.SslHandlerCoalescingBufferQueue.isEmpty()" because "this.pendingUnencryptedWrites" is null at io.netty.handler.ssl.SslHandler$SslTasksRunner.wrapIfNeeded(SslHandler.java:1798) at io.netty.handler.ssl.SslHandler$SslTasksRunner.safeExceptionCaught(SslHandler.java:1785) at io.netty.handler.ssl.SslHandler$SslTasksRunner.resumeOnEventExecutor(SslHandler.java:1896) at io.netty.handler.ssl.SslHandler$SslTasksRunner.access$2000(SslHandler.java:1751) at io.netty.handler.ssl.SslHandler$SslTasksRunner$2.run(SslHandler.java:1912) at io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java:173) at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:166) at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:472) at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:405) at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:998) at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) at java.base/java.lang.Thread.run(Thread.java:833) Caused by: java.lang.NullPointerException: Cannot invoke "io.netty.handler.ssl.SslHandlerCoalescingBufferQueue.isEmpty()" because "this.pendingUnencryptedWrites" is null at io.netty.handler.ssl.SslHandler.unwrap(SslHandler.java:1503) at io.netty.handler.ssl.SslHandler.unwrapNonAppData(SslHandler.java:1469) at io.netty.handler.ssl.SslHandler.access$1800(SslHandler.java:170) at io.netty.handler.ssl.SslHandler$SslTasksRunner.resumeOnEventExecutor(SslHandler.java:1847) ... 9 more ``` Modifications: Add null check Result: Fix NPE
normanmaurer
added a commit
that referenced
this pull request
#14870) …4799) …#encodeNextChunkUrlEncoded(int) for current InterfaceHttpData Motivation: I am using `HttpPostRequestEncoder` to encode a few request parameters, but I read **infinite** chunks when the following conditions are met: 1. The number of POST request parameters is greater than or equal to 2. 2. The length of the first request parameter value > `DefaultHttpDataFactory#minSize`. 3. The length of the first request parameter key + the length of the request parameter value + 2 = N * `HttpPostBodyUtil#chunkSize` This issue can be reproduced by modifying the [length](https://github.com/netty/netty/blob/34011b5f02c52122eccd36ce7cc69502a514d0f1/codec-http/src/test/java/io/netty/handler/codec/http/multipart/HttpPostRequestEncoderTest.java#L454) variable in the [HttpPostRequestEncoderTest#testEncodeChunkedContent()](https://github.com/netty/netty/blob/34011b5f02c52122eccd36ce7cc69502a514d0f1/codec-http/src/test/java/io/netty/handler/codec/http/multipart/HttpPostRequestEncoderTest.java#L450) method to `HttpPostBodyUtil.chunkSize * 3 - 4 - 2`. Normally, this test method should complete quickly, but when the length variable is set to `HttpPostBodyUtil.chunkSize * 3 - 4 - 2`, it will never finish. Modification: 1. Enhance the logic of determining whether the current `InterfaceHttpData` has been fully read. Result: Fix flawed termination condition check. Co-authored-by: LinShunKang <[email protected]> Co-authored-by: LinShunKang <[email protected]>
normanmaurer
added a commit
that referenced
this pull request
#15293) …5279) Motivation: In Kqueue it sometimes happened that we did see a WARN that the registration for a given id could not be found. The reason for this was that it is possible that the registration was already be cancelled by the user and so not present anymore. In this case the logs are harmless but still confusing. We should better ensure we handle it better. Modifications: When the user cancels a registration just mark it as cancelled and remove it from the map one all events are processed. Result: Less confusing logging and more correct handling of cancelled registrations
normanmaurer
added a commit
that referenced
this pull request
#15395) …5281) Motivation: In our testsuite we often just wrapped a byte[] and passed it to the write method. While this works it also might end up not testing often with direct buffers. We should make this a bit more random and so cover direct and heap buffers. The idea popped up when reviewing #15231 Modifications: - Add new static helper method that will either return a wrapped buffer or a direct buffers in a random fashion - Use this method to allocate buffers Result: More random testing of heap / direct buffers
normanmaurer
pushed a commit
that referenced
this pull request
Motivation: Production allocation profiling identified `SslHandler.wrap()`'s `ctx.newPromise()` as the source of ~79% of sampled `DefaultChannelPromise` allocations. `wrap()` allocates the promise before checking whether `pendingUnencryptedWrites` contains another entry. After the last entry is consumed, the loop may iterate once more, allocate a `ChannelPromise`, receive null from remove/removeFirst, and immediately discard the promise. <img width="1538" height="110" alt="image" src="https://github.com/user-attachments/assets/e567e5f5-281e-4fcd-8c64-d5e5a320efcd" /> Flow: ``` iteration #1 newPromise() // useful removeFirst() -> buf encrypt buf queue now empty iteration #2 newPromise() // wasted allocation removeFirst() -> null break ``` Modification: Added a guard check `!pendingUnencryptedWrites.isEmpty()` to avoid unnecessary loop iteration. Result: Less garbage in SslHandler for outgoing packets. ``` import io.netty.buffer.ByteBuf; import org.openjdk.jmh.annotations.Benchmark; public class SslHandlerWrapBenchmark extends AbstractSslHandlerThroughputBenchmark { @benchmark public int wrapOneWrite() throws Exception { ByteBuf encrypted = doWrite(1); try { return encrypted.readableBytes(); } finally { encrypted.release(); } } } ``` ``` baseline: 1411.886 B/op patched: 1336.061 B/op delta: 75.825 B/op ```
normanmaurer
added a commit
that referenced
this pull request
Motivation: Production allocation profiling identified `SslHandler.wrap()`'s `ctx.newPromise()` as the source of ~79% of sampled `DefaultChannelPromise` allocations. `wrap()` allocates the promise before checking whether `pendingUnencryptedWrites` contains another entry. After the last entry is consumed, the loop may iterate once more, allocate a `ChannelPromise`, receive null from remove/removeFirst, and immediately discard the promise. <img width="1538" height="110" alt="image" src="https://github.com/user-attachments/assets/e567e5f5-281e-4fcd-8c64-d5e5a320efcd" /> Flow: ``` iteration #1 newPromise() // useful removeFirst() -> buf encrypt buf queue now empty iteration #2 newPromise() // wasted allocation removeFirst() -> null break ``` Modification: Added a guard check `!pendingUnencryptedWrites.isEmpty()` to avoid unnecessary loop iteration. Result: Less garbage in SslHandler for outgoing packets. ``` import io.netty.buffer.ByteBuf; import org.openjdk.jmh.annotations.Benchmark; public class SslHandlerWrapBenchmark extends AbstractSslHandlerThroughputBenchmark { @benchmark public int wrapOneWrite() throws Exception { ByteBuf encrypted = doWrite(1); try { return encrypted.readableBytes(); } finally { encrypted.release(); } } } ``` ``` baseline: 1411.886 B/op patched: 1336.061 B/op delta: 75.825 B/op ``` Co-authored-by: Dmytro Dumanskiy <[email protected]>
This was referenced
This pull request was closed.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ReviewersNo reviewsUh oh!
There was an error while loading. Please reload this page. AssigneesNo one assignedLabels
None yet
ProjectsMilestoneNo milestoneDevelopmentSuccessfully merging this pull request may close these issues. 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. |