* [PATCH 5/7] listener: emit warnings on EPERM
2021-10-24 0:20 6% [PATCH 0/7] misc tweaks and fixes Eric Wong
@ 2021-10-24 0:20 7% ` Eric Wong
0 siblings, 0 replies; 2+ results
From: Eric Wong @ 2021-10-24 0:20 UTC (permalink / raw)
To: meta
In retrospect, warnings for EPERM on accept4(2) failure may
help detect misconfigured firewalls, so start emitting warnings
for EPERM. Fwiw, I've never known excessive EPERM warnings
to be excessively noisy in other TCP services I've run over
the years.
---
lib/PublicInbox/Listener.pm | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/lib/PublicInbox/Listener.pm b/lib/PublicInbox/Listener.pm
index 09f1f2e5..7cedc349 100644
--- a/lib/PublicInbox/Listener.pm
+++ b/lib/PublicInbox/Listener.pm
@@ -8,7 +8,7 @@ use parent 'PublicInbox::DS';
use Socket qw(SOL_SOCKET SO_KEEPALIVE IPPROTO_TCP TCP_NODELAY);
use IO::Handle;
use PublicInbox::Syscall qw(EPOLLIN EPOLLEXCLUSIVE);
-use Errno qw(EAGAIN ECONNABORTED EPERM);
+use Errno qw(EAGAIN ECONNABORTED);
# Warn on transient errors, mostly resource limitations.
# EINTR would indicate the failure to set NonBlocking in systemd or similar
@@ -38,13 +38,9 @@ sub event_step {
IO::Handle::blocking($c, 0); # no accept4 :<
eval { $self->{post_accept}->($c, $addr, $sock) };
warn "E: $@\n" if $@;
- } elsif ($! == EAGAIN || $! == ECONNABORTED || $! == EPERM) {
+ } elsif ($! == EAGAIN || $! == ECONNABORTED) {
# EAGAIN is common and likely
# ECONNABORTED is common with bad connections
- # EPERM happens if firewall rules prevent a connection
- # on Linux (and everything that emulates Linux).
- # Firewall rules are sometimes intentional, so we don't
- # warn on EPERM to avoid being too noisy...
return;
} elsif (my $sym = $ERR_WARN{int($!)}) {
warn "W: accept(): $! ($sym)\n";
^ permalink raw reply related [relevance 7%]
* [PATCH 0/7] misc tweaks and fixes
@ 2021-10-24 0:20 6% Eric Wong
2021-10-24 0:20 7% ` [PATCH 5/7] listener: emit warnings on EPERM Eric Wong
0 siblings, 1 reply; 2+ results
From: Eric Wong @ 2021-10-24 0:20 UTC (permalink / raw)
To: meta
Patch 2 helps lei users avoid wasting bandwidth.
I've been running patches 6 and 7 on https://yhbt.net/lore/
for a while, now; and memory use seems far lower.
The rest are pretty minor things, I think.
Eric Wong (7):
lei: always pass $lei to LeiAuth->op_merge
lei export-kw: skip read-only IMAP folders
shared_kv: remove cache_size attribute support
http: use a larger buffer for ->getline responses
listener: emit warnings on EPERM
thread: avoid Perl5 internal scratchpad target cache
git: avoid Perl5 internal scratchpad target cache
lib/PublicInbox/Git.pm | 3 ++-
lib/PublicInbox/HTTP.pm | 2 +-
lib/PublicInbox/LeiExportKw.pm | 14 ++++++++++++--
lib/PublicInbox/LeiForgetSearch.pm | 2 +-
lib/PublicInbox/LeiImport.pm | 2 +-
lib/PublicInbox/LeiLsMailSource.pm | 2 +-
lib/PublicInbox/LeiMailDiff.pm | 2 +-
lib/PublicInbox/LeiRefreshMailSync.pm | 2 +-
lib/PublicInbox/LeiTag.pm | 2 +-
lib/PublicInbox/LeiXSearch.pm | 2 +-
lib/PublicInbox/Listener.pm | 8 ++------
lib/PublicInbox/NetWriter.pm | 9 +++++++++
lib/PublicInbox/SearchThread.pm | 22 +++++++++++-----------
lib/PublicInbox/SearchView.pm | 4 ++--
lib/PublicInbox/SharedKV.pm | 3 ---
lib/PublicInbox/View.pm | 4 ++--
t/lei-export-kw.t | 2 +-
t/lei-import-imap.t | 3 +++
t/thread-cycle.t | 4 ++--
19 files changed, 54 insertions(+), 38 deletions(-)
^ permalink raw reply [relevance 6%]
Results 1-2 of 2 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2021-10-24 0:20 6% [PATCH 0/7] misc tweaks and fixes Eric Wong
2021-10-24 0:20 7% ` [PATCH 5/7] listener: emit warnings on EPERM Eric Wong
Code repositories for project(s) associated with this public inbox
https://80x24.org/public-inbox.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).