From 83e31f81361430a427fe9d4b636419b52d42542c Mon Sep 17 00:00:00 2001 From: Muxian Wu Date: Mon, 16 Oct 2023 15:03:37 +0000 Subject: [PATCH] finagle-core: add recvAddress to IOExceptionStrings [Problem] finagle/finagle-http/src/test/scala:scala becomes flaky after Netty upgrade to 4.1.100.Final. It was become some tests fail with ``` Caused by: com.twitter.finagle.UnknownChannelException: recvAddress(..) failed: Connection reset by peer at remote address: 0.0.0.0/127.0.0.1:34938 from service: client. Remote Info: Upstream Address: Not Available, Upstream id: Not Available, Downstream Address: /0.0.0.0:34938, Downstream label: client, Trace Id: b9f67d678f5fac8c.b9f67d678f5fac8c<:b9f67d678f5fac8c ``` and they are expected to com.twitter.finagle.ChannelClosedException [Solution] Add `recvAddress(..) failed: Connection reset by peer` to the list of known exception strings JIRA Issues: CSL-12408 Differential Revision: https://phabricator.twitter.biz/D1104650 --- CHANGELOG.rst | 8 ++++++++ .../scala/com/twitter/finagle/IOExceptionStrings.scala | 3 ++- finagle-http/src/test/scala/BUILD | 1 - 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 43fbe7a960..9fbc1c50b4 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -25,6 +25,14 @@ Runtime Behavior Changes * finagle: Bump version of Jackson to 2.14.3. ``PHAB_ID=D1069160`` +Bug Fixes +~~~~~~~~~~ + +* finagle-core: Failed recvAddress on Linux due to the remote peer resetting connection should now + be properly seen as a `c.t.f.ChannelClosedException` instead of a + `c.t.f.UnknownChannelException`. ``PHAB_ID=`D1104650` + + 22.12.0 ------- diff --git a/finagle-core/src/main/scala/com/twitter/finagle/IOExceptionStrings.scala b/finagle-core/src/main/scala/com/twitter/finagle/IOExceptionStrings.scala index 4e59705622..1b8b1c29ef 100644 --- a/finagle-core/src/main/scala/com/twitter/finagle/IOExceptionStrings.scala +++ b/finagle-core/src/main/scala/com/twitter/finagle/IOExceptionStrings.scala @@ -11,7 +11,8 @@ private[finagle] object IOExceptionStrings { "readAddress(..) failed: Connection reset by peer", // Found on linux w/ native epoll "writeAddress(..) failed: Connection reset by peer", // Found on linux w/ native epoll "writevAddresses(..) failed: Connection reset by peer", // Found on linux w/ native epoll - "writevAddresses(..) failed: Broken pipe" // Found on linux w/ native epoll + "writevAddresses(..) failed: Broken pipe", // Found on linux w/ native epoll + "recvAddress(..) failed: Connection reset by peer" // Found on linux ) /** Strings that commonly signal failure to establish a socket connection */ diff --git a/finagle-http/src/test/scala/BUILD b/finagle-http/src/test/scala/BUILD index a8c04e111c..9711d7e2ad 100644 --- a/finagle-http/src/test/scala/BUILD +++ b/finagle-http/src/test/scala/BUILD @@ -4,7 +4,6 @@ junit_tests( platform = "java8", tags = [ "bazel-compatible", - "known-to-fail-jira:CSL-12408", ], dependencies = [ "3rdparty/jvm/com/google/code/findbugs:jsr305",