🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #25445

dbz v3.3.2 in INN 1.7.2.insync-1.1d fails for large history files

#25445
From: Michael Hucka
Date: Wed, 21 Jan 1998 00:00
46 lines
2932 bytes
Help!

We have about 28 GB of usable spool space on a Solaris 2.5.1 Sun UltraSPARC.
Our history text file had been hovering around 800 MB until the last couple
of weeks, when it started growing more (I assume due to traffic).
Unfortunately, we crossed 1 GB yesterday and suddenly expire started hanging.
After some tracing today, I tracked down the problem to the function
"dbzconfbase" in dbz.c version 3.3.2.  The specific problem I'm encountering
is that the loop at line #466 goes into an infinite loop:

	/* calculate tagging from old file */
	for (m = 1, i = 0; m < bsize; i++, m <<= 1)
		continue;

"bsize" is set to the size of the history text file + 10%.  Variable "m" is
type long on our machine.  For a machine with a 32 bit long, if bsize is
slightly greater than 1 GB, one of the iterations of the loop above
eventually makes the value of m greater than the maximum value it can
represent (MAXLONG), causing it to overflow and become negative.  Dbzconfbase
gets stuck in an infinite loop after that.

This happens because bsize is greater than 2^30.  The annoying thing is that
our history text file size is less than 2^31, so it seems like there dbz
should be able to handle it, since it seems like it could represent the size
of the file in a long int.  I examined the dbzconfbase function code and
thought about changing the type of "m" to be unsigned, thus gaining breathing
room in which the loop and subsequent calculations in dbzconfbase could work.
However, I don't really understand the dbz code, and it looks to me like
dbzconfbase may be relying on the fact that the size of m is the size of
offsets used elsewhere.  I'm afraid that allowing m to reach higher values
without changing other parts of the code would screw something up.

What can I do about this?  I can't believe we're the first site to cross this
threshold of 1 GB history files -- what do others among you do about this?

I hear that some versions of dbz use 64 bits.  Will that solve this problem?
Is there a version of this available for INN 1.7.2.insync, or must I get INN
1.8-current?

--
Mike Hucka    hucka@umich.edu    http://www.eecs.umich.edu/~hucka    University
 PhD to be, computational models of human visual processing (AI Lab)     of
   UNIX systems administrator & programmer/analyst (EECS DCO)         Michigan

Technical Details
Message-ID: <821zy2jqrh.fsf@robin.eecs.umich.edu>
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!not-for-mail

Show Full Headers
Complete Article Headers
Message-ID: <821zy2jqrh.fsf@robin.eecs.umich.edu>
Subject: dbz v3.3.2 in INN 1.7.2.insync-1.1d fails for large history files
Date: Wed, 21 Jan 1998 00:00:00 +0000
From: Michael Hucka <hucka@eecs.umich.edu>
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!not-for-mail
X-Deja-AN: 317925865
Organization: University of Michigan EECS, Ann Arbor, Mich., USA
Newsgroups: news.software.nntp