{"action":"created","issue":{"url":"https://api.github.com/repos/netty/netty/issues/4310","labels_url":"https://api.github.com/repos/netty/netty/issues/4310/labels{/name}","comments_url":"https://api.github.com/repos/netty/netty/issues/4310/comments","events_url":"https://api.github.com/repos/netty/netty/issues/4310/events","html_url":"https://github.com/netty/netty/issues/4310","id":109587178,"number":4310,"title":"Http2ConnectionHandler should handle all exceptions","user":{"login":"nmittler","id":6493296,"avatar_url":"https://avatars.githubusercontent.com/u/6493296?v=3","gravatar_id":"","url":"https://api.github.com/users/nmittler","html_url":"https://github.com/nmittler","followers_url":"https://api.github.com/users/nmittler/followers","following_url":"https://api.github.com/users/nmittler/following{/other_user}","gists_url":"https://api.github.com/users/nmittler/gists{/gist_id}","starred_url":"https://api.github.com/users/nmittler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nmittler/subscriptions","organizations_url":"https://api.github.com/users/nmittler/orgs","repos_url":"https://api.github.com/users/nmittler/repos","events_url":"https://api.github.com/users/nmittler/events{/privacy}","received_events_url":"https://api.github.com/users/nmittler/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-10-02T23:05:55Z","updated_at":"2015-10-05T14:56:54Z","closed_at":null,"body":"In the [current HTTP/2 exception handling logic](https://github.com/netty/netty/blob/master/codec-http2/src/main/java/io/netty/handler/codec/http2/Http2ConnectionHandler.java#L625), if a lower-level error occurs (e.g. the socket breaks), we can get into this scenario: https://github.com/grpc/grpc-java/issues/1097. The first stack trace is due to the fact that the http2 handler ignores the exception and passes it through ... this seems wrong.  I think our handler should catch any exception coming up the pipeline and assume any unrecognized exceptions to be connection errors.\r\n\r\nIn past discussions we had talked about application-specific exceptions and allowing them to pass through the handler.  I suspect that isn't a real use case, however, and even if it was it might be better accomplished through user events.  Fundamentally, HTTP/2 is a low-level protocol and I think it's safe to assume that any exception we receive is from a vital part of the protocol stack below us (e.g. socket/tls)\r\nand if that's broken, we're broken. In addition, HTTP/2 is a little different than other Netty handlers, in that applications do a combination of extension and listening to get events, rather than appending handlers after it in the pipeline.\r\n\r\n@normanmaurer @Scottmitch Let's discuss."},"comment":{"url":"https://api.github.com/repos/netty/netty/issues/comments/145558131","html_url":"https://github.com/netty/netty/issues/4310#issuecomment-145558131","issue_url":"https://api.github.com/repos/netty/netty/issues/4310","id":145558131,"user":{"login":"nmittler","id":6493296,"avatar_url":"https://avatars.githubusercontent.com/u/6493296?v=3","gravatar_id":"","url":"https://api.github.com/users/nmittler","html_url":"https://github.com/nmittler","followers_url":"https://api.github.com/users/nmittler/followers","following_url":"https://api.github.com/users/nmittler/following{/other_user}","gists_url":"https://api.github.com/users/nmittler/gists{/gist_id}","starred_url":"https://api.github.com/users/nmittler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nmittler/subscriptions","organizations_url":"https://api.github.com/users/nmittler/orgs","repos_url":"https://api.github.com/users/nmittler/repos","events_url":"https://api.github.com/users/nmittler/events{/privacy}","received_events_url":"https://api.github.com/users/nmittler/received_events","type":"User","site_admin":false},"created_at":"2015-10-05T14:56:54Z","updated_at":"2015-10-05T14:56:54Z","body":"@Scottmitch @ejona86 I guess it just seems strange to me to let a `RuntimeException` or `IOException` just squeak by though the handler unnoticed.  Maybe it's fine, but I suspect this will lead to many applications going into a sort of zombie mode where they don't receive any more data but it's not clear as to why.  Perhaps we just need to add some documentation WRT exception handling? "}}