https://bugs.openldap.org/show_bug.cgi?id=10241
Issue ID: 10241 Summary: Crash in mdb_page_search_root() Product: LMDB Version: 0.9.24 Hardware: x86_64 OS: Linux Status: UNCONFIRMED Keywords: needs_review Severity: normal Priority: --- Component: liblmdb Assignee: bugs@openldap.org Reporter: david.komarek@whalebone.io Target Milestone: ---
Hello,
The LMDB is crashing in mdb_page_search_root() on following instruction `0x7f85221479d2 movzwl 0xa(%rdx),%eax`. This instruction corresponds to following line in source code - https://github.com/LMDB/lmdb/blob/LMDB_0.9.24/libraries/liblmdb/mdb.c#L5485 (while access mp_flags in MDB_page structure)
Here is callstack as generated by core dump (without symbols as we're using package from Ubuntu repositories) ``` Program terminated with signal SIGSEGV, Segmentation fault. #0 0x00007f85221479d2 in ?? () from /usr/lib/x86_64-linux-gnu/liblmdb.so.0 No symbol table info available. #1 0x00007f8522147d15 in ?? () from /usr/lib/x86_64-linux-gnu/liblmdb.so.0 No symbol table info available. #2 0x00007f8522148432 in ?? () from /usr/lib/x86_64-linux-gnu/liblmdb.so.0 No symbol table info available. #3 0x00007f8522148a70 in mdb_get () from /usr/lib/x86_64-linux-gnu/liblmdb.so.0 No symbol table info available. ``` Translation ``` #0 mdb_page_search_root() #1 mdb_page_search() #2 mdb_cursor_set() #3 mdb_get() ``` Registers in time of crash: ``` rax 0x2 2 rbx 0x7ffcd8d2a100 140723946168576 rcx 0x3 3 rdx 0x7f825baf7000 140197860700160 rsi 0x1000 4096 rdi 0x7f851c00f4d0 140209677202640 rbp 0x0 0x0 rsp 0x7ffcd8d29e40 0x7ffcd8d29e40 r8 0x7ffcd8d29e50 140723946167888 r9 0x7f851c00f5b8 140209677202872 r10 0x7f851c003090 140209677152400 r11 0x2ce33e6c02ce33e7 3234497591006606311 r12 0x0 0 r13 0x7ffcd8d2a510 140723946169616 r14 0x79 121 r15 0x7f851c003098 140209677152408 rip 0x7f85221479d2 0x7f85221479d2 eflags 0x10246 [ PF ZF IF RF ] cs 0x33 51 ss 0x2b 43 ds 0x0 0 es 0x0 0 fs 0x0 0 gs 0x0 0 k0 0x40 64 k1 0xfffff0f0 4294963440 k2 0xff01 65281 k3 0xffffffff 4294967295 k4 0xffffffff 4294967295 k5 0xffffffff 4294967295 k6 0xffffffff 4294967295 k7 0x0 0 ```
Our setup is following: We have single process (running in separate container) which reads and writes to LMDB. It opens environment with following flags MDB_NORDAHEAD|MDB_WRITEMAP|MDB_NOTLS|MDB_NOSYNC. The environment contain several DBs. All DBIs are open with MDB_CREATE flag. Transactions are open without flags. On the other hand we have several processes running in the single container, which are only allowed read (these processes crash). The environment is open with following flags MDB_NORDAHEAD|MDB_WRITEMAP|MDB_NOTLS|MDB_RDONLY. All DBIs are open without flags. Transactions are open with MDB_RDONLY flag.
Could you please investigate it? If you will need some other artifacts or comments, please let me know.
https://bugs.openldap.org/show_bug.cgi?id=10241
--- Comment #1 from Howard Chu hyc@openldap.org ---
Could you please investigate it? If you will need some other artifacts or comments, please let me know.
LMD 0.9.24 is 5 years old, released 2019-07-24. We will not investigate such an old release. The current release is 0.9.33, 2024-05-21. You should upgrade.
Also you should use a build with debug symbols present if you need to investigate any crashes.
https://bugs.openldap.org/show_bug.cgi?id=10241
--- Comment #2 from david.komarek@whalebone.io --- Hello,
LMD 0.9.24 is 5 years old, released 2019-07-24. We will not investigate such an old release. The current release is 0.9.33, 2024-05-21. You should upgrade.
We are using library installed by debian package and there is 0.9.24 (https://packages.ubuntu.com/jammy/liblmdb-dev). I also didn't find a list of supported/obsolete versions.
Also you should use a build with debug symbols present if you need to investigate any crashes.
As I wrote earlier we're using library installed by package manager and we're not able to reproduce this reliably (but it happens from time to time on production environmen). As this happen on production environment we can't deploy debug version of library.
Is there any way how could you help us given the circumstances?
https://bugs.openldap.org/show_bug.cgi?id=10241
--- Comment #3 from Quanah Gibson-Mount quanah@openldap.org --- (In reply to david.komarek from comment #2)
Is there any way how could you help us given the circumstances?
The openldap project provides source code. It does not provide binary releases. If the debian package is missing debug symbols you will need to contact them about the issue. You can find the full LMDB release history at:
https://git.openldap.org/openldap/openldap/-/blob/mdb.RE/0.9/libraries/liblm...
If you require assistance, it is advised you use a current release. We cannot help you with Debian's ancient build.
https://bugs.openldap.org/show_bug.cgi?id=10241
Quanah Gibson-Mount quanah@openldap.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution|--- |INVALID Keywords|needs_review |
https://bugs.openldap.org/show_bug.cgi?id=10241
Quanah Gibson-Mount quanah@openldap.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |VERIFIED
https://bugs.openldap.org/show_bug.cgi?id=10241
--- Comment #4 from Howard Chu hyc@openldap.org --- (In reply to david.komarek from comment #2)
Hello,
LMD 0.9.24 is 5 years old, released 2019-07-24. We will not investigate such an old release. The current release is 0.9.33, 2024-05-21. You should upgrade.
We are using library installed by debian package and there is 0.9.24 (https://packages.ubuntu.com/jammy/liblmdb-dev). I also didn't find a list of supported/obsolete versions.
Also you should use a build with debug symbols present if you need to investigate any crashes.
As I wrote earlier we're using library installed by package manager and we're not able to reproduce this reliably (but it happens from time to time on production environmen). As this happen on production environment we can't deploy debug version of library.
Is there any way how could you help us given the circumstances?
If you want our help you must use a current release. It's simple enough to compile the source code yourself, there's no good reason to stay on the outdated Debian package.