You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We've found a very weird issue on one of our nodes where binaries compiled with LMDB MDBX cause memory corruption during execution. Even when the code paths that use MDBX (i.e. the slasher) are inactive, the corruption still occurs.
Delete MDBX from LH, retaining LMDB as default for now (if it is untainted), and Redb.
Move to using the Reth bindings (assuming they are free of UB), or
Steps to resolve (LMDB)
This section was written assuming LMDB was buggy, which it still could be:
Option 1 is that we remove LMDB from Lighthouse completely, or at least from our compiled binaries. The downside is that it's the default slasher DB, so this will require everyone with a slasher to delete their slasher DB and start again (not really a big deal). The other difficulty is choosing whether to go with Redb or MDBX as the new default (I would prefer Redb).
Option 2 is to try to fix the UB in the bindings. I worry that this will be very involved and for little long-term benefit. There are no alternative LMDB bindings we can use because the bug exists in the original lmdb and its fork lmdb-rkv. There are no LMDB bindings that are being maintained (see https://crates.io/search?q=lmdb).
The text was updated successfully, but these errors were encountered:
Sounds good. I don't think we have the bandwidth to maintain LMDB bindings solo, and there's no real point pouring tonnes of resources in to a dead-end DB.
Documenting here so we have something to reference in the release notes when we delete it!
michaelsproul
changed the title
Binaries compiled with LMDB exhibit memory corruption
Binaries compiled with MDBX exhibit memory corruption
Aug 22, 2024
Description
We've found a very weird issue on one of our nodes where binaries compiled with
LMDBMDBX cause memory corruption during execution. Even when the code paths that use MDBX (i.e. the slasher) are inactive, the corruption still occurs.The nature of the corruption is described here:
Initially we identified UB in the LMDB bindings and worked around it in this PR:
Steps to resolve (MDBX)
Steps to resolve (LMDB)
This section was written assuming LMDB was buggy, which it still could be:
Option 1 is that we remove LMDB from Lighthouse completely, or at least from our compiled binaries. The downside is that it's the default slasher DB, so this will require everyone with a slasher to delete their slasher DB and start again (not really a big deal). The other difficulty is choosing whether to go with Redb or MDBX as the new default (I would prefer Redb).
Option 2 is to try to fix the UB in the bindings. I worry that this will be very involved and for little long-term benefit. There are no alternative LMDB bindings we can use because the bug exists in the original
lmdb
and its forklmdb-rkv
. There are no LMDB bindings that are being maintained (see https://crates.io/search?q=lmdb).The text was updated successfully, but these errors were encountered: