-
Notifications
You must be signed in to change notification settings - Fork 40
Open
Description
Versions
- Driver: r2dbc-mssql 1.0.4.RELEASE
- Database: Microsoft SQL Server 2019
- Java: 21
- OS: Linux (Kubernetes container)
- Netty: 4.2.9 (Spring Boot 4.0.2)
Current Behavior
All connections fail during TLS handshake. Netty 4.2 changed the default allocator to AdaptivePoolingAllocator (migration guide). TdsSslHandler.channelRead() calls alloc() on a released ByteBuf, which the new allocator rejects. This breaks every connection, including with sslMode=disable, since TDS always does a TLS handshake for login credentials (?).
Workaround: -Dio.netty.allocator.type=pooled
Stack trace
io.netty.util.IllegalReferenceCountException: null
at i.n.b.AdaptivePoolingAllocator$AdaptiveByteBuf.rootParent(AdaptivePoolingAllocator.java:1427)
at i.n.b.AdaptivePoolingAllocator$AdaptiveByteBuf.alloc(AdaptivePoolingAllocator.java:1481)
at io.r2dbc.mssql.client.ssl.TdsSslHandler.channelRead(TdsSslHandler.java:346)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:354)
at i.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1429)
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:918)
Table schema
N/A, it fails during connection establishment.
Steps to reproduce
- Spring Boot 4.0.x +
r2dbc-mssql+ any SQL Server instance - Every connection attempt fails
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels