代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/trafficserver 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From 268b540edae0b3e51d033795a4dd7404a5756a93 Mon Sep 17 00:00:00 2001
From: Masaori Koshiba <masaori@apache.org>
Date: Thu, 28 Oct 2021 01:53:14 +0900
Subject: [PATCH] Ignore ECONNABORTED on blocking accept (#8453)
---
iocore/net/P_UnixNet.h | 4 +++-
iocore/net/UnixNetAccept.cc | 30 ++++++++++++++++++++----------
2 files changed, 23 insertions(+), 11 deletions(-)
diff --git a/iocore/net/P_UnixNet.h b/iocore/net/P_UnixNet.h
index 0043e1d763c..cff9439e9a4 100644
--- a/iocore/net/P_UnixNet.h
+++ b/iocore/net/P_UnixNet.h
@@ -480,6 +480,7 @@ change_net_connections_throttle(const char *token, RecDataT data_type, RecData v
return 0;
}
+// 2 - ignore
// 1 - transient
// 0 - report as warning
// -1 - fatal
@@ -487,8 +488,9 @@ TS_INLINE int
accept_error_seriousness(int res)
{
switch (res) {
- case -EAGAIN:
case -ECONNABORTED:
+ return 2;
+ case -EAGAIN:
case -ECONNRESET: // for Linux
case -EPIPE: // also for Linux
return 1;
diff --git a/iocore/net/UnixNetAccept.cc b/iocore/net/UnixNetAccept.cc
index d1ecc22d185..1ce5923b8ff 100644
--- a/iocore/net/UnixNetAccept.cc
+++ b/iocore/net/UnixNetAccept.cc
@@ -295,19 +295,29 @@ NetAccept::do_blocking_accept(EThread *t)
do {
if ((res = server.accept(&con)) < 0) {
int seriousness = accept_error_seriousness(res);
- if (seriousness >= 0) { // not so bad
- if (!seriousness) { // bad enough to warn about
- check_transient_accept_error(res);
- }
+ switch (seriousness) {
+ case 0:
+ // bad enough to warn about
+ check_transient_accept_error(res);
safe_delay(net_throttle_delay);
return 0;
+ case 1:
+ // not so bad but needs delay
+ safe_delay(net_throttle_delay);
+ return 0;
+ case 2:
+ // ignore
+ return 0;
+ case -1:
+ [[fallthrough]];
+ default:
+ if (!action_->cancelled) {
+ SCOPED_MUTEX_LOCK(lock, action_->mutex ? action_->mutex : t->mutex, t);
+ action_->continuation->handleEvent(EVENT_ERROR, (void *)static_cast<intptr_t>(res));
+ Warning("accept thread received fatal error: errno = %d", errno);
+ }
+ return -1;
}
- if (!action_->cancelled) {
- SCOPED_MUTEX_LOCK(lock, action_->mutex ? action_->mutex : t->mutex, t);
- action_->continuation->handleEvent(EVENT_ERROR, (void *)static_cast<intptr_t>(res));
- Warning("accept thread received fatal error: errno = %d", errno);
- }
- return -1;
}
// check for throttle
if (!opt.backdoor && check_net_throttle(ACCEPT)) {
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。