🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #48860

Re: ovdb2 vs. STABLE-20001006 and following

#48860
From: The Evil Fluffy
Date: Mon, 23 Oct 2000 00:29
105 lines
7077 bytes
(Sorry for the delay, I've pretended to sleep)
On 48 Sep 19100, Andrew Gierth wrote:

>  [stuff about ovdb2 deadlocks]
> what version of Berkeley DB are you using?

This is 3.1.17.  I saw similar locking problems with 2.2.7, but I'm
no longer seeing any of the other problems I had seen with that.

BerzerkDB is compiled out-of-the-box on this Slowaris (5.7) machine.
The recommended patch set is applied, plus I've applied patch 106980-12
for the threading library bugs just to be safe, even though I haven't
seen any of the problems mentioned that are a result of missing this
patch (in the BerkDB docs)

I should mention that ovdb2 has given me no other problems apart from
this random lock -- I can kill everything and the recovery process
succeeds with no problems.  Even when things are quite wedged.  The
only complaint I might have is that when I was trying to run `makehistory'
as articles were flowing in, it exited (Done, I'm pretty sure, rather
than with failure) before it had added all the missing articles out of
the CNFS buffers, but I haven't given it a second try to see if it does
any better, if this isn't a danger of things being overwritten by new
articles as they get read.  If so, I probably need to hack on makehistory
to only work on one set of buffers at a time, and then pause everything
while working on a buffer that cycles too fast (23 hours) if the others
recover all articles fine.

Attempts to truss a new nnrpd, once things freeze up, get stuck in
lwp_mutex_lock after opening and closing one of the /news/overview
files (__db.001) and mmap64'ing it.  This is why I applied the patch
mentioned earlier, and also, if this is a BerzerkDB problem, I've also
tried recompiling that from scratch with configure options
--enable-posixmutexes and --enable-uimutexes, just to see if those
make any sort of difference.

They actually do, but not in good ways, if they are even supposed to
be able to work with Slowaris (Solaris/lwp).  Using POSIX mutexes
results in innd, overchan, and one of the ovdb_monitor processes all
getting stuck in some CPU-hungry loop after a short time, while it
is possible to invoke nnrpd until then.  Of course, I probably shouldn't
expect this to work, given that the notes I just now found says it won't.

Specifying Unix International threads works a bit better except that
it seems that as soon as the ovdb_monitor process to handle the log
files tries to read, it croaks and falls over, taking all ovdb_monitor
with it.  Somehow this is invoking `corrupt' in Berkeley DB, even if
I wipe the pre-existing overview database and start afresh.  Perhaps
this is another thing that Shouldn't Work, or else somehow it's
tickling a bug in BerkDB even before I get to the point where I can
see if it suffers this locking bug.


> what parameters are you using for the deadlock detector?

Hmmm, I actually don't know what you mean here, and I didn't see
anything about it in INN or ovdb.  I've made no changes to the ovdb
config apart from bumping up one number as suggested for a full feed
(93% hit ratio), and I haven't touched anything else in ovdb or in
berkeley db.

What I have noticed is that most of the stuck processes are shown by
`truss' to be in lwp_mutex_lock, although I haven't done an exhaustive
search to see if there are any other SunOS 5.7 threading bugs that
might appear as this.  However, last time everything went down, before
I killed off all the other processes, I did a `truss' on all of them
and one of the nnrpd processes was in `lwp_sema_wait', having been
started many hours earlier in the day, and present in the process table
but inactive since then according to the logs.

Now, I'm no longer seeing the heavy readership that helped to topple
things over in an hour or two, but earlier today I found an nnrpd,
while further nnrpds could be started fine, that was stuck again in
lwp_sema_wait from a few hours earlier.  Doing a search in the logfile
showed that the reader had connected and given some command, but that
after 4 minutes, was disconnected with a `timeout' error, which is
rather short (usually a reader can sit idly for 3600 seconds before
getting the boot).  I don't know why this nnrpd didn't exit cleanly
and whether it has anything to do with future lock problems.  Anyway,
I killed it off, just to see how long things would run without one of
these stale processes around.


Hmmm, interesting, I got one reader who connected and is sitting idly,
yet `truss' reveals a slight difference from the other idle connections
I've made -- those are in `poll' and then `lwp_sema_wait', while this
nnrpd is in `poll' and `lwp_cond_wait'.  After a few minutes this nnrpd
should timeout, so I'll see if it goes away or if anything weird happens
here.  Well, maybe not -- a newer nnrpd shows the same...

No, I don't know anything about threads other than that if others are
not seeing these same locking problems with other OSen, then it's
probably either a Slowaris bug or a BerkeleyDB bug, maybe, else not.

If people want to poke at this thing and try to make it fall over
(of course, after I've gone out to sleep), it's listening on port 143
of FREE-n0rp.NetScum.dk and open to the world.  It's dropping some
binaries articles by being unable to keep up, but I should tweak that
to give it some idle time today, just to attract more pr0n-suckers.
I'm limiting people to no more than 2 connections per IP, although
I have not yet introduced connection rate limiting, both those seeming
to be what has caused things to fail in the past, while recently the
failures seem to be unrelated.

Technical Details
Message-ID: <meowbot-AutoPost-6-87-3-5-6-73-7-2-698-5-PPro-4@netscum.dQ>
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!supernews.google.com!sn-xit-02!sn-xit-03!supernews.com!news.tele.dk!212.74.64.35!colt.net!news.tele.dk!Free-PR0N.NetScum.DK.POSTED!vax.chrillesen.dk!barry
References: <meowbot-AutoPost-6-87-3-5-6-73-7-2-698-5-386-4-100000@netscum.dQ> <slrn8u808b.9h3.heath@dizzy.avalon.net> <meowbot-AutoPost-6-87-3-5-6-73-7-2-698-5-486-4-100000@netscum.dQ> <slrn8uc3cn.f4a.heath@dizzy.avalon.net> <meowbot-AutoPost-6-87-3-5-6-73-7-2-698-5-586-4-100000@netscum.dQ> <87em1ezkd5.fsf@erlenstar.demon.co.uk>

Show Full Headers
Complete Article Headers
Message-ID: <meowbot-AutoPost-6-87-3-5-6-73-7-2-698-5-PPro-4@netscum.dQ>
Subject: Re: ovdb2 vs. STABLE-20001006 and following
Date: Mon, 23 Oct 2000 02:29:01 +0200
From: The Evil Fluffy <meowbot@Free-N0RP.NetScum.dQ>
References: <meowbot-AutoPost-6-87-3-5-6-73-7-2-698-5-386-4-100000@netscum.dQ> <slrn8u808b.9h3.heath@dizzy.avalon.net> <meowbot-AutoPost-6-87-3-5-6-73-7-2-698-5-486-4-100000@netscum.dQ> <slrn8uc3cn.f4a.heath@dizzy.avalon.net> <meowbot-AutoPost-6-87-3-5-6-73-7-2-698-5-586-4-100000@netscum.dQ> <87em1ezkd5.fsf@erlenstar.demon.co.uk>
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!supernews.google.com!sn-xit-02!sn-xit-03!supernews.com!news.tele.dk!212.74.64.35!colt.net!news.tele.dk!Free-PR0N.NetScum.DK.POSTED!vax.chrillesen.dk!barry
Newsgroups: news.software.nntp
Organization: Binging Beerbellied Barry Bouwsma's Beerserver
Lines: 104
NNTP-Posting-Host: 3167c9bec77aad169c717ee8739c7963.netscum.dk
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: freebeer.netscum.dk 972260944 6331248975d9a66a4a5aa582535a2353
X-Complaints-To: Department of Beer <bitbucket@news.inet.tele.dk>
X-Sender: barry@vax.chrillesen.dk
In-Reply-To: <87em1ezkd5.fsf@erlenstar.demon.co.uk>