You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by zw...@apache.org on 2021/07/20 22:07:33 UTC
[trafficserver] branch 9.1.x updated: Replace fix assert in error
event processing (#8058)
This is an automated email from the ASF dual-hosted git repository.
zwoop pushed a commit to branch 9.1.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git
The following commit(s) were added to refs/heads/9.1.x by this push:
new a9647be Replace fix assert in error event processing (#8058)
a9647be is described below
commit a9647be47c4d11ecfb98852f68cbad77fe6cdbc6
Author: Susan Hinrichs <sh...@verizonmedia.com>
AuthorDate: Mon Jul 19 15:44:01 2021 -0500
Replace fix assert in error event processing (#8058)
Replace assert with non-release and process as write event in error event processing
(cherry picked from commit 6f32b7c2c6552d919261d523cd60f14c058f3df2)
---
iocore/net/UnixNet.cc | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/iocore/net/UnixNet.cc b/iocore/net/UnixNet.cc
index ca803ff..019bcaa 100644
--- a/iocore/net/UnixNet.cc
+++ b/iocore/net/UnixNet.cc
@@ -523,8 +523,14 @@ NetHandler::waitForActivity(ink_hrtime timeout)
write_ready_list.enqueue(ne);
}
} else if (!(flags & (EVENTIO_READ))) {
- Debug("iocore_net_main", "Unhandled epoll event: 0x%04x", get_ev_events(pd, x));
- ink_release_assert(false);
+ Debug("iocore_net_main", "Unhandled epoll event: 0x%04x", flags);
+ // In practice we sometimes see EPOLLERR and EPOLLHUP through there
+ // Anything else would be surprising
+ ink_assert((flags & ~(EVENTIO_ERROR)) == 0);
+ ne->write.triggered = 1;
+ if (!write_ready_list.in(ne)) {
+ write_ready_list.enqueue(ne);
+ }
}
} else if (epd->type == EVENTIO_DNS_CONNECTION) {
if (epd->data.dnscon != nullptr) {