[MXS-625] QC lib broken Created: 2016-03-18  Updated: 2016-03-29  Resolved: 2016-03-29

Status: Closed
Project: MariaDB MaxScale
Component/s: Core
Affects Version/s: N/A
Fix Version/s: 1.4.0

Type: Bug Priority: Major
Reporter: Jay J Assignee: Johan Wikman
Resolution: Cannot Reproduce Votes: 0
Labels: None
Environment:

Ubuntu Trusty



 Description   

We decided to try 1.4 from devel due to a bug that has been fixed there (filestem being cut), however have encountered a new issue:

MariaDB Corporation MaxScale /var/lib/maxscale/log/maxscale1.log Fri Mar 18 03:15:34 2016
-----------------------------------------------------------------------
2016-03-18 03:15:34 notice : Configuration file: /etc/maxscale.cnf
2016-03-18 03:15:34 notice : Log directory: /var/lib/maxscale/log
2016-03-18 03:15:34 notice : Data directory: /var/lib/maxscale/data
2016-03-18 03:15:34 notice : Module directory: /etc/MaxScale/lib/x86_64-linux-gnu/maxscale
2016-03-18 03:15:34 notice : Service cache: /var/cache/maxscale
2016-03-18 03:15:34 notice : The logging of debug messages has been enabled.
2016-03-18 03:15:34 notice : Initialise readconnroute router module V1.1.0.
2016-03-18 03:15:34 notice : Loaded module readconnroute: V1.1.0 from /etc/MaxScale/lib/x86_64-linux-gnu/maxscale/libreadconnroute.so
2016-03-18 03:15:34 notice : Initialise binlog router module V2.0.0.
2016-03-18 03:15:34 notice : Loaded module binlogrouter: V2.0.0 from /etc/MaxScale/lib/x86_64-linux-gnu/maxscale/libbinlogrouter.so
2016-03-18 03:15:34 notice : Initialise CLI router module V1.0.0.
2016-03-18 03:15:34 notice : Loaded module cli: V1.0.0 from /etc/MaxScale/lib/x86_64-linux-gnu/maxscale/libcli.so
2016-03-18 03:15:34 notice : Initializing statemend-based read/write split router module.
2016-03-18 03:15:34 notice : Loaded module readwritesplit: V1.0.2 from /etc/MaxScale/lib/x86_64-linux-gnu/maxscale/libreadwritesplit.so
2016-03-18 03:15:34 notice : Initialise the Multi-Master Monitor module V1.1.1.
2016-03-18 03:15:34 notice : Loaded module mmmon: V1.1.1 from /etc/MaxScale/lib/x86_64-linux-gnu/maxscale/libmmmon.so
2016-03-18 03:15:34 notice : Using encrypted passwords. Encryption key: '/var/lib/maxscale/data/.secrets'.
2016-03-18 03:15:34 notice : Loaded module namedserverfilter: V1.1.0 from /etc/MaxScale/lib/x86_64-linux-gnu/maxscale/libnamedserverfilter.so
2016-03-18 03:15:34 notice : No query classifier specified, using default 'qc_mysqlembedded'.
2016-03-18 03:15:34 error : Unable to load library for module: qc_mysqlembedded

/etc/MaxScale/lib/x86_64-linux-gnu/maxscale/libqc_mysqlembedded.so: undefined symbol: _Z9parse_sqlP3THDP12Parser_stateP19Object_creation_ctxb.

2016-03-18 03:15:34 error : Could not load qc_mysqlembedded.
2016-03-18 03:15:34 error : Error : Failed to initialise query classifier library.
2016-03-18 03:15:34 MaxScale is shut down.

I assume the issue is the corrupted Query Classifier library.



 Comments   
Comment by Johan Wikman [ 2016-03-18 ]

Please checkout the tag 1.4.0 and try with that.

Comment by Johan Wikman [ 2016-03-18 ]

That symbol _Z9parse_sqlP3THDP12Parser_stateP19Object_creation_ctxb (unmangled: parse_sql(THD*, Parser_state*, Object_creation_ctx*, bool)) comes from the embedded library.

When configuring, please ensure that the variable MYSQL_EMBEDDED_LIBRARIES points to the embedded library. You can set it explicitly the following way when invoking cmake:

cmake ... -DMYSQL_EMBEDDED_LIBRARIES=/usr/mariadb-10.1.12/lib/libmysqld.a ...

To ensure that the symbol is picked up you can temporarily remove the # from the line

#set_target_properties(qc_mysqlembedded PROPERTIES LINK_FLAGS -Wl,-z,defs)

in the CMakeLists.txt file of qc_mysqlembedded.

Due to other missing symbols (that will be resolved at runtime), the linking will fail, but with that you can check that parse_sql is not one of them.

Comment by Jay J [ 2016-03-18 ]

Tried checking out 1.4.0, and I do have "-DMYSQL_EMBEDDED_LIBRARIES=/opt/5.5.46/lib/libmysqld.a" (the file exists) in my cmake - still getting the same error...

Should the embedded libs be for 10.x?

My full cmake is the following:

UN cmake .. -DMYSQL_DIR=/opt/5.5.46/include \
-DERRMSG=/opt/5.5.46/share/english/errmsg.sys \
-DCMAKE_INSTALL_PREFIX=/etc/MaxScale -DBUILD_TESTS=Y \
-DWITH_SCRIPTS=N \
-DMYSQL_EMBEDDED_LIBRARIES=/opt/5.5.46/lib/libmysqld.a
RUN make && make install

Comment by Johan Wikman [ 2016-03-23 ]

Could you please try using 10.x libmysqld.a library.

Comment by Johan Wikman [ 2016-03-23 ]

Also specify the include path for the embedded headers.

-DMYSQL_EMBEDDED_INCLUDE_DIR=/opt/5.5.46/include/mysql

Comment by Johan Wikman [ 2016-03-24 ]

jay.j, did adding the include path and/or swithing to a 10.x libmysqld.a library resolve the problem?

Comment by Johan Wikman [ 2016-03-29 ]

Cannot be reproduced and no new information received.

Possibly caused by mismatch of headers and library.

Generated at Thu Feb 08 04:00:43 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.