GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Typo fixes by waywardmonkeys · Pull Request #2 · netty/netty

Conversation

@waywardmonkeys

@waywardmonkeys waywardmonkeys commented Nov 23, 2010

Copy link
Copy Markdown
Contributor

The variable is declared as 'embedder' so updating the usages to match.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@waywardmonkeys
Correct variable name in code samples.
41c5308
@trustin

trustin commented Jan 4, 2011

Copy link
Copy Markdown
Member

Cherry-picked. :-)

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@mariusae mariusae mentioned this pull request Nov 20, 2011
Review recursive ChannelHandler execution logic #69
Closed
@kambatla kambatla mentioned this pull request Mar 13, 2012
Channel.close() can lead to deadlocks in certain usecases #231
Closed
ghost pushed a commit to barchart/barchart-project-netty that referenced this pull request Jan 1, 2013
@Andrei-Pozolotin
pull request cleanup netty#2
af1b328
@lhrios lhrios mentioned this pull request Feb 14, 2013
Deadlock in SSLHandler #989
Closed
@tah-mas tah-mas mentioned this pull request Feb 19, 2013
SSLHandler io.netty.buffer.IllegalBufferAccessException #1054
Closed
@lhrios lhrios mentioned this pull request Apr 25, 2013
Deadlock can happen when MemoryAwareThreadPoolExecutor with limit is used #1310
Closed
@anyflow anyflow mentioned this pull request Oct 2, 2013
com.jcraft.jzlib(used in HttpContentCompressor) related 2 issues. #1886
Closed
@andsky andsky mentioned this pull request Dec 10, 2013
[nioEventLoopGroup-3-3] WARN io.netty.util.ResourceLeakDetector - LEAK #2010
Closed
@rpelissier rpelissier mentioned this pull request Jul 4, 2014
io.netty.buffer.ByteBufInputStream Buffer Leak Netty 4.0.21-Final #2636
Closed
@nmittler nmittler mentioned this pull request Jul 16, 2014
HTTP/2 Stream Data to HttpObject Decoder #2658
Closed
@zaykl zaykl mentioned this pull request Aug 5, 2014
StackTraceSimplifier.simplify cause the JVM hung while "Connection reset by peer" #2735
Closed
@nmittler nmittler mentioned this pull request Aug 25, 2014
Upgrading to HTTP/2 draft 14 HTTP/1.x message flow #2778
Closed
@Scottmitch Scottmitch mentioned this pull request Sep 10, 2014
HTTP/2 Data Decompression #2872
Closed
@Scottmitch Scottmitch mentioned this pull request Sep 30, 2014
HTTP/2 decompression buffer leak #2949
Closed
@triones-adam triones-adam mentioned this pull request Feb 3, 2015
frequency jvm crash problem(netty-4.0.0.Alpha8) #1117
Closed
@louiscryan louiscryan mentioned this pull request Feb 4, 2015
Http2DefaultFrameWriter microbenchmark #3392
Closed
@normanmaurer normanmaurer mentioned this pull request Jul 11, 2015
DNS buffer leaks #3974
Closed
@mubarak mubarak mentioned this pull request Aug 16, 2015
Out of memory: Resource leak detector is going recursive #4093
Closed
@normanmaurer normanmaurer mentioned this pull request Sep 9, 2015
Optimize ByteBufUtil.writeUsAscii(...) when AsciiString is used. #4202
Closed
@ninja- ninja- mentioned this pull request Oct 30, 2015
Reduce thread context check overhead #4412
Closed
13 tasks done
@vitaliy-kuzmich vitaliy-kuzmich mentioned this pull request Nov 7, 2015
memory leak netty version : 4.1.0.Beta7 #4450
Closed
@svnp10 svnp10 mentioned this pull request Oct 19, 2016
sslhandler leaking direct buffer #5928
Closed
bigtrak added a commit to bigtrak/netty that referenced this pull request Dec 8, 2016
@bigtrak
Modify to allow push to take place netty#2
96e4bed
@igor-dmitriev igor-dmitriev mentioned this pull request Jan 17, 2017
Possible direct memory leak #6125
Closed
@tomasherman tomasherman mentioned this pull request Mar 27, 2017
Netty DNS resolver ignores provided DNS server address #6573
Closed
@sparkcai sparkcai mentioned this pull request Jul 3, 2019
ByteToMessageDecoder leak ? #9316
Closed
@lanxia lanxia mentioned this pull request Sep 29, 2019
How to release pooled direct buffer when it doesn't enter in channel pipline? #9622
Closed
@kamalkthakur kamalkthakur mentioned this pull request Aug 7, 2020
export keying material from tls connection #10458
Closed
normanmaurer referenced this pull request in normanmaurer/netty Aug 27, 2020
@1Jo1
Merge pull request #2 from normanmaurer/io_uring_break
3cdb1d6
Add missing break statement and cleanup
ejona86 added a commit to ejona86/netty that referenced this pull request Dec 23, 2020
@ejona86
Avoid unsynchronized access to scheduledTaskQueue in GlobalEventExecutor
e3f91f0
Motivation:

A race detector discovered a data race in GlobalEventExecutor present in
netty 4.1.51.Final:

```
  Write of size 4 at 0x0000cea08774 by thread T103:
    #0 io.netty.util.internal.DefaultPriorityQueue.poll()Lio/netty/util/internal/PriorityQueueNode; DefaultPriorityQueue.java:113
    netty#1 io.netty.util.internal.DefaultPriorityQueue.poll()Ljava/lang/Object; DefaultPriorityQueue.java:31
    netty#2 java.util.AbstractQueue.remove()Ljava/lang/Object; AbstractQueue.java:113
    netty#3 io.netty.util.concurrent.AbstractScheduledEventExecutor.pollScheduledTask(J)Ljava/lang/Runnable; AbstractScheduledEventExecutor.java:133
    netty#4 io.netty.util.concurrent.GlobalEventExecutor.fetchFromScheduledTaskQueue()V GlobalEventExecutor.java:119
    netty#5 io.netty.util.concurrent.GlobalEventExecutor.takeTask()Ljava/lang/Runnable; GlobalEventExecutor.java:106
    netty#6 io.netty.util.concurrent.GlobalEventExecutor$TaskRunner.run()V GlobalEventExecutor.java:240
    netty#7 io.netty.util.internal.ThreadExecutorMap$2.run()V ThreadExecutorMap.java:74
    netty#8 io.netty.util.concurrent.FastThreadLocalRunnable.run()V FastThreadLocalRunnable.java:30
    netty#9 java.lang.Thread.run()V Thread.java:835
    netty#10 (Generated Stub) <null>

  Previous read of size 4 at 0x0000cea08774 by thread T110:
    #0 io.netty.util.internal.DefaultPriorityQueue.size()I DefaultPriorityQueue.java:46
    netty#1 io.netty.util.concurrent.GlobalEventExecutor$TaskRunner.run()V GlobalEventExecutor.java:263
    netty#2 io.netty.util.internal.ThreadExecutorMap$2.run()V ThreadExecutorMap.java:74
    netty#3 io.netty.util.concurrent.FastThreadLocalRunnable.run()V FastThreadLocalRunnable.java:30
    netty#4 java.lang.Thread.run()V Thread.java:835
    netty#5 (Generated Stub) <null>
```

The race is legit, but benign. To trigger it requires a TaskRunner to
begin exiting and set 'started' to false, more work to be scheduled
which starts a new TaskRunner, that work then needs to schedule
additional work which modifies 'scheduledTaskQueue', and then the
original TaskRunner checks 'scheduledTaskQueue'. But there is no danger
to this race as it can only produce a false negative in the condition
which causes the code to CAS 'started' which is thread-safe.

Modifications:

Delete problematic references to scheduledTaskQueue. The only way
scheduledTaskQueue could be modified since the last check is if another
TaskRunner is running, in which case the current TaskRunner doesn't
care.

Result:

Data-race free code, and a bit less code to boot.
normanmaurer pushed a commit that referenced this pull request Dec 24, 2020
@ejona86
Avoid unsynchronized access to scheduledTaskQueue in GlobalEventExecu…
4f6e62d
…tor (#10890)

Motivation:

A race detector discovered a data race in GlobalEventExecutor present in
netty 4.1.51.Final:

```
  Write of size 4 at 0x0000cea08774 by thread T103:
    #0 io.netty.util.internal.DefaultPriorityQueue.poll()Lio/netty/util/internal/PriorityQueueNode; DefaultPriorityQueue.java:113
    #1 io.netty.util.internal.DefaultPriorityQueue.poll()Ljava/lang/Object; DefaultPriorityQueue.java:31
    #2 java.util.AbstractQueue.remove()Ljava/lang/Object; AbstractQueue.java:113
    #3 io.netty.util.concurrent.AbstractScheduledEventExecutor.pollScheduledTask(J)Ljava/lang/Runnable; AbstractScheduledEventExecutor.java:133
    #4 io.netty.util.concurrent.GlobalEventExecutor.fetchFromScheduledTaskQueue()V GlobalEventExecutor.java:119
    #5 io.netty.util.concurrent.GlobalEventExecutor.takeTask()Ljava/lang/Runnable; GlobalEventExecutor.java:106
    #6 io.netty.util.concurrent.GlobalEventExecutor$TaskRunner.run()V GlobalEventExecutor.java:240
    #7 io.netty.util.internal.ThreadExecutorMap$2.run()V ThreadExecutorMap.java:74
    #8 io.netty.util.concurrent.FastThreadLocalRunnable.run()V FastThreadLocalRunnable.java:30
    #9 java.lang.Thread.run()V Thread.java:835
    #10 (Generated Stub) <null>

  Previous read of size 4 at 0x0000cea08774 by thread T110:
    #0 io.netty.util.internal.DefaultPriorityQueue.size()I DefaultPriorityQueue.java:46
    #1 io.netty.util.concurrent.GlobalEventExecutor$TaskRunner.run()V GlobalEventExecutor.java:263
    #2 io.netty.util.internal.ThreadExecutorMap$2.run()V ThreadExecutorMap.java:74
    #3 io.netty.util.concurrent.FastThreadLocalRunnable.run()V FastThreadLocalRunnable.java:30
    #4 java.lang.Thread.run()V Thread.java:835
    #5 (Generated Stub) <null>
```

The race is legit, but benign. To trigger it requires a TaskRunner to
begin exiting and set 'started' to false, more work to be scheduled
which starts a new TaskRunner, that work then needs to schedule
additional work which modifies 'scheduledTaskQueue', and then the
original TaskRunner checks 'scheduledTaskQueue'. But there is no danger
to this race as it can only produce a false negative in the condition
which causes the code to CAS 'started' which is thread-safe.

Modifications:

Delete problematic references to scheduledTaskQueue. The only way
scheduledTaskQueue could be modified since the last check is if another
TaskRunner is running, in which case the current TaskRunner doesn't
care.

Result:

Data-race free code, and a bit less code to boot.
normanmaurer pushed a commit that referenced this pull request Dec 24, 2020
@ejona86 @normanmaurer
Avoid unsynchronized access to scheduledTaskQueue in GlobalEventExecu…
b4dcd18
…tor (#10890)

Motivation:

A race detector discovered a data race in GlobalEventExecutor present in
netty 4.1.51.Final:

```
  Write of size 4 at 0x0000cea08774 by thread T103:
    #0 io.netty.util.internal.DefaultPriorityQueue.poll()Lio/netty/util/internal/PriorityQueueNode; DefaultPriorityQueue.java:113
    #1 io.netty.util.internal.DefaultPriorityQueue.poll()Ljava/lang/Object; DefaultPriorityQueue.java:31
    #2 java.util.AbstractQueue.remove()Ljava/lang/Object; AbstractQueue.java:113
    #3 io.netty.util.concurrent.AbstractScheduledEventExecutor.pollScheduledTask(J)Ljava/lang/Runnable; AbstractScheduledEventExecutor.java:133
    #4 io.netty.util.concurrent.GlobalEventExecutor.fetchFromScheduledTaskQueue()V GlobalEventExecutor.java:119
    #5 io.netty.util.concurrent.GlobalEventExecutor.takeTask()Ljava/lang/Runnable; GlobalEventExecutor.java:106
    #6 io.netty.util.concurrent.GlobalEventExecutor$TaskRunner.run()V GlobalEventExecutor.java:240
    #7 io.netty.util.internal.ThreadExecutorMap$2.run()V ThreadExecutorMap.java:74
    #8 io.netty.util.concurrent.FastThreadLocalRunnable.run()V FastThreadLocalRunnable.java:30
    #9 java.lang.Thread.run()V Thread.java:835
    #10 (Generated Stub) <null>

  Previous read of size 4 at 0x0000cea08774 by thread T110:
    #0 io.netty.util.internal.DefaultPriorityQueue.size()I DefaultPriorityQueue.java:46
    #1 io.netty.util.concurrent.GlobalEventExecutor$TaskRunner.run()V GlobalEventExecutor.java:263
    #2 io.netty.util.internal.ThreadExecutorMap$2.run()V ThreadExecutorMap.java:74
    #3 io.netty.util.concurrent.FastThreadLocalRunnable.run()V FastThreadLocalRunnable.java:30
    #4 java.lang.Thread.run()V Thread.java:835
    #5 (Generated Stub) <null>
```

The race is legit, but benign. To trigger it requires a TaskRunner to
begin exiting and set 'started' to false, more work to be scheduled
which starts a new TaskRunner, that work then needs to schedule
additional work which modifies 'scheduledTaskQueue', and then the
original TaskRunner checks 'scheduledTaskQueue'. But there is no danger
to this race as it can only produce a false negative in the condition
which causes the code to CAS 'started' which is thread-safe.

Modifications:

Delete problematic references to scheduledTaskQueue. The only way
scheduledTaskQueue could be modified since the last check is if another
TaskRunner is running, in which case the current TaskRunner doesn't
care.

Result:

Data-race free code, and a bit less code to boot.
@shaoxiong2019 shaoxiong2019 mentioned this pull request Jan 15, 2021
EpollDomainUnsafe may cause memory leak #10940
Closed
@SameerTi SameerTi mentioned this pull request Mar 24, 2021
The HTTP response status line contains two leading bytes #11111
Closed
@jr981008 jr981008 mentioned this pull request Apr 22, 2021
Memleak #11184
Closed
@npdbleak npdbleak mentioned this pull request Jul 22, 2021
ERR - LEAK: ByteBuf.release() was not called before it's garbage-collected. #11502
Closed
@theodore414 theodore414 mentioned this pull request Oct 12, 2021
OutOfDirectMemoryError #11754
Closed
@linking12 linking12 mentioned this pull request Dec 1, 2021
IdleStateHandler can trigger Leak? #11878
Closed
@mdj1342 mdj1342 mentioned this pull request Jan 29, 2022
Unsupported CipherSuite: TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256 #12056
Closed
raidyue pushed a commit to raidyue/netty that referenced this pull request Jul 8, 2022
@ejona86 夏无影
Avoid unsynchronized access to scheduledTaskQueue in GlobalEventExecu…
808fb04
…tor (netty#10890)

Motivation:

A race detector discovered a data race in GlobalEventExecutor present in
netty 4.1.51.Final:

```
  Write of size 4 at 0x0000cea08774 by thread T103:
    #0 io.netty.util.internal.DefaultPriorityQueue.poll()Lio/netty/util/internal/PriorityQueueNode; DefaultPriorityQueue.java:113
    netty#1 io.netty.util.internal.DefaultPriorityQueue.poll()Ljava/lang/Object; DefaultPriorityQueue.java:31
    netty#2 java.util.AbstractQueue.remove()Ljava/lang/Object; AbstractQueue.java:113
    netty#3 io.netty.util.concurrent.AbstractScheduledEventExecutor.pollScheduledTask(J)Ljava/lang/Runnable; AbstractScheduledEventExecutor.java:133
    netty#4 io.netty.util.concurrent.GlobalEventExecutor.fetchFromScheduledTaskQueue()V GlobalEventExecutor.java:119
    netty#5 io.netty.util.concurrent.GlobalEventExecutor.takeTask()Ljava/lang/Runnable; GlobalEventExecutor.java:106
    netty#6 io.netty.util.concurrent.GlobalEventExecutor$TaskRunner.run()V GlobalEventExecutor.java:240
    netty#7 io.netty.util.internal.ThreadExecutorMap$2.run()V ThreadExecutorMap.java:74
    netty#8 io.netty.util.concurrent.FastThreadLocalRunnable.run()V FastThreadLocalRunnable.java:30
    netty#9 java.lang.Thread.run()V Thread.java:835
    netty#10 (Generated Stub) <null>

  Previous read of size 4 at 0x0000cea08774 by thread T110:
    #0 io.netty.util.internal.DefaultPriorityQueue.size()I DefaultPriorityQueue.java:46
    netty#1 io.netty.util.concurrent.GlobalEventExecutor$TaskRunner.run()V GlobalEventExecutor.java:263
    netty#2 io.netty.util.internal.ThreadExecutorMap$2.run()V ThreadExecutorMap.java:74
    netty#3 io.netty.util.concurrent.FastThreadLocalRunnable.run()V FastThreadLocalRunnable.java:30
    netty#4 java.lang.Thread.run()V Thread.java:835
    netty#5 (Generated Stub) <null>
```

The race is legit, but benign. To trigger it requires a TaskRunner to
begin exiting and set 'started' to false, more work to be scheduled
which starts a new TaskRunner, that work then needs to schedule
additional work which modifies 'scheduledTaskQueue', and then the
original TaskRunner checks 'scheduledTaskQueue'. But there is no danger
to this race as it can only produce a false negative in the condition
which causes the code to CAS 'started' which is thread-safe.

Modifications:

Delete problematic references to scheduledTaskQueue. The only way
scheduledTaskQueue could be modified since the last check is if another
TaskRunner is running, in which case the current TaskRunner doesn't
care.

Result:

Data-race free code, and a bit less code to boot.
@ryanzhutao ryanzhutao mentioned this pull request Aug 21, 2023
JDK17 ClassNotFoundException: com/sun/security/cert/internal/x509/X509V1CertImpl #13560
Closed
normanmaurer added a commit that referenced this pull request Oct 19, 2023
@dmstocking David Stocking @normanmaurer
Support DTLS headers when parsing encrypted packet lengths #2 (#13656)
32a025b
Motivation:

Supporting DTLS headers allows users to use a DTLS SSLContext to build a
SSLEngine for a SslHandler. There are probably more changes that need to
be added to handle edge cases in DTLS, but this appears to work and
starts the process of supporting DTLS.

Modifications:

Checks for the DTLS version after failing to find the TLS version. If
DTLS version is found, we read the length of each DTLS record until
there are no more records.

Result:

Users can create a SslHandler with a DTLS SSLContext and connect to a
simple server using DTLS.

---------

Co-authored-by: David Stocking <[email protected]>
Co-authored-by: Norman Maurer <[email protected]>
pulllock pushed a commit to pulllock/netty that referenced this pull request Oct 19, 2023
@carl-mastrangelo @Scottmitch
Fix Race in ReferenceCountedOpenSslEngine
f13bc9a
Motivation:
ReferenceCountedOpenSslEngine is careful to lock access to `ssl`
almost everywhere (manually verified) *except* in the constructor.
Since `ssl` is non-final, it does not enjoy automatic thread safety
of the code that uses it.  Specifically, that means netty tcnative
code is not thread safe.

Modifications:

Ensure that all ssl engine intialization and variables related to
it are properly synchronized  by adding in the constructor.

Result:
Less noisy race detector.

Notes:
The specific racing threads are:
```
  Read of size 8 at 0x7b5400019ff8 by thread T52 (mutexes: write M215300):
    #0 ssl_do_info_callback .../src/ssl/ssl_lib.c:2602:24 (f077793ecd812aeebb37296c987f655c+0x23c6834)
    netty#1 ssl_process_alert .../src/ssl/tls_record.c:473:3 (f077793ecd812aeebb37296c987f655c+0x23a5346)
    netty#2 tls_open_record .../src/ssl/tls_record.c:338:12 (f077793ecd812aeebb37296c987f655c+0x23a5289)
    netty#3 ssl3_get_record .../src/ssl/s3_pkt.c:146:7 (f077793ecd812aeebb37296c987f655c+0x23a3da0)
    netty#4 ssl3_read_app_data .../src/ssl/s3_pkt.c:388:17 (f077793ecd812aeebb37296c987f655c+0x23a368f)
    netty#5 ssl_read_impl .../src/ssl/ssl_lib.c:722:15 (f077793ecd812aeebb37296c987f655c+0x23c0895)
    netty#6 SSL_read .../src/ssl/ssl_lib.c:743:10 (f077793ecd812aeebb37296c987f655c+0x23c075b)
    netty#7 netty_internal_tcnative_SSL_readFromSSL .../netty_tcnative/openssl-dynamic/src/main/c/ssl.c:946:12 (f077793ecd812aeebb37296c987f655c+0x23827f7)
    netty#8 <null> <null> (0x7fc0760193be)
    netty#9 io.netty.handler.ssl.ReferenceCountedOpenSslEngine.readPlaintextData(Ljava/nio/ByteBuffer;)I (ReferenceCountedOpenSslEngine.java:449)
    netty#10 io.netty.handler.ssl.ReferenceCountedOpenSslEngine.unwrap([Ljava/nio/ByteBuffer;II[Ljava/nio/ByteBuffer;II)Ljavax/net/ssl/SSLEngineResult; (ReferenceCountedOpenSslEngine.java:882)
    netty#11 io.netty.handler.ssl.ReferenceCountedOpenSslEngine.unwrap([Ljava/nio/ByteBuffer;[Ljava/nio/ByteBuffer;)Ljavax/net/ssl/SSLEngineResult; (ReferenceCountedOpenSslEngine.java:985)
    netty#12 io.netty.handler.ssl.ReferenceCountedOpenSslEngine.unwrap(Ljava/nio/ByteBuffer;Ljava/nio/ByteBuffer;)Ljavax/net/ssl/SSLEngineResult; (ReferenceCountedOpenSslEngine.java:1028)
    netty#13 io.netty.handler.ssl.SslHandler$SslEngineType$1.unwrap(Lio/netty/handler/ssl/SslHandler;Lio/netty/buffer/ByteBuf;IILio/netty/buffer/ByteBuf;)Ljavax/net/ssl/SSLEngineResult; (SslHandler.java:206)
    netty#14 io.netty.handler.ssl.SslHandler.unwrap(Lio/netty/channel/ChannelHandlerContext;Lio/netty/buffer/ByteBuf;II)Z (SslHandler.java:1162)
    netty#15 io.netty.handler.ssl.SslHandler.decode(Lio/netty/channel/ChannelHandlerContext;Lio/netty/buffer/ByteBuf;Ljava/util/List;)V (SslHandler.java:1084)
    netty#16 io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(Lio/netty/channel/ChannelHandlerContext;Lio/netty/buffer/ByteBuf;Ljava/util/List;)V (ByteToMessageDecoder.java:489)
    netty#17 io.netty.handler.codec.ByteToMessageDecoder.callDecode(Lio/netty/channel/ChannelHandlerContext;Lio/netty/buffer/ByteBuf;Ljava/util/List;)V (ByteToMessageDecoder.java:428)
    netty#18 io.netty.handler.codec.ByteToMessageDecoder.channelRead(Lio/netty/channel/ChannelHandlerContext;Ljava/lang/Object;)V (ByteToMessageDecoder.java:265)
    netty#19 io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(Ljava/lang/Object;)V (AbstractChannelHandlerContext.java:362)
    netty#20 io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(Lio/netty/channel/AbstractChannelHandlerContext;Ljava/lang/Object;)V (AbstractChannelHandlerContext.java:348)
    netty#21 io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(Ljava/lang/Object;)Lio/netty/channel/ChannelHandlerContext; (AbstractChannelHandlerContext.java:340)
    netty#22 io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(Lio/netty/channel/ChannelHandlerContext;Ljava/lang/Object;)V (DefaultChannelPipeline.java:1334)
    netty#23 io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(Ljava/lang/Object;)V (AbstractChannelHandlerContext.java:362)
    netty#24 io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(Lio/netty/channel/AbstractChannelHandlerContext;Ljava/lang/Object;)V (AbstractChannelHandlerContext.java:348)
    netty#25 io.netty.channel.DefaultChannelPipeline.fireChannelRead(Ljava/lang/Object;)Lio/netty/channel/ChannelPipeline; (DefaultChannelPipeline.java:926)
    netty#26 io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read()V (AbstractNioByteChannel.java:134)
    netty#27 io.netty.channel.nio.NioEventLoop.processSelectedKey(Ljava/nio/channels/SelectionKey;Lio/netty/channel/nio/AbstractNioChannel;)V (NioEventLoop.java:644)
    netty#28 io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized()V (NioEventLoop.java:579)
    netty#29 io.netty.channel.nio.NioEventLoop.processSelectedKeys()V (NioEventLoop.java:496)
    netty#30 io.netty.channel.nio.NioEventLoop.run()V (NioEventLoop.java:458)
    netty#31 io.netty.util.concurrent.SingleThreadEventExecutor$5.run()V (SingleThreadEventExecutor.java:858)
    netty#32 io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run()V (DefaultThreadFactory.java:138)
    netty#33 java.lang.Thread.run()V (Thread.java:745)
    netty#34 (Generated Stub)

  Previous write of size 8 at 0x7b5400019ff8 by thread T97:
    #0 SSL_CTX_set_info_callback .../ssl/ssl_session.c:1136:22 (f077793ecd812aeebb37296c987f655c+0x23bd621)
    netty#1 netty_internal_tcnative_SSL_newSSL .../netty_tcnative/openssl-dynamic/src/main/c/ssl.c:830:5 (f077793ecd812aeebb37296c987f655c+0x2382306)
    netty#2 <null> <null> (0x7fc0760193be)
    netty#3 io.netty.handler.ssl.ReferenceCountedOpenSslEngine.<init>(Lio/netty/handler/ssl/ReferenceCountedOpenSslContext;Lio/netty/buffer/ByteBufAllocator;Ljava/lang/String;IZ)V (ReferenceCountedOpenSslEngine.java:237)
    netty#4 io.netty.handler.ssl.OpenSslEngine.<init>(Lio/netty/handler/ssl/OpenSslContext;Lio/netty/buffer/ByteBufAllocator;Ljava/lang/String;I)V (OpenSslEngine.java:31)
    netty#5 io.netty.handler.ssl.OpenSslContext.newEngine0(Lio/netty/buffer/ByteBufAllocator;Ljava/lang/String;I)Ljavax/net/ssl/SSLEngine; (OpenSslContext.java:49)
    netty#6 io.netty.handler.ssl.ReferenceCountedOpenSslContext.newEngine(Lio/netty/buffer/ByteBufAllocator;Ljava/lang/String;I)Ljavax/net/ssl/SSLEngine; (ReferenceCountedOpenSslContext.java:409)
    netty#7 io.netty.handler.ssl.ReferenceCountedOpenSslContext.newEngine(Lio/netty/buffer/ByteBufAllocator;)Ljavax/net/ssl/SSLEngine; (ReferenceCountedOpenSslContext.java:423)
    netty#8 io.grpc.netty.ProtocolNegotiators$ServerTlsHandler.handlerAdded(Lio/netty/channel/ChannelHandlerContext;)V (ProtocolNegotiators.java:133)
    netty#9 io.netty.channel.DefaultChannelPipeline.callHandlerAdded0(Lio/netty/channel/AbstractChannelHandlerContext;)V (DefaultChannelPipeline.java:597)
    netty#10 io.netty.channel.DefaultChannelPipeline.addLast(Lio/netty/util/concurrent/EventExecutorGroup;Ljava/lang/String;Lio/netty/channel/ChannelHandler;)Lio/netty/channel/ChannelPipeline; (DefaultChannelPipeline.java:226)
    netty#11 io.netty.channel.DefaultChannelPipeline.addLast(Lio/netty/util/concurrent/EventExecutorGroup;[Lio/netty/channel/ChannelHandler;)Lio/netty/channel/ChannelPipeline; (DefaultChannelPipeline.java:392)
    netty#12 io.netty.channel.DefaultChannelPipeline.addLast([Lio/netty/channel/ChannelHandler;)Lio/netty/channel/ChannelPipeline; (DefaultChannelPipeline.java:379)
    netty#13 io.grpc.netty.NettyServerTransport.start(Lio/grpc/internal/ServerTransportListener;)V (NettyServerTransport.java:99)
    netty#14 io.grpc.netty.NettyServer$1.initChannel(Lio/netty/channel/Channel;)V (NettyServer.java:164)
    netty#15 io.netty.channel.ChannelInitializer.initChannel(Lio/netty/channel/ChannelHandlerContext;)Z (ChannelInitializer.java:113)
    netty#16 io.netty.channel.ChannelInitializer.handlerAdded(Lio/netty/channel/ChannelHandlerContext;)V (ChannelInitializer.java:105)
    netty#17 io.netty.channel.DefaultChannelPipeline.callHandlerAdded0(Lio/netty/channel/AbstractChannelHandlerContext;)V (DefaultChannelPipeline.java:597)
    netty#18 io.netty.channel.DefaultChannelPipeline.access$000(Lio/netty/channel/DefaultChannelPipeline;Lio/netty/channel/AbstractChannelHandlerContext;)V (DefaultChannelPipeline.java:44)
    netty#19 io.netty.channel.DefaultChannelPipeline$PendingHandlerAddedTask.execute()V (DefaultChannelPipeline.java:1387)
    netty#20 io.netty.channel.DefaultChannelPipeline.callHandlerAddedForAllHandlers()V (DefaultChannelPipeline.java:1122)
    netty#21 io.netty.channel.DefaultChannelPipeline.invokeHandlerAddedIfNeeded()V (DefaultChannelPipeline.java:647)
    netty#22 io.netty.channel.AbstractChannel$AbstractUnsafe.register0(Lio/netty/channel/ChannelPromise;)V (AbstractChannel.java:506)
    netty#23 io.netty.channel.AbstractChannel$AbstractUnsafe.access$200(Lio/netty/channel/AbstractChannel$AbstractUnsafe;Lio/netty/channel/ChannelPromise;)V (AbstractChannel.java:419)
    netty#24 io.netty.channel.AbstractChannel$AbstractUnsafe$1.run()V (AbstractChannel.java:478)
    netty#25 io.netty.util.concurrent.AbstractEventExecutor.safeExecute(Ljava/lang/Runnable;)V (AbstractEventExecutor.java:163)
    netty#26 io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(J)Z (SingleThreadEventExecutor.java:403)
    netty#27 io.netty.channel.nio.NioEventLoop.run()V (NioEventLoop.java:462)
    netty#28 io.netty.util.concurrent.SingleThreadEventExecutor$5.run()V (SingleThreadEventExecutor.java:858)
    netty#29 io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run()V (DefaultThreadFactory.java:138)
    netty#30 java.lang.Thread.run()V (Thread.java:745)
    netty#31 (Generated Stub)

```
normanmaurer added a commit that referenced this pull request Oct 19, 2023
@dmstocking David Stocking @normanmaurer
Support DTLS headers when parsing encrypted packet lengths #2 (#13656)
7f69c35
Motivation:

Supporting DTLS headers allows users to use a DTLS SSLContext to build a
SSLEngine for a SslHandler. There are probably more changes that need to
be added to handle edge cases in DTLS, but this appears to work and
starts the process of supporting DTLS.

Modifications:

Checks for the DTLS version after failing to find the TLS version. If
DTLS version is found, we read the length of each DTLS record until
there are no more records.

Result:

Users can create a SslHandler with a DTLS SSLContext and connect to a
simple server using DTLS.

---------

Co-authored-by: David Stocking <[email protected]>
Co-authored-by: Norman Maurer <[email protected]>
@saivikas-dharma saivikas-dharma mentioned this pull request Mar 12, 2024
Seeing Memory leak report in Netty Server Codec #13901
Open
This was referenced Jun 3, 2024
Memory Leak Detected in Netty 4.1.100.Final #14094
Closed
Memory Leak Detected in Netty 4.1.100.Final reactor/reactor-netty#3274
Closed
@oreillymj oreillymj mentioned this pull request Jun 27, 2024
Websocket MQTT client errors out when subscribing with QOS=1 #14146
Closed
@ouyangli ouyangli mentioned this pull request Jul 2, 2024
LEAK: ByteBuf.release() was not called before it's garbage-collected #14153
Closed
@ghost ghost mentioned this pull request Sep 6, 2024
Performance Degradation using AdaptiveByteBufAllocator #14272
Closed
chrisvest pushed a commit to chrisvest/netty that referenced this pull request Apr 18, 2025
@normanmaurer
Add codeql workflow (netty#2)
e9425b2
Motivation:

We should use codeql to detect problems

Modifications:

Add workflow

Result:

Use codeql
jfyuen pushed a commit to jfyuen/netty that referenced this pull request May 5, 2025
@dmstocking David Stocking
@normanmaurer @jfyuen
Support DTLS headers when parsing encrypted packet lengths netty#2 (n…
f77267c
…etty#13656)

Motivation:

Supporting DTLS headers allows users to use a DTLS SSLContext to build a
SSLEngine for a SslHandler. There are probably more changes that need to
be added to handle edge cases in DTLS, but this appears to work and
starts the process of supporting DTLS.

Modifications:

Checks for the DTLS version after failing to find the TLS version. If
DTLS version is found, we read the length of each DTLS record until
there are no more records.

Result:

Users can create a SslHandler with a DTLS SSLContext and connect to a
simple server using DTLS.

---------

Co-authored-by: David Stocking <[email protected]>
Co-authored-by: Norman Maurer <[email protected]>
(cherry picked from commit 32a025b)
normanmaurer pushed a commit that referenced this pull request Sep 10, 2026
@doom369
Avoid double promise allocation in SslHandler.wrap() (#17382)
61ab453
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 Sep 10, 2026
@normanmaurer @doom369
Avoid double promise allocation in SslHandler.wrap() (#17382) (#17413)
d5a8b9d
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]>
@Asthenia0412 Asthenia0412 mentioned this pull request Oct 14, 2026
fix(resolver-dns): skip negative cache entries during search-domain walkthrough #17813
Open
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@waywardmonkeys @trustin
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.