BDB corrupt - patches - FreeBSD

This is a discussion on BDB corrupt - patches - FreeBSD ; 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 ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: BDB corrupt - patches

  1. BDB corrupt - patches

    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
    _______________________________________________
    freebsd-hackers@freebsd.org mailing list
    http://lists.freebsd.org/mailman/lis...reebsd-hackers
    To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"


  2. Re: BDB corrupt - patches

    Jeff Anton wrote:
    > 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. ...
    > 2) The record put code has a "last page put to" member ...
    >
    > 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.


    Definitely file a PR and include the patches. If nothing
    else, that will help ensure they don't get lost.

    When you do file that PR, notify this list. Given how
    heavily the base system uses DB 1.85, I think there will
    be a lot of interest in anything that improves the
    stability and reliability of that code.

    Cheers,

    Tim Kientzle
    _______________________________________________
    freebsd-hackers@freebsd.org mailing list
    http://lists.freebsd.org/mailman/lis...reebsd-hackers
    To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"


  3. Re: BDB corrupt - patches

    -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA1

    Jeff Anton wrote:
    [...]
    | 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.

    I think Oracle is maintaining a webpage about their known bug/fixes here:

    http://www.oracle.com/technology/sof.../db/index.html

    FreeBSD has applied a number of fixes IIRC, if it was a BerkeleyDB bug
    I'd suggest that you also give Oracle developers a headsup.

    Cheers,
    - --
    ** Help China's quake relief at http://www.redcross.org.cn/
    |>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
    Xin LI http://www.delphij.net/
    FreeBSD - The Power to Serve!
    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v2.0.9 (FreeBSD)

    iEYEARECAAYFAkgrJq4ACgkQi+vbBBjt66CB3gCfQ/hhQXVsyItDVmbP/j4lbI4v
    8k8AnRgqtHZeg7lw9aacSeXNb8uYo9Ae
    =dWBS
    -----END PGP SIGNATURE-----
    _______________________________________________
    freebsd-hackers@freebsd.org mailing list
    http://lists.freebsd.org/mailman/lis...reebsd-hackers
    To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"


+ Reply to Thread