πŸš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #90481

Re: INN 2.7.1 death spiral under high load?

#90481
From: Russ Allbery
Date: Thu, 06 Jul 2023 05:11
43 lines
2226 bytes
Julien Γ‰LIE <iulius@nom-de-mon-site.com.invalid> writes:

> Sure.
> The check could be done in RCHANadd, SCHANadd, and WCHANadd.
> It is when channels.max_fd and channels.max_sleep_fd are updated, when
> needed.
> We could then log a warn message each time these max_fd or max_sleep_fd
> counts *would* have been updated and be higher than FD_SETSIZE-1?  And
> immediately close the channel?

That sounds right to me.

> I see that innfeed already does something like that in endpoint.c:

> #if defined(FD_SETSIZE)
>         if ((unsigned int) fd >= FD_SETSIZE) {
>             warn("ME fd (%d) looks too big (%d -- FD_SETSIZE)", fd,
>                  FD_SETSIZE);
>             return NULL;
>         }
> #else
>         if (fd > (sizeof(fd_set) * CHAR_BIT)) {
>             warn("ME fd (%d) looks too big (%d -- sizeof (fd_set) *
>             CHAR_BIT)",
>                  fd, (sizeof(fd_set) * CHAR_BIT));
>             return NULL;
>         }
> #endif

> Would a similar check be added for the xCHANadd functions?

Yup, that's exactly what I was thinking of.

> I guess the check could be done by a new function in lib/fdlimit.c that
> can be used for both innd and innfeed, returning true/false.

Sounds great to me!

-- 
Russ Allbery (eagle@eyrie.org)             <https://www.eyrie.org/~eagle/>

          Please post questions rather than mailing me directly.
     <https://www.eyrie.org/~eagle/faqs/questions.html> explains why.
Technical Details
Message-ID: <87fs617hg1.fsf@hope.eyrie.org>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!apf1.newsdeef.eu!not-for-mail
References: <u7l7kl$1qqb$1@nnrp.usenet.blueworldhosting.com>

Show Full Headers
Complete Article Headers
Message-ID: <87fs617hg1.fsf@hope.eyrie.org>
Subject: Re: INN 2.7.1 death spiral under high load?
Date: Wed, 05 Jul 2023 22:11:10 -0700
From: Russ Allbery <eagle@eyrie.org>
References: <u7l7kl$1qqb$1@nnrp.usenet.blueworldhosting.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!apf1.newsdeef.eu!not-for-mail
Newsgroups: news.software.nntp
Organization: The Eyrie
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Injection-Info: hope.eyrie.org;
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux)
Cancel-Lock: sha1:w8FWmD1fFhopBb3mewrctRSS7LU=