Thread View: news.software.nntp
2 messages
2 total messages
Started by Fu Bar
Thu, 09 Jan 1997 00:00
Old 1.4 bug still around
Author: Fu Bar
Date: Thu, 09 Jan 1997 00:00
Date: Thu, 09 Jan 1997 00:00
121 lines
5648 bytes
5648 bytes
Recently, I upgraded a linux box running 1.4unoff4 to ELF. This caused
innd to break badly which resulted in several days/nights of little sleep
and lots of wondering about what went wrong.
Eventually, I coaxed innd into giving me a core dump and Stephen R. van
den Berg debugged it for me. Here's what he had to say:
----srb----
Ok. Seems rather obvious. In the a.out binary, the same error was
present. Apparently the SEGV didn't happen as much because the ordering
in memory simply was more suited (by chance) to hide the error.
The patch below should fix the problem. Do me a favour and send in the
patch to whichever authority now maintains innd 1.5 (in case the problem
hasn't been fixed there). As proof for the error, include the debug
dump you sent me previously. You can put my name up for reference if
they have any questions.
--- old/art.c Tue Dec 31 23:08:43 1996
+++ art.c Tue Dec 31 23:17:43 1996
@@ -710,8 +710,13 @@
*errorp = "EOF in headers";
return NULL;
case ':':
- if (colon == NULL)
+ if (colon == NULL) {
colon = out;
+ if (start == colon) {
+ *errorp = "Field without name in header";
+ return NULL;
+ }
+ }
break;
}
if ((*out++ = *in++) == '\n' && !ISWHITE(*in))
----srb----
This patch has done two things for me. First, it stops an ELF compiled
innd from segfaulting...it was doing that every few hours (sometimes every
few minutes). It's been running about 9 days without a crash now.
Second, it seems as though it removes a memory leak from innd. My a.out
innd was stable...never segfaulted, but would grow like mad. I posted
about it here, and people said it was normal for innd to be using 30mb RAM
after a day or so, 60mb or more after a few weeks.
The ELF one with the above patch has been up about 9 days and has not
grown above 20mb, and when throttled, it shrinks back to about 5mb. The
a.out one wouldn't do that.
Here is the gdb info I sent to srb:
Core was generated by `/usr/local/news/etc/innd -p4 -r -i0 -L'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /lib/libc.so.5.4.17...done.
Reading symbols from /lib/ld-linux.so.1...done.
#0 0x804b283 in ARTparseheader (
in=0x40d35008 ": World-wide E-mail Friends\nDate: Tue, 31 Dec 1996
20:31:15
-0800\nOrganization: SEEDNET InterNetNews News System\nLines:
1\nMessage-ID: <32C9E893.420F@ksts.seed.net.tw>\nReferences:
<5a40h2$o4h@news.corp"...,
out=0x40d35024 "Date: Tue, 31 Dec 1996 20:31:15 -0800\nOrganization:
SEEDNET InterNetNews News System\nLines: 1\nMessage-ID:
<32C9E893.420F@ksts.seed.net.tw>\nReferences:
<5a40h2$o4h@news.corpcomm.net> <5aa525$oum@cliff."...,
deltap=0xbffff258, errorp=0xbffff25c) at art.c:746
746 if (ISWHITE(*p)) {
(gdb) where
#0 0x804b283 in ARTparseheader (
in=0x40d35008 ": World-wide E-mail Friends\nDate: Tue, 31 Dec 1996
20:31:15
-0800\nOrganization: SEEDNET InterNetNews News System\nLines:
1\nMessage-ID: <32C9E893.420F@ksts.seed.net.tw>\nReferences:
<5a40h2$o4h@news.corp"...,
out=0x40d35024 "Date: Tue, 31 Dec 1996 20:31:15 -0800\nOrganization:
SEEDNET InterNetNews News System\nLines: 1\nMessage-ID:
<32C9E893.420F@ksts.seed.net.tw>\nReferences:
<5a40h2$o4h@news.corpcomm.net> <5aa525$oum@cliff."...,
deltap=0xbffff258, errorp=0xbffff25c) at art.c:746
#1 0x804b7ef in ARTclean (Article=0x8071ef8, Data=0xbffff5d4) at
art.c:916
#2 0x804d4b1 in ARTpost (cp=0x8071ea4, Replic=0x0,
ihave=0x816ecc0 "<32C9E893.420F@ksts.seed.net.tw>") at art.c:1710
#3 0x8057189 in NCpostit (cp=0x8071ea4) at nc.c:230
#4 0x80596c5 in NCproc (cp=0x8071ea4) at nc.c:1008
#5 0x8059c40 in NCreader (cp=0x8071ea4) at nc.c:1141
#6 0x805328c in CHANreadloop () at chan.c:856
#7 0x8056624 in main (ac=0, av=0xbffffe9c) at innd.c:915
#8 0x8049c3b in ___crt_dummy__ ()
(gdb) list
741 *colon = ':';
742
743 if (tp == NULL) {
744 /* Not a system header, make sure we have
<word><colon><space>.
*/
745 for (p = colon; --p != start; )
746 if (ISWHITE(*p)) {
747 (void)sprintf(buff, "Space before colon in \"%s\"
header",
748 MaxLength(start, start));
749 *errorp = buff;
750 return NULL;
I've taken a quick look at art.c in innd 1.5.1, and it doesn't appear to
have patch srb sent me...so it may still have this bug.
------------------------------------------------------------------
Jon Lewis <jlewis@fdt.net> | Unsolicited commercial e-mail will
Network Administrator | be proof-read for $199/hr.
________Finger jlewis@inorganic5.fdt.net for PGP public key_______
expire.ctl parse bug
Author: Fu Bar
Date: Fri, 10 Jan 1997 00:00
Date: Fri, 10 Jan 1997 00:00
16 lines
1353 bytes
1353 bytes
I just noticed an annoying bug in expire in Innd-1.4unoff4. If the final line in expire.ctl is a comment, expire will fail to properly parse the file, and will terminate with the error "Line N too long", and news.daily will continue without actually expiring anything. In my case, the last line was just a "#"...nothing else. ------------------------------------------------------------------ Jon Lewis <jlewis@fdt.net> | Unsolicited commercial e-mail will Network Administrator | be proof-read for $199/hr. ________Finger jlewis@inorganic5.fdt.net for PGP public key_______
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