🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.nntp
7 messages
7 total messages Started by Doug S Tue, 20 Jan 1998 00:00
innd dying - maybe a perl filter problem ?
#25360
Author: Doug S
Date: Tue, 20 Jan 1998 00:00
70 lines
3491 bytes
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.

I did a kill -6 on innd today, and it generated a 49MB core file.
a $C traceback in adb yielded an 824-line traceback, 393 of which
were calls to "regmatch".

core file = core -- program ``innd''
SIGIOT 6: abort
$C
regrepeat() + 20
        [savfp=0xeffef560,savpc=0x9b5fc]
regmatch(0x7fff,0x150e59,0x150800,0x150c00,0x151800,0x152000) + 8ec
        [savfp=0xeffef560,savpc=0x9b5fc]
regmatch(0x49,0x150e59,0x150800,0x150c00,0x151800,0x152000) + 960
        [savfp=0xeffef600,savpc=0x9b5fc]
regmatch(0x0,0x150e59,0x150800,0x150c00,0x151800,0x152000) + 960
        [savfp=0xeffef6a0,savpc=0x9b324]
regmatch(0x61,0x150e59,0x150800,0x150c00,0x151800,0x152000) + 688
        [savfp=0xeffef740,savpc=0x9b5fc]
regmatch(0x1,0x150e59,0x150800,0x150c00,0x151800,0x152000) + 960
        [savfp=0xeffef7e0,savpc=0x9b5fc]
regmatch(0x4c,0x150e59,0x150800,0x150c00,0x151800,0x152000) + 960
        [savfp=0xeffef880,savpc=0x9b5fc]
regmatch(0x0,0x150e59,0x150800,0x150c00,0x151800,0x152000) + 960
        [savfp=0xeffef920,savpc=0x9b324]
regmatch(0x60,0x150e59,0x150800,0x150c00,0x151800,0x152000) + 688
        [savfp=0xeffef9c0,savpc=0x9b5fc]

(repeated ad nauseum with minor variations)

regtry(0x24dd208,0x2f0d59e,0x24a7008,0x70,0x151800,0x2495008) + 74
        [savfp=0xefffead0,savpc=0x9a2d8]
Perl_pregexec(0x24dd208,0x2f0d008,0x2f0f41c,0x2f0d008,0x0,0x0) + 328
        [savfp=0xefffeb68,savpc=0x6b44c]
Perl_pp_match(0x2f0d008,0x1b,0x2f0f41c,0x0,0x0,0x0) + 41c
        [savfp=0xefffebe8,savpc=0x68c04]
Perl_runops(0x2494ac8,0xefffed20,0x151800,0x2439008,0x151800,0x1) + 28
        [savfp=0xefffec58,savpc=0x3e528]
perl_call_sv(0x0,0x265f00c,0xffffffff,0x0,0x68,0x0) + 430
        [savfp=0xefffed50,savpc=0x3e048]
perl_call_pv(0x9f578,0x4,0x3,0x4,0x151800,0x2495008) + 10
        [savfp=0xefffedc0,savpc=0x3e024]
perl_call_argv(0x9f578,0x4,0x0,0x2952498,0x2d8a4d,0xa) + d4
        [savfp=0xefffee30,savpc=0x367ec]
HandleArticle(0x276eab1,0x9bf90,0x4,0x9c400,0x81010100,0xff00) + 188
        [savfp=0xefffeea0,savpc=0x220cc]

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 ? 

Followup: it happened again (53MB core this time, similar features).
For what it's worth, this is a Sparc5 running Solaris 2.4, with 64MB.
I just replaced the perl filter with a "null" version (the sample that
came with INN 1.7.2) to see if that makes a difference.

