Details
-
Bug
-
Status: Stalled (View Workflow)
-
Minor
-
Resolution: Unresolved
-
10.1.6
-
None
-
10.1.9-3
Description
mroonga crashes in embedded tests in 10.1.
this looks like a linking problem. the crash happens immediately in mrn_init() on
mrn_hton_ptr = hton;
|
In -DCMAKE_BUILD_TYPE=Debug this is compiled to
movq mrn_hton_ptr@GOTPCREL(%rip), %rax
|
movq -32(%rbp), %rdx
|
movq %rdx, (%rax)
|
And in gdb I see that %rax is 0 in the last line. Other plugins (for example, qc_info plugin) succeed, while having very similar code. I'd guess the issue has something to do with compilation or linking options that mroonga uses.
As a temporary workaround I have made mroonga tests not to run by default in embedded test runs.
I've fixed it on master in the Mroonga repository: https://github.com/mroonga/mroonga
I've added "MRN_BUILD_FOR_EMBEDDED_SERVER" CMake option. We need to enable the value by passing "-DMRN_BUILD_FOR_EMBEDDED_SERVER=ON" when we build Mroonga for embedded server.
Reason: Mroonga uses "THD". "THD" has more fields when it's build for embedded server. (See "#ifdef EMBEDDED_LIBRARY" in sql/sql_class.h.) We need to build Mroonga with "EMBEDDED_LIBRARY" flag for embedded server. The "MRN_BUILD_FOR_EMBEDDED_SERVER" CMake option adds "-DEMBEDDED_LIBRARY" compiler (preprocessor) flag.