Newsgroups: news.software.b
Path: utzoo!henry
From: henry@zoo.toronto.edu (Henry Spencer)
Subject: Re: Expire is mangling the history database
Message-ID: <1991Jan7.183731.13866@zoo.toronto.edu>
Organization: U of Toronto Zoology
References: <1991Jan7.021551.16323@unvax.union.edu>
Date: Mon, 7 Jan 1991 18:37:31 GMT

In article <1991Jan7.021551.16323@unvax.union.edu> boehme@unvax.union.edu (Eric M. Boehm) writes:
>1. After expire rebuilds the history database, nntp fails on the next
>connect after only 1 article.
>2. Examining the coredump for nntpd shows that a Segmentation
>violation occurred when trying to lookup the article in the database.
>3. If I run "mkhistory" the problem goes away (that is, there are no
>more core dumps and news runs okay).

A significant issue here is that expire tries to size the dbz hash table
based on the actual volume of material, while mkhistory is not yet smart
enough to do that -- it just uses a fixed size, chosen for compatibility
with the old dbz.  I would suspect that C News and NNTP have been compiled
with different versions of the dbm/dbz code.

>Is this normal behavior?

No.

>Is anyone else having the same problem?

First we'd heard of it.

>One
>possible explanation is that I selected dbz when building cnews but
>selected ndbm for nntpd. ...
>I don't think that the dbz is a problem for nntpd since it works okay
>after mkhistory does its task.

Are you sure that mkhistory and expire were compiled with the same
database routines?  If you've just recently installed C News this should
not arise, but if you've updated an old one it is possible.

>I also selected fast stdio for cnews. I had
>to copy /usr/include/stdio.h to cnews/libstdio so that rdwr.c would
>compile.

That's odd.  You might possibly want to try not using the fast stdio,
although I don't see how it could cause the problem offhand.

Apart from the faint possibility that it's a stdio problem, my diagnosis
would indeed be database incompatibility between mkhistory, expire, and nntpd.
-- 
If the Space Shuttle was the answer,   | Henry Spencer at U of Toronto Zoology
what was the question?                 |  henry@zoo.toronto.edu   utzoo!henry
