🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #56459

Re: db_checkpoint hanging around

#56459
From: Andrew Gierth
Date: Tue, 12 Feb 2002 00:39
21 lines
1916 bytes
>>>>> "Ben" == Ben Rosengart <br@panix.com> writes:

 Ben> I forgot to mention one thing.  I ktrace'd db_checkpoint and
 Ben> found that it was looping -- running "select" over and over
 Ben> again, about once a second.  The weird thing is that the first
 Ben> four arguments were all zero.  The man page for select doesn't
 Ben> say anything about select's behavior in that case, which makes
 Ben> me think it's a programming error, because I can't see why one
 Ben> would want to select on zero fd's.

Selecting on no fds is a trick for doing short (e.g. <1sec) delays
(it's somewhat more portable than most of the alternatives like
nanosleep()).

BerkeleyDB uses its own locking, which on some platforms is
implemented by looping using initially short delays with exponential
backoff up to 1 second. So it's probably waiting on one of its locks.

-- 
Andrew.
Technical Details
Message-ID: <87r8nrpm8e.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!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!news-feed.riddles.org.uk!news-spur.riddles.org.uk!newsmonster
References: <slrna6g6g1.178.br@panix2.panix.com> <slrna6g7mk.178.br@panix2.panix.com>

Show Full Headers
Complete Article Headers
Message-ID: <87r8nrpm8e.fsf@erlenstar.demon.co.uk>
Subject: Re: db_checkpoint hanging around
Date: Tue, 12 Feb 2002 00:39:13 +0000
From: Andrew Gierth <andrew@erlenstar.demon.co.uk>
References: <slrna6g6g1.178.br@panix2.panix.com> <slrna6g7mk.178.br@panix2.panix.com>
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!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!news-feed.riddles.org.uk!news-spur.riddles.org.uk!newsmonster
Newsgroups: news.software.nntp
Organization: disorganised
Lines: 20
X-Mayan-Date: Long count = 12.19.8.17.13; tzolkin = 2 Ben; haab = 11 Pax
X-Pgp-0x0E9FFBE9: 87 25 7F 14 41 24 B3 51 E0 19 8B DE 49 74 0C 29
X-Attribution: AG
X-P-Persistent-Headers: are a bad idea.
X-Newsreader: Gnus v5.5/Emacs 20.2
X-Complaints-To: abuse@news-spur.riddles.org.uk
X-Post-Filter: postfilter v0.6 alpha