zrlw opened a new issue #8988:
URL: https://github.com/apache/dubbo/issues/8988
### Environment
* Dubbo version: 3.0 / master
```
[INFO] Running org.apache.dubbo.remoting.transport.netty.ThreadNameTest
main client sent
DubboClientHandler-thread-1 client connected
DubboServerHandler-localhost:23091-thread-1 server connected
DubboClientHandler-thread-1 client disconnected
DubboSharedHandler-thread-1 server disconnected 《== 执行服务端断开的线程并不是server
connected的线程
Error: Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed:
0.026 s <<< FAILURE! - in
org.apache.dubbo.remoting.transport.netty.ThreadNameTest
Error: testThreadName Time elapsed: 0.025 s <<< FAILURE!
org.opentest4j.AssertionFailedError:
at
org.apache.dubbo.remoting.transport.netty.ThreadNameTest.testThreadName(ThreadNameTest.java:84)
```
执行server disconnect的DubboSharedHandler-thread-1和执行server
connected的DubboServerHandler-localhost:23091-thread-1同时执行了success判断操作,但DubboSharedHandler-thread-1最后执行了matches匹配操作,因线程名并不是DubboServerHandler*而匹配失败,又将success标志从true改回了false。
1. 多个线程同时判success标志、然后对success进行修改的操作没有加锁互斥;
2. 执行server disconnect的线程名称是DubboSharedHandler-thread-nnn。
--
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]