AlexStocks commented on code in PR #3099:
URL: https://github.com/apache/dubbo-go/pull/3099#discussion_r2899087729


##########
server/server.go:
##########
@@ -329,7 +333,31 @@ func (s *Server) Serve() error {
        if err := exposed_tmp.RegisterServiceInstance(); err != nil {
                return err
        }
-       select {}
+

Review Comment:
   `Serve()` 全程持有写锁(通过 `defer s.mu.Unlock()`),但函数内部进入 `select{}` 
永久阻塞,锁永不释放。这会饿死所有调用 `GetServiceOptions()`、`GetServiceInfo()`、`GetRPCService()` 
等方法的读操作,健康检查、动态路由等都会死锁。
   
   建议:`serve = true` 的赋值在锁内完成后立即释放锁,再进入阻塞等待。



-- 
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]

Reply via email to