From owner-freebsd-hackers@FreeBSD.ORG Wed May 14 14:52:11 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D47D01065674 for ; Wed, 14 May 2008 14:52:11 +0000 (UTC) (envelope-from antonfb@hesiod.org) Received: from paris.hesiod.org (jaanton-pt.tunnel.tserv3.fmt2.ipv6.he.net [IPv6:2001:470:1f04:d1::2]) by mx1.freebsd.org (Postfix) with ESMTP id 871E48FC19 for ; Wed, 14 May 2008 14:52:11 +0000 (UTC) (envelope-from antonfb@hesiod.org) Received: from atlas.hesiod.org (atlas.hesiod.org [192.168.1.9]) by paris.hesiod.org (8.14.2/8.14.2) with ESMTP id m4EEqAUM027152 for ; Wed, 14 May 2008 07:52:11 -0700 (PDT) (envelope-from antonfb@hesiod.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=hesiod.org; s=dec07; t=1210776731; bh=++7EMRhSNE+JoENslt4nePVddVTbvICy6Sl2mbVkPm8=; h=DomainKey-Signature:Message-ID:Date:From:User-Agent:MIME-Version: To:Subject:References:In-Reply-To:Content-Type: Content-Transfer-Encoding; b=q3603vJHcregnmQctl+nHbdM9ewHvSoFGXo2q b+wFUyWwGowqHqc51GvcAdWnNOIH96hIok+jqd2s5gya8at2PvTKm3WA0kG17VpprDB GYrdCfyDiU1B6fjyt77iTr97OHDmX3MWNusiJ3NLLaOT1R77b4jwgZLac9xpnYOijX0 = DomainKey-Signature: a=rsa-sha1; s=dec07; d=hesiod.org; c=nofws; q=dns; h=message-id:date:from:user-agent:mime-version:to:subject: references:in-reply-to; b=jdk0sNLH0tHhsUpIMPeRgrwGlRe13xgdmPv87Q/S6UIGYdPOLXLpjuY9H9qaJaAgi YlwmIZbw4nzkldFyRhc0WwsakqrmkJj6M85NmGBnGZm7uTFdFAmvfHtU2oPyri6iFjK 5/ItuWjP2iB4FPWUDfOIxjmv5lRRVaxPbuszp/c= Message-ID: <482AFC9A.7050807@hesiod.org> Date: Wed, 14 May 2008 07:52:10 -0700 From: Jeff Anton User-Agent: Thunderbird 2.0.0.12 (X11/20080426) MIME-Version: 1.0 To: freebsd-hackers@freebsd.org References: <20080514120011.9131F10656C4@hub.freebsd.org> In-Reply-To: <20080514120011.9131F10656C4@hub.freebsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: BDB corrupt - patches X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 May 2008 14:52:11 -0000 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