From 7a40f32676c888d89dc2adc8d23c4b37723b51e2 Mon Sep 17 00:00:00 2001 From: Susan Hinrichs Date: Fri, 4 Jun 2021 18:22:20 +0000 Subject: [PATCH 1/4] Adjust vc read errors --- iocore/net/UnixNetVConnection.cc | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/iocore/net/UnixNetVConnection.cc b/iocore/net/UnixNetVConnection.cc index 58e2fc09a3d..46510cac257 100644 --- a/iocore/net/UnixNetVConnection.cc +++ b/iocore/net/UnixNetVConnection.cc @@ -199,12 +199,6 @@ read_from_net(NetHandler *nh, UnixNetVConnection *vc, EThread *thread) return; } - if (vc->has_error()) { - vc->lerrno = vc->error; - vc->readSignalAndUpdate(VC_EVENT_ERROR); - return; - } - // It is possible that the closed flag got set from HttpSessionManager in the // global session pool case. If so, the closed flag should be stable once we get the // s->vio.mutex (the global session pool mutex). @@ -316,6 +310,7 @@ read_from_net(NetHandler *nh, UnixNetVConnection *vc, EThread *thread) } else { r = 0; } + ink_release_assert(!vc->has_error()); // Signal read ready, check if user is not done if (r) { From f34a090133a7063dbb228dd27d4a30e9fde39ce7 Mon Sep 17 00:00:00 2001 From: Susan Hinrichs Date: Fri, 4 Jun 2021 19:09:02 +0000 Subject: [PATCH 2/4] Adjust assert assumptions --- iocore/net/UnixNetVConnection.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/iocore/net/UnixNetVConnection.cc b/iocore/net/UnixNetVConnection.cc index 46510cac257..7b03ffea011 100644 --- a/iocore/net/UnixNetVConnection.cc +++ b/iocore/net/UnixNetVConnection.cc @@ -310,7 +310,6 @@ read_from_net(NetHandler *nh, UnixNetVConnection *vc, EThread *thread) } else { r = 0; } - ink_release_assert(!vc->has_error()); // Signal read ready, check if user is not done if (r) { @@ -332,6 +331,7 @@ read_from_net(NetHandler *nh, UnixNetVConnection *vc, EThread *thread) } } } + ink_release_assert(!vc->has_error()); // If here are is no more room, or nothing to do, disable the connection if (s->vio.ntodo() <= 0 || !s->enabled || !buf.writer()->write_avail()) { read_disable(nh, vc); From ee723979cfd8fdabae6760acdd8e327b520fa220 Mon Sep 17 00:00:00 2001 From: Susan Hinrichs Date: Fri, 4 Jun 2021 19:56:30 +0000 Subject: [PATCH 3/4] Try adjusting the read error again --- iocore/net/UnixNetVConnection.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/iocore/net/UnixNetVConnection.cc b/iocore/net/UnixNetVConnection.cc index 7b03ffea011..58a201e36ab 100644 --- a/iocore/net/UnixNetVConnection.cc +++ b/iocore/net/UnixNetVConnection.cc @@ -330,8 +330,12 @@ read_from_net(NetHandler *nh, UnixNetVConnection *vc, EThread *thread) return; } } + } else if (vc->has_error()) { + vc->lerrno = vc->error; + read_signal_and_update(VC_EVENT_ERROR, vc); + return; } - ink_release_assert(!vc->has_error()); + // If here are is no more room, or nothing to do, disable the connection if (s->vio.ntodo() <= 0 || !s->enabled || !buf.writer()->write_avail()) { read_disable(nh, vc); From 5305e7c2f914c8ca1b770d54da7d86f24511ab95 Mon Sep 17 00:00:00 2001 From: Susan Hinrichs Date: Tue, 8 Jun 2021 00:25:33 +0000 Subject: [PATCH 4/4] Remove the error signalling on read completely --- iocore/net/UnixNetVConnection.cc | 4 ---- 1 file changed, 4 deletions(-) diff --git a/iocore/net/UnixNetVConnection.cc b/iocore/net/UnixNetVConnection.cc index 58a201e36ab..b253f81b622 100644 --- a/iocore/net/UnixNetVConnection.cc +++ b/iocore/net/UnixNetVConnection.cc @@ -330,10 +330,6 @@ read_from_net(NetHandler *nh, UnixNetVConnection *vc, EThread *thread) return; } } - } else if (vc->has_error()) { - vc->lerrno = vc->error; - read_signal_and_update(VC_EVENT_ERROR, vc); - return; } // If here are is no more room, or nothing to do, disable the connection