Article View: news.software.nntp
Article #25417Re: innd dying - maybe a perl filter problem ?
From: Jeremy
Date: Wed, 21 Jan 1998 00:00
Date: Wed, 21 Jan 1998 00:00
57 lines
3145 bytes
3145 bytes
Doug S <doug@cc.ysu.edu> wrote:
> I've been running INN 1.7.2+insync for almost a month now, and before
> that INN 1.5.1+ton of patches + perl filter. Most of the time it runs
> fine, but three times recently, it has "frozen" - readers and feeders
> won't connect, ctlinnd won't run, etc.
...
> It *looks* to be related to the perl article filter. My filter_innd.pl
> (based on Jeremy Nixon's) hasn't been changed in two weeks, and runs
> clean with a "perl -c".
>
> Has anyone seen something like this ?
Yes. I'd say you're encountering the "killer article" problem.
Innd suddenly stops doing anything, and sucks up lots of cpu. It
eventually goes back to normal after half an hour or so, by which
time you've probably already killed and restarted it. For a while
I was going crazy wondering why this only happened when I was logged
into the machine and watching, but that's just because it does
eventually recover. :)
Someone else who experienced it managed to track down the exact
article that was causing the problem. It was a regular article,
with a few lines of quoted text, a few lines of reponse -- and
*fifty thousand* linefeeds at the end. That's more lines than
a 1-meg encoded binary. So what happens is, the article hits all
those body checks, lots of which are anchored to beginning-of-line,
and the filter loses its mind trying to run all those regexps on
it.
What I've done, which is in what is to be the next release, is
simply skip the body checks on any article with such a huge line
count that isn't large enough to be an encoded binary, with
something like:
return "" if ($hdr{"Lines"} > 8000 and length ($hdr{"__BODY__"}) < 200000);
If someone now points out a rampant spam that has more than 8000
lines, but is less than 200k, I'll adjust those numbers. :)
Trying to strip out all those linefeeds before running the body
checks would probably be almost as problematic. I guess the real
answer would be some sanity checks in posting software... I mean,
it's unlikely that someone would *mean* to add fifty thousand
blank lines to the end of an article.
There aren't that many of these articles, but a problem can arise
when you have multiple feeds, and you'll kill and restart innd,
and the same article will end up getting sent to you by another
peer, causing the problem to happen all over again.
--
Jeremy | jeremy@exit109.com
"I think I speak for everyone here when I say, 'Huh?'" --Buffy
Technical Details
Message-ID:
<f5fx.5$P7.1232@newsbastard.gunslinger.net>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mailReferences:
<6a3ou5$1hgc@unix1.cc.ysu.edu>Show Full Headers
Complete Article Headers
Message-ID: <f5fx.5$P7.1232@newsbastard.gunslinger.net> Subject: Re: innd dying - maybe a perl filter problem ? Date: Wed, 21 Jan 1998 00:00:00 +0000 From: Jeremy <jeremy@exit109.com> References: <6a3ou5$1hgc@unix1.cc.ysu.edu> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mail X-Deja-AN: 317905088 NNTP-Posting-Date: Tue, 20 Jan 1998 23:47:07 EST Originator: jeremy@exit109.com (Jeremy) Organization: Still working on it... Newsgroups: news.software.nntp