Thanks in advance, Doug
-- 
Doug S. (doug@cc.ysu.edu) (http://cc.ysu.edu/~doug/)

If you get hung up on what you did wrong, you're never gonna get anywhere.
        -- Kenneth Copeland

Re: innd dying - maybe a perl filter problem ?
#25416
Author: Andrew Gierth
Date: Wed, 21 Jan 1998 00:00
24 lines
1662 bytes
>>>>> "Doug" == Doug S <doug@cc.ysu.edu> writes:

 Doug> I've been running INN 1.7.2+insync for almost a month now, and
 Doug> before that INN 1.5.1+ton of patches + perl filter. Most of the
 Doug> time it runs fine, but three times recently, it has "frozen" -
 Doug> readers and feeders won't connect, ctlinnd won't run, etc.

 Doug> I did a kill -6 on innd today, and it generated a 49MB core
 Doug> file.  a $C traceback in adb yielded an 824-line traceback, 393
 Doug> of which were calls to "regmatch".

Could this be pathological behaviour in a body-matching regexp caused
by, say, an oversized incoming post?

In my Woodside-detecting cancelbot, I had to limit it to quite small
posts (a few k) otherwise the (somewhat hairy) regexp would take a *very*
long time (I wasn't patient enough to let it run to completion on a 100k
article).

-- 
Andrew.

Re: innd dying - maybe a perl filter problem ?
#25417
Author: Jeremy
Date: Wed, 21 Jan 1998 00:00
57 lines
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

Re: innd dying - maybe a perl filter problem ?
#25442
Author: brian moore
Date: Wed, 21 Jan 1998 00:00
36 lines
2116 bytes
In article <f5fx.5$P7.1232@newsbastard.gunslinger.net>,
	Jeremy <jeremy@exit109.com> writes:
> 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.

I resemble that remark. :)

> 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.

Though it did make it possible to find: I inserted the following:

   open(MSGID,">/tmp/msgid");
   print MSGID "$hdr{'Message-ID'}\n";
   close(MSGID);

Restarted innd and sho' nuff I had the bogo-message ID captured. :)

I don't think it was cleanfeed that caused the problem, but one of
my, um, enhancements... since going back to plain cleanfeed fixed it
and Jeremy's didn't barf on that message.

Jeremy's regex's are better than mine. :)



Re: innd dying - maybe a perl filter problem ?
#25630
Author: Jeremy
Date: Tue, 27 Jan 1998 00:00
16 lines
1104 bytes
Mark-Oliver Wolter  <root@mow.physik.uni-bremen.de> wrote:

> You don't want to change that to something like
> 
> and length ($hdr{"__BODY__"}) < $hdr{"Lines"} * 3 );
> 
> ... or you just wait 'til an article with 200000 CRs appears?

Eww... yeah, good point...

-- 
Jeremy  |  jeremy@exit109.com
"Okay, at this point you're abusing sarcasm."  --Buffy

Re: innd dying - maybe a perl filter problem ?
#25637
Author: Neil Murray
Date: Tue, 27 Jan 1998 00:00
57 lines
2995 bytes
bem@news.cmc.net (brian moore) writes:

>In article <f5fx.5$P7.1232@newsbastard.gunslinger.net>,
>	Jeremy <jeremy@exit109.com> writes:
>> 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.

>I resemble that remark. :)
	
	You resemble that remark I thought I resembled it! :-)

>> 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.

	Yes, had that one.  It reminded me of that "Wack-A-Mole" game.
Every time I restarted the news server that damn article appeared via a 
different feed (hole).

>Though it did make it possible to find: I inserted the following:

>   open(MSGID,">/tmp/msgid");
>   print MSGID "$hdr{'Message-ID'}\n";
>   close(MSGID);

>Restarted innd and sho' nuff I had the bogo-message ID captured. :)

	Didn't think of that myself.  When it occurred, I attached to the INND
process using gdb -p <inn pid> and did a backtrace.  The backtrace shows the
arguments to each called routine, one of which had the message-id.

	I tried restarting INND without cleanfeed so I could receive the 
article but I wasn't able to do it in time.

	I got the article by spelunking the various "open" news servers around 
the world. (I think it was a UK one where I found the article).

	As Jeremy mentioned I didn't realise it would eventually make it though
until I had the article and had done some testing on a test news machine.

	Good to hear that a fix is due.

--
Neil Murray                              Email:  Neil.Murray@aone.com.au
Access One Pty. Ltd.                     http://www.aone.net.au/
41 Malcolm Rd., Braeside                 Phone:  +61 3 9239 1444
Victoria, Australia  3195                Fax:    +61 3 9587 3954

Re: innd dying - maybe a perl filter problem ?
#25640
Author: Mark-Oliver Wolter
Date: Tue, 27 Jan 1998 00:00
19 lines
1312 bytes
Jeremy <jeremy@exit109.com> wrote:
: 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. :)

You don't want to change that to something like

and length ($hdr{"__BODY__"}) < $hdr{"Lines"} * 3 );

... or you just wait 'til an article with 200000 CRs appears?

-- 
   | | | MfG MOW []-)
   | | | Leher Heerstr.21, Zi.1403, 28359 Bremen, Tel. ++49-177-2503055
  M  O  W  http://www.zfn.uni-bremen.de/~g02o/
/'   |   `\  Always logon - the bright side of life !

Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads