Alanxtl opened a new issue, #3821: URL: https://github.com/apache/dubbo-go/issues/3821
Part of #3614 (item 9). ### What happened? `RpcServerPackageHandler.Write` reads the package-global `srvConf` while `SetServerConfig` can replace it. Running the `remoting/getty` package with the race detector reports a conflict between `readwriter.go` and `getty_server.go` during `TestTCPPackageHandle`. Other paths also initialize or modify fields on the server configuration, so protecting only the pointer assignment may not be sufficient. ### Reproduction ```sh go test -race -count=1 ./remoting/getty ``` On `develop` at `6ea4f0817299973c5e17e73fea3710cf528c1426`, Go 1.26.3 on Windows, the race report included `RpcServerPackageHandler.Write` reading `srvConf` and `SetServerConfig` writing it. The original report also has reproduction details. ### Expected outcome - Make concurrent server configuration publication and access safe, including any mutable configuration fields. - Add meaningful regression coverage for the affected read/write interleaving. - Run the package under `-race` and remove `TestTCPPackageHandle` from `RACE_SKIP_TESTS` once it is safe. -- 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]
