From 332b9629ed731e4af6430c4483685b043b57c7b5 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Tue, 17 Jun 2025 00:13:32 +0000 Subject: [PATCH] ds: confess on epoll_ctl failure ENOENT on epoll_ctl(2) is always a sign of buggy code and it makes sense to dump the backtrace by default, here. I've only noticed this failure on HTTPS connections. --- lib/PublicInbox/DS.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/PublicInbox/DS.pm b/lib/PublicInbox/DS.pm index 472f845c7..ad01ffc8c 100644 --- a/lib/PublicInbox/DS.pm +++ b/lib/PublicInbox/DS.pm @@ -34,7 +34,7 @@ use PublicInbox::Tmpfile; use PublicInbox::Select; use PublicInbox::OnDestroy; use Errno qw(EAGAIN EINVAL ECHILD); -use Carp qw(carp croak); +use Carp qw(carp croak confess); use List::Util qw(sum); our @EXPORT_OK = qw(now msg_more awaitpid add_timer add_uniq_timer); my $sendmsg_more = PublicInbox::Syscall->can('sendmsg_more'); @@ -395,7 +395,7 @@ sub epbit ($$) { # (sock, default) sub epwait ($$) { my ($io, $ev) = @_; - $Poller and $Poller->ep_mod($io, $ev) and croak "EPOLL_CTL_MOD $io: $!"; + $Poller and $Poller->ep_mod($io, $ev) and confess "BUG: ep_mod $io: $!"; } # returns 1 if done, 0 if incomplete -- 2.47.3