-
Notifications
You must be signed in to change notification settings - Fork 26.6k
Open
Labels
type/bugBugs to being fixedBugs to being fixed
Description
Pre-check
- I am sure that all the content I provide is in English.
Search before asking
- I had searched in the issues and found no similar issues.
Apache Dubbo Component
Java SDK (apache/dubbo)
Dubbo Version
- Dubbo version: dubbo-dubbo.3.2.19
- Java version: 1.8
- OS: Linux
- Protocol: Triple (tri://)
Steps to reproduce this issue
- Configure a Dubbo consumer to call a Triple protocol service
- The Triple service endpoint is unreachable or TLS handshake fails
- Connection continuously fails and reconnects every second
- Observe CHANNEL_MAP size growing unbounded
What you expected to happen
When channelInactive is called, the channel should be removed from CHANNEL_MAP to prevent memory leak.
NettyConnectionHandler.channelInactive() only calls reconnect() but does NOT call NettyChannel.removeChannel(), causing channels to accumulate in CHANNEL_MAP.
NettyConnectionHandler.java (BUG):
@OverRide
public void channelInactive(ChannelHandlerContext ctx) throws Exception {
super.channelInactive(ctx);
final Attribute goawayAttr = ctx.channel().attr(GO_AWAY_KEY);
if (!Boolean.TRUE.equals(goawayAttr.get())) {
reconnect(ctx.channel());
}
// ❌ Missing: NettyChannel.removeChannel(ctx.channel())
}
Anything else
No response
Do you have a (mini) reproduction demo?
- Yes, I have a minimal reproduction demo to help resolve this issue more effectively!
Are you willing to submit a pull request to fix on your own?
- Yes I am willing to submit a pull request on my own!
Code of Conduct
- I agree to follow this project's Code of Conduct
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
type/bugBugs to being fixedBugs to being fixed
Type
Projects
Status
Todo