You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by "AlexStocks (via GitHub)" <gi...@apache.org> on 2026/07/28 02:15:41 UTC
[I] [Bug] Ignored errors cause silent failures in protocol/registry/remoting (P1/P2) [dubbo-go]
AlexStocks opened a new issue, #3556:
URL: https://github.com/apache/dubbo-go/issues/3556
## Description
Several return values of functions that can fail are explicitly discarded (`_ = fn(...)`) or both the value and error are ignored, causing silent failures: malformed RPC payloads, unregistered handlers, and unhandled config / shutdown errors with no log.
## Affected locations
### Protocol / serialization (data integrity)
- `protocol/dubbo/impl/hessian.go:128-143` — `_ = encoder.Encode(...)` for protocol version/path/version/method/types (5 places). Encode errors are silently dropped, so a bad payload is sent anyway.
- `protocol/dubbo/hessian2/hessian_request.go:129,151,168` — request field encode errors ignored.
- `protocol/grpc/grpc_invoker.go:128` — `_ = hessian2.ReflectResponse(res[0], invocation.Reply())` — response reflection failure ignored; caller gets an unfilled result.
- `protocol/triple/server.go:546,567,583,600` — `_ = s.triServer.RegisterUnaryHandler(...)` etc. — handler registration failure is silently swallowed, so a service may not be registered without any warning.
### Config / registry / shutdown (diagnostics)
- `remoting/getty/config.go:143,169` — `_ = defaultClientConfig.CheckValidity()` / server — invalid config still takes effect.
- `remoting/polaris/parser/parser.go:91` — `_ = json.Unmarshal(data, &searchVal)` — parse failure ignored, empty value used downstream.
- `registry/nacos/listener.go:242` — `_ = nl.stopListen()` — listener stop failure ignored, possible residual listeners.
- `graceful_shutdown/shutdown.go:425` — `if recover() != nil { ... }` with no log; a panic during shutdown is silently swallowed, making diagnosis very hard.
## Suggested fix
- Propagate encode errors from `marshalRequest` / `marshalRequest` paths (at least log + return the error where the call site allows it).
- Log and handle handler-registration errors in the triple server instead of discarding them.
- Add `logger.Warnf` (or return the error) for config validation, JSON parse, listener stop, and the `recover()` in graceful shutdown.
This class of issue is also a good candidate for the `errorlint` / `nilerr` linters from the proposed enhanced golangci config to prevent regressions.
## Severity
P1/P2 — silent data corruption (protocol encode) and loss of diagnostics (config / shutdown).
## Environment
- Reproducible on current `develop` tip (3.3.2 prep).
--
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: notifications-unsubscribe@dubbo.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
Re: [I] [Bug] Ignored errors cause silent failures in protocol/registry/remoting (P1/P2) [dubbo-go]
Posted by "Alanxtl (via GitHub)" <gi...@apache.org>.
Alanxtl commented on issue #3556:
URL: https://github.com/apache/dubbo-go/issues/3556#issuecomment-5252176387
close via #3574
--
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: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
Re: [I] [Bug] Ignored errors cause silent failures in protocol/registry/remoting (P1/P2) [dubbo-go]
Posted by "Alanxtl (via GitHub)" <gi...@apache.org>.
Alanxtl closed issue #3556: [Bug] Ignored errors cause silent failures in protocol/registry/remoting (P1/P2)
URL: https://github.com/apache/dubbo-go/issues/3556
--
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: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
Re: [I] [Bug] Ignored errors cause silent failures in protocol/registry/remoting (P1/P2) [dubbo-go]
Posted by "AlexStocks (via GitHub)" <gi...@apache.org>.
AlexStocks commented on issue #3556:
URL: https://github.com/apache/dubbo-go/issues/3556#issuecomment-5099241215
go vet check: `protocol/dubbo/impl`, `protocol/dubbo/hessian2`, `protocol/grpc`, `protocol/triple`, `remoting/getty/config`, `remoting/polaris`, `registry/nacos`, `graceful_shutdown` pass with zero default warnings. Silently ignored errors are not detected by `go vet` — the `errorlint`/`nilerr` linters are needed. See #3552 for the full verification note.
--
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: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org