rezar1 opened a new issue, #14848: URL: https://github.com/apache/dubbo/issues/14848
### Pre-check - [X] I am sure that all the content I provide is in English. ### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dubbo/issues?q=is%3Aissue) and found no similar issues. ### Apache Dubbo Component Java SDK (apache/dubbo) ### Dubbo Version 3.3.1 ### Steps to reproduce this issue accidental example: public abstract class ServerSuper { public ServerSuper() throws InterruptedException { this.open(); } public abstract void open(); } public class ServerSub extends ServerSuper { private static ExecutorService newFixedThreadPool = Executors.newFixedThreadPool(100); private final Object shouldNonNull = new Object(); public ServerSub() throws InterruptedException { super(); } public static void main(String[] args) { IntStream .range(0, 10000) .forEach(index -> { try { new ServerSub(); } catch (InterruptedException e) { e.printStackTrace(); } }); newFixedThreadPool.shutdown(); } @Override public void open() { newFixedThreadPool .execute(() -> { if (shouldNonNull == null) { throw new IllegalStateException("shouldNonNull was null"); } }); try { TimeUnit.MILLISECONDS.sleep(RandomUtils.nextLong(0, 2)); } catch (InterruptedException e) { e.printStackTrace(); } } } ### What you expected to happen 2024-11-02 11:50:08.268 [TID: N/A] [35mNettyServerWorker-9-1[m [31mERROR[m [1;36mLog4j2Logger.java:126[m - [DUBBO] Unexpected exception from downstream before protocol detected., dubbo version: 3.3.1, current host: , error code: 99-0. This may be caused by unknown error in remoting module, go to https://dubbo.apache.org/faq/99/0 to find instructions. java.lang.NullPointerException: Cannot invoke "java.util.Map.put(Object, Object)" because "this.dubboChannels" is null at org.apache.dubbo.remoting.transport.netty4.NettyChannelHandler.channelActive(NettyChannelHandler.java:52) ~[dubbo-3.3.1.jar!/:3.3.1] at io.netty.channel.AbstractChannelHandlerContext.invokeChannelActive(AbstractChannelHandlerContext.java:262) ~[netty-transport-4.1.87.Final.jar!/:4.1.87.Final] at io.netty.channel.AbstractChannelHandlerContext.invokeChannelActive(AbstractChannelHandlerContext.java:238) ~[netty-transport-4.1.87.Final.jar!/:4.1.87.Final] at io.netty.channel.AbstractChannelHandlerContext.fireChannelActive(AbstractChannelHandlerContext.java:231) ~[netty-transport-4.1.87.Final.jar!/:4.1.87.Final] at io.netty.channel.DefaultChannelPipeline$HeadContext.channelActive(DefaultChannelPipeline.java:1398) ~[netty-transport-4.1.87.Final.jar!/:4.1.87.Final] at io.netty.channel.AbstractChannelHandlerContext.invokeChannelActive(AbstractChannelHandlerContext.java:258) ~[netty-transport-4.1.87.Final.jar!/:4.1.87.Final] at io.netty.channel.AbstractChannelHandlerContext.invokeChannelActive(AbstractChannelHandlerContext.java:238) ~[netty-transport-4.1.87.Final.jar!/:4.1.87.Final] at io.netty.channel.DefaultChannelPipeline.fireChannelActive(DefaultChannelPipeline.java:895) ~[netty-transport-4.1.87.Final.jar!/:4.1.87.Final] at io.netty.channel.AbstractChannel$AbstractUnsafe.register0(AbstractChannel.java:522) ~[netty-transport-4.1.87.Final.jar!/:4.1.87.Final] at io.netty.channel.AbstractChannel$AbstractUnsafe.access$200(AbstractChannel.java:429) ~[netty-transport-4.1.87.Final.jar!/:4.1.87.Final] at io.netty.channel.AbstractChannel$AbstractUnsafe$1.run(AbstractChannel.java:486) ~[netty-transport-4.1.87.Final.jar!/:4.1.87.Final] at io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java:174) ~[netty-common-4.1.87.Final.jar!/:4.1.87.Final] at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:167) ~[netty-common-4.1.87.Final.jar!/:4.1.87.Final] at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:470) ~[netty-common-4.1.87.Final.jar!/:4.1.87.Final] at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:569) ~[netty-transport-4.1.87.Final.jar!/:4.1.87.Final] at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997) ~[netty-common-4.1.87.Final.jar!/:4.1.87.Final] at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) ~[netty-common-4.1.87.Final.jar!/:4.1.87.Final] at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) ~[netty-common-4.1.87.Final.jar!/:4.1.87.Final] at java.lang.Thread.run(Thread.java:840) ~[?:?] ### Anything else _No response_ ### Are you willing to submit a pull request to fix on your own? - [x] Yes I am willing to submit a pull request on my own! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
