Netty 4.1.73.Final released
We are happy to announce the release of netty 4.1.73.Final, which is the first netty release for this year (late Happy New Year!). Because this release fixes a few bugs in "core parts" of netty we highly recommend everyone to upgrade.
The most important changes are:
- Make "pinned memory" from PooledByteBufAllocator reflect buffers in use (#11990)
- Ensure the side which enables SO_LINGER and call showdownOutput to start TCP half-closure in fin_wait2 state can still receive and process the data which is send by another side in the close_wait state (#11982)
- Correctly calculate the elementSize when cache alignment is configured (#11987)
- WebSocketServerProtocolHandshakeHandler should work without aggregation (#11976)
- Fix: Make ByteToMessageDecoder not call read() in channelReadComplete, if no channelRead fired. (#11966)
- Add a lock-based message passing queue to help debug a problem with Recycler (#11972)
- Fix ByteBufUtil.indexOf(buf, buf) (#11970)
- do not periodically re-read /etc/hosts by default (#11943)
- Fix ArrayIndexOutOfBounds: 39 from PoolArena.findSubpagePoolHead (#11939)
- Allow to disable duplicate native library check (#11928)
- Allow same native libraries if content is the same (#11927)
For the details and all changes, please browse our issue tracker for 4.1.73.Final.
Important notes
Relaxing duplicated native library detection.
The last netty release did include a change that will detect if there may be conflicting native libraries on the classpath and if so fail to load these. This change was introduced to guard against possible side-effects like segfaults. While the change itself makes a lot of sense and is correct we found out that it might be a bit to "restrictive" in some cases and users might need time to resolve these duplicated native libraries problems when the application has a complex dependency-graph. Because of this we made two changes in this release:
- Allow same native libraries if content is the same (#11927)
- Allow to disable duplicate native library check (#11928)
The first mentioned change relaxes the duplicate native library check a bit and so will allow to have the same native library with the same content on the classpath and still be able to load it. The second change allows to disable the check all-together with a system property and so will allow you to try use the native library even if you have multiple conflicting native libraries on the classpath. Doing this is risky and should general be avoided due the reasons mentioned above. That said it can be used as an escape-path while fixing the dependency-graph. The problem itself will still be logged so people are aware of it.
ArrayIndexOutOfBoundsException when PooledByteBufAllocator is used.
This release fixes a bug which can cause an ArrayIndexOutOfBoundsException when using the PooledByteBufAllocator. This bug exists forever and is basically a use-after-free bug. For more details see #11939.
Do not periodically re-read /etc/hosts by default
The last netty release did introduce a change which caused /etc/hosts
to be re-read every 60 seconds. This was done to ensure we pick-up changes without the need of restarting. Unfortunately, what we didnt think about was that the disk IO might block and so can cause the EventLoop to block as well for a small amount of time. Because of this we did change the default to not re-read the file periodically in this release. If you really want to re-enable it it can be done via system property. For more details see #11943.
Add a lock-based message passing queue to help debug a problem with Recycler
One of our users reported a problem in the new Recycler
implementation which did cause heavy CPU usage while polling from the internal queue. We were not able to reproduce this at all and the problem only happened for one user on ARM with an old JDK. Because of this we currently believe its caused by a JDK bug. That said to allow users to workaround the problem if it happens we introduced a system property which allows to switch the internal queue used by Recycler
.
If you suffer from the mentioned problem please report back to us and use the property to workaround the issue as mentioned in #11972.
Thank You
Every idea and bug-report counts and so we thought it is worth mentioning those who helped in this area.
Please report an unintended omission.