You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@pekko.apache.org by "He-Pin (via GitHub)" <gi...@apache.org> on 2026/06/23 20:21:47 UTC
[PR] fix: harden EndpointReader against NonFatal dispatch errors and unwrap WrappedMessage in writer logs [pekko]
He-Pin opened a new pull request, #3166:
URL: https://github.com/apache/pekko/pull/3166
### Motivation
`EndpointReader` only caught `NotSerializableException` and `IllegalArgumentException` during non-reliable message dispatch, allowing other `NonFatal` exceptions (e.g. `ClassNotFoundException`, `RuntimeException` from custom serializers) to escape and kill the endpoint. The reliable delivery path (`deliverAndAck`) had no exception protection at all. Additionally, `EndpointWriter` error logs showed the outer wrapper class instead of the actual message type for wrapped messages.
### Modification
- `EndpointReader`: widen catch to `NonFatal` for both non-reliable dispatch and `deliverAndAck` paths
- `EndpointWriter`: use `WrappedMessage.unwrap()` to log the inner message class in oversized payload and serialization error messages
- Change `logTransientSerializationError` parameter from `Exception` to `Throwable`
- Update log message from "Serializer not defined" to "Could not deserialize" to cover all failure scenarios
### Result
All `NonFatal` deserialization errors are handled as transient (connection stays alive) on both reliable and non-reliable delivery paths. Error logs now show the actual message type for wrapped messages, improving debuggability.
### Tests
- `sbt "remote / Test / testOnly org.apache.pekko.remote.TransientSerializationErrorSpec"` — added `RuntimeOnDeserialize` test case to verify `RuntimeException` is caught and connection stays alive
### References
Fixes #3163
--
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@pekko.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org
Re: [PR] fix: harden EndpointReader against NonFatal dispatch errors and unwrap WrappedMessage in writer logs [pekko]
Posted by "pjfanning (via GitHub)" <gi...@apache.org>.
pjfanning commented on PR #3166:
URL: https://github.com/apache/pekko/pull/3166#issuecomment-4783811481
possible candidate for 1.7.0?
--
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@pekko.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org
Re: [PR] fix: harden EndpointReader against NonFatal dispatch errors and unwrap WrappedMessage in writer logs [pekko]
Posted by "He-Pin (via GitHub)" <gi...@apache.org>.
He-Pin merged PR #3166:
URL: https://github.com/apache/pekko/pull/3166
--
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@pekko.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org