Katsuhiro Kondou | 2 Jun 2003 01:53

Re: Overview question

In article <20030530134610.A48546 <at> kasmodiah.nacamar.de>,
	Newsmaster Tiscali <inn <at> nacamar.de> wrote;

} I have ~30.000 groups and no binaries and 126 GB diskspace for
} spool and overview. Would 8GB be appropriate or too small/too
} large?

It depends on how many articles are you going to have.
Assuming average article size is 4KB, 31.5M articles
will be spooled roughly.  And also assuming average
overview size is 300bytes, you need 31.5M*300=9.45GB
for overview.  This is just an assumption, and I think
you'll have to estimate some cases at any rate.
--

-- 
Katsuhiro Kondou

Jeffrey M. Vinocur | 2 Jun 2003 05:51

TAKETHIS making innd segfault

This is cute:

    200 news.litech.org InterNetNews server INN 2.4.0 ready
    TAKETHIS <bad <at> litech.org>
    Newsgroups: alt.binaries.foo
    From: test <at> litech.org
    Subject: bad bad bad

    tsk
    .
    Connection closed by foreign host.

And segfault.

The relevant bit of innd/art.c:ARTparsepath() is marked

        /* assumes Path header is required header */

and of course the article I sent didn't have a Path header.  However, umm, 
is that the failure mode we really want in this situation?

--

-- 
Jeffrey M. Vinocur
jeff <at> litech.org

Russ Allbery | 2 Jun 2003 06:03
Picon
Favicon
Gravatar

Re: TAKETHIS making innd segfault

Jeffrey M Vinocur <jeff <at> litech.org> writes:

> This is cute:

>     200 news.litech.org InterNetNews server INN 2.4.0 ready
>     TAKETHIS <bad <at> litech.org>
>     Newsgroups: alt.binaries.foo
>     From: test <at> litech.org
>     Subject: bad bad bad

>     tsk
>     .
>     Connection closed by foreign host.

> And segfault.

> The relevant bit of innd/art.c:ARTparsepath() is marked

>         /* assumes Path header is required header */

> and of course the article I sent didn't have a Path header.  However,
> umm, is that the failure mode we really want in this situation?

Why didn't it get rejected by ARTclean()?

--

-- 
Russ Allbery (rra <at> stanford.edu)             <http://www.eyrie.org/~eagle/>

    Please send questions to the list rather than mailing me directly.
     <http://www.eyrie.org/~eagle/faqs/questions.html> explains why.
(Continue reading)

Jeffrey M. Vinocur | 2 Jun 2003 06:15

Re: TAKETHIS making innd segfault

On Sun, 1 Jun 2003, Russ Allbery wrote:

> Jeffrey M Vinocur <jeff <at> litech.org> writes:
> 
> > This is cute:
> 
> >     200 news.litech.org InterNetNews server INN 2.4.0 ready
> >     TAKETHIS <bad <at> litech.org>
> >     Newsgroups: alt.binaries.foo
> >     From: test <at> litech.org
> >     Subject: bad bad bad
> 
> >     tsk
> >     .
> >     Connection closed by foreign host.
> 
> > And segfault.
> 
> Why didn't it get rejected by ARTclean()?

You got me...I'm not all that familiar with innd, I can just tell you what 
I see:

Program received signal SIGSEGV, Segmentation fault.
0x08060faf in ARTparsepath (p=0x0, size=0, list=0x4013eb34) at art.c:369
(gdb) bt
#0  0x08060faf in ARTparsepath (p=0x0, size=0, list=0x4013eb34) at 
art.c:369
#1  0x080635de in ARTpost (cp=0x4013e5e8) at art.c:1803
#2  0x0806bccd in NCpostit (cp=0x4013e5e8) at nc.c:196
(Continue reading)

Russ Allbery | 2 Jun 2003 06:26
Picon
Favicon
Gravatar

Re: TAKETHIS making innd segfault

Jeffrey M Vinocur <jeff <at> litech.org> writes:

> You got me...I'm not all that familiar with innd, I can just tell you
> what I see:

Hm.  Because ARTclean doesn't reject right away.  That doesn't make any
sense....

Oh, right, this was that change so that more rejected articles would be
logged.  The problem is that it changed some assumptions about the
validity of the article.  Try this:

--- art.c       2003/05/19 01:57:04     1.213
+++ art.c       2003/06/02 04:28:48
 <at>  <at>  -1799,11 +1799,10  <at>  <at>  ARTpost(CHANNEL *cp)
   article = &cp->In;
   artclean = ARTclean(data, cp->Error);

-  /* assumes Path header is required header */
-  hopcount = ARTparsepath(HDR(HDR__PATH), HDR_LEN(HDR__PATH), &data->Path);
-  if (!artclean && (!HDR_FOUND(HDR__MESSAGE_ID) || hopcount == 0)) {
+  /* If we don't have Path or Message-ID, we can't continue. */
+  if (!artclean && (!HDR_FOUND(HDR__PATH) || !HDR_FOUND(HDR__MESSAGE_ID)))
     return false;
-  }
+  hopcount = ARTparsepath(HDR(HDR__PATH), HDR_LEN(HDR__PATH), &data->Path);
   if (hopcount == 0) {
     snprintf(cp->Error, sizeof(cp->Error), "%d illegal path element",
             NNTP_REJECTIT_VAL);

(Continue reading)

Katsuhiro Kondou | 2 Jun 2003 11:52

Re: TAKETHIS making innd segfault

In article <ylr86dnlz3.fsf <at> windlord.stanford.edu>,
	Russ Allbery <rra <at> stanford.edu> wrote;

} If that looks good, I'll commit it to CURRENT and STABLE.

It looks good to me.  Thanks for following up my fault.
--

-- 
Katsuhiro Kondou

Katsuhiro Kondou | 2 Jun 2003 12:09

Re: can't expire certain groups?

In article <730D6D88-92A1-11D7-9746-00039358110E <at> isc.upenn.edu>,
	Donald Roeber <droeber <at> isc.upenn.edu> wrote;

} I'm guessing the best course of action here is to rebuild my history 
} and overview files using makehistory?

Unfortunately to say, that's the only way to fix
at the moment.  The problem looks due to misusage
of locking mapped area.  That'll try to be fixed
next version(2.5), and also backported to 2.4 after
it works.
--

-- 
Katsuhiro Kondou

Jeffrey M. Vinocur | 2 Jun 2003 12:24

portable/socket.h

For reasons I don't really understand, compiling (linux, gcc 2.96) 
anything that uses portable/socket.h fails to compile because
../include/portable/getaddrinfo.h:28: redefinition of `struct addrinfo' -- 
it looks like maybe configure is supposed to be checking for a system 
`struct addrinfo' but isn't?

--

-- 
Jeffrey M. Vinocur
jeff <at> litech.org

Russ Allbery | 2 Jun 2003 19:50
Picon
Favicon
Gravatar

Re: portable/socket.h

Jeffrey M Vinocur <jeff <at> litech.org> writes:

> For reasons I don't really understand, compiling (linux, gcc 2.96)
> anything that uses portable/socket.h fails to compile because
> ../include/portable/getaddrinfo.h:28: redefinition of `struct addrinfo'
> -- it looks like maybe configure is supposed to be checking for a system
> `struct addrinfo' but isn't?

It only defines struct addrinfo if getaddrinfo isn't found.  What version
of glibc do you have, and what does config.log say about getaddrinfo?

A system that has no getaddrinfo but defines struct addrinfo is kind of
broken, although I suppose that's better than the other way around.

--

-- 
Russ Allbery (rra <at> stanford.edu)             <http://www.eyrie.org/~eagle/>

    Please send questions to the list rather than mailing me directly.
     <http://www.eyrie.org/~eagle/faqs/questions.html> explains why.

Jeffrey M. Vinocur | 2 Jun 2003 20:38

Re: portable/socket.h

On Mon, 2 Jun 2003, Russ Allbery wrote:

> Jeffrey M Vinocur <jeff <at> litech.org> writes:
> 
> > ../include/portable/getaddrinfo.h:28: redefinition of `struct addrinfo'
> 
> It only defines struct addrinfo if getaddrinfo isn't found.  What version
> of glibc do you have, and what does config.log say about getaddrinfo?

Scratch this problem, I think.  I ran config.status instead of explicitly 
running configure (because I pass a bunch of flags, and I'm a lazy bum), 
and of course it didn't catch the new check.

But here's more fun --

    gcc -g -O2 -I../include   -c network.c
    network.c: In function `network_source':
    network.c:235: structure has no member named `sin_family'

If I change that to sin6_family it compiles, although I haven't tested 
yet.

--

-- 
Jeffrey M. Vinocur
jeff <at> litech.org


Gmane