Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 14 May 2008 07:52:10 -0700
From:      Jeff Anton <antonfb@hesiod.org>
To:        freebsd-hackers@freebsd.org
Subject:   BDB corrupt - patches
Message-ID:  <482AFC9A.7050807@hesiod.org>
In-Reply-To: <20080514120011.9131F10656C4@hub.freebsd.org>
References:  <20080514120011.9131F10656C4@hub.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Some years ago I mailed patches out to someone regarding
Berkeley DB 1.85 btree problems.  The two issues which come
to mind are...

1) The page split position is improperly computed.
	This can cause corruption when a very full
page has an item which is very large inserted onto it.
The split then happens but because the split isn't in
the right place the inserted item will not fit and I
think it overruns where it should on the page.
(I think 1.86 tried to fix this, but the fix is about
recovering late i.e. when it sees an item doesn't fit,
the proper fix is to split the page right in the first
place.)

2) The record put code has a "last page put to" member
which speeds up sequential inserts, however if that
last page put to gets deleted, that variable is not
cleared causing, if you are unlucky, a put might try
to put data onto a deleted page which is then woven into
both the tree and the free page list.  This causes terrible
problems with record scanning and eventual corruption.

I'm going to have to dig up these fixes, but presuming
I do, who should be alerted?  Just file a bug?  Recreation
is extremely difficult.

Jeff Anton



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?482AFC9A.7050807>