[MXS-628] Fatal: MaxScale beta-1.4.0 received fatal signal 11 Created: 2016-03-18  Updated: 2016-03-29  Resolved: 2016-03-29

Status: Closed
Project: MariaDB MaxScale
Component/s: build
Affects Version/s: 1.4.0
Fix Version/s: 1.4.1

Type: Bug Priority: Major
Reporter: Thomas Stein Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Environment:

Gentoo Linux
Mariadb 10.0.23
mariadb-connector-c-2.2.2
libpcre2-10.21



 Description   

Hello Devs.

I installed Maxscale 1.4.0 from source and started it. But as soon as i try to connect to it i get:

2016-03-18 13:22:24   error  : Fatal: MaxScale beta-1.4.0 received fatal signal 11. Attempting backtrace.
2016-03-18 13:22:24   error  : Commit ID: source-build System name: Linux Release string: NAME=Gentoo Embedded library version: (null)
2016-03-18 13:22:24   error  :   maxscale() [0x403cee] 
2016-03-18 13:22:24   error  :   /lib64/libpthread.so.0(+0x10740) [0x7f596ca4b740] 
2016-03-18 13:22:24   error  :   /usr/lib64/mysql/libmysqld.so.18(+0x3a9c94) [0x7f59679e8c94] 
2016-03-18 13:22:24   error  :   /usr/lib64/mysql/libmysqld.so.18(_Z18plugin_thdvar_initP3THD+0x8b) [0x7f59679eb53b] 
2016-03-18 13:22:24   error  :   /usr/lib64/mysql/libmysqld.so.18(_ZN3THD4initEv+0x20) [0x7f5967c163b0] 
2016-03-18 13:22:24   error  :   /usr/lib64/mysql/libmysqld.so.18(_ZN3THDC1Ev+0x90c) [0x7f5967c16efc] 
2016-03-18 13:22:24   error  :   /usr/lib64/mysql/libmysqld.so.18(create_embedded_thd+0x38) [0x7f59679c08b8] 
2016-03-18 13:22:24   error  :   /usr/lib64/maxscale/libqc_mysqlembedded.so(+0x2566) [0x7f5968ece566] 
2016-03-18 13:22:24   error  :   /usr/lib64/maxscale/libqc_mysqlembedded.so(+0x246d) [0x7f5968ece46d] 
2016-03-18 13:22:24   error  :   /usr/lib64/maxscale/libqc_mysqlembedded.so(+0x21b2) [0x7f5968ece1b2] 
2016-03-18 13:22:24   error  :   /usr/lib64/maxscale/libqc_mysqlembedded.so(+0x221b) [0x7f5968ece21b] 
2016-03-18 13:22:24   error  :   /usr/lib64/maxscale/libmaxscale-common.so.1.0.0(qc_get_type+0x20) [0x7f596d45d625] 
2016-03-18 13:22:24   error  :   /usr/lib64/maxscale/libreadwritesplit.so(+0x5590) [0x7f596a0f5590] 
2016-03-18 13:22:24   error  :   /usr/lib64/maxscale/libreadwritesplit.so(+0x4f4f) [0x7f596a0f4f4f] 
2016-03-18 13:22:24   error  :   /usr/lib64/maxscale/libMySQLClient.so(+0x502a) [0x7f5966fc502a] 
2016-03-18 13:22:24   error  :   /usr/lib64/maxscale/libMySQLClient.so(+0x376d) [0x7f5966fc376d] 
2016-03-18 13:22:24   error  :   /usr/lib64/maxscale/libmaxscale-common.so.1.0.0(+0x320c0) [0x7f596d45f0c0] 
2016-03-18 13:22:24   error  :   /usr/lib64/maxscale/libmaxscale-common.so.1.0.0(poll_waitevents+0x6c6) [0x7f596d45e89f] 
2016-03-18 13:22:24   error  :   maxscale(main+0x1883) [0x406d5f] 
2016-03-18 13:22:24   error  :   /lib64/libc.so.6(__libc_start_main+0xf0) [0x7f596c2807b0] 
2016-03-18 13:22:24   error  :   maxscale(_start+0x29) [0x403669] 

Any ideas whats causing this?

thanks and cheers



 Comments   
Comment by Timofey Turenko [ 2016-03-19 ]

Could you please provide Maxscale configuration: which services are configured? What is backend configuration? (maxscale.cnf)

Comment by markus makela [ 2016-03-19 ]

Could you try to replicate this behavior on one of the supported systems? Among the most commonly used platforms are CentOS 7, Debian Jessie and Ubuntu 14.04.

Comment by Thomas Stein [ 2016-03-19 ]

Here is my config. Works fine with 1.3.0.

@Markus Do you mean I should try on the other systems?

thanks and cheers
t.

[maxscale]
threads=4
module=mysqlmon
 
[MySQL Monitor]
type=monitor
module=mysqlmon
#module=mmmon
servers=server1,server2,server3
user=maxscale
passwd=maxscale
monitor_interval=10000
backend_connect_timeout=3
backend_read_timeout=1
backend_write_timeout=2
#detect_replication_lag=
detect_stale_master=1
#script=/usr/local/bin/failover.sh
events=master_down
 
[qla]
type=filter
module=qlafilter
options=/tmp/QueryLog
 
[myfilter]
type=filter
module=regexfilter_ext
match=*oxuser*
add=$original_query # maxscale route to server server4
 
[hints]
type=filter
module=hintfilter
 
[fetch]
type=filter
module=regexfilter
match=fetch
replace=select
 
[namedserver]
type=filter
module=namedserverfilter
match=/\boxuserbaskets\b/g
server=server1
 
[slavelag]
type=filter
#count=10   Queries to route to master after data modification.
module=slavelag
time=2
#match=oxuser
#ignore=<regex> 
 
[RW Split Router]
type=service
router=readwritesplit
#router=readconnroute
servers=server1,server2,server3
#servers=server1
#master_accept_reads=true
user=maxscale
passwd=maxscale
#use_sql_variables_in=master
max_slave_connections=100%
#max_slave_replication_lag=21
#router_options=slave_selection_criteria=
#filters=qla
#filters=myfilter|hints
#filters=namedserver|top10
#filters=slavelag
 
[CLI]
type=service
router=cli
 
[RW Split Listener]
type=listener
service=RW Split Router
protocol=MySQLClient
port=3307
address=10.4.129.13
#socket=/tmp/rwsplit.sock
 
[CLI Listener]
type=listener
service=CLI
protocol=maxscaled
address=localhost
port=6603
 
[server1]
type=server
address=10.4.129.11
port=3306
protocol=MySQLBackend
 
[server2]
type=server
address=10.4.129.12
port=3306
protocol=MySQLBackend
 
[server3]
type=server
address=10.4.129.13
port=3306
protocol=MySQLBackend
 
 
[top10]
type=filter
module=topfilter
count=10
exclude=select
filebase=/opt/maxscale/log/session

Comment by Johan Wikman [ 2016-03-23 ]

As Gentoo is not one of our supported systems it would be helpful if you could try building MaxScale on a system that is. That way we would find out whether your problem is generic or Gentoo specific.

Br,
Johan

Comment by Thomas Stein [ 2016-03-23 ]

Well i guess you already tested maxscale 1.4 on the supported operating systems. What would be the next step if my configuration would work in ubuntu?

thanks and cheers
t.

Comment by Johan Wikman [ 2016-03-23 ]

Yes, we have tested MaxScale 1.4 on the supported operating systems.

However, since you are building MaxScale from the source, it would be informative to know whether a MaxScale built by you on one of the supported platforms works or not.

If it does work, then it would suggest that the problem is Gentoo specific; if it does not work then it would suggest that the problem is related to your build-setup.

Comment by Thomas Stein [ 2016-03-23 ]

I see. Unfortunately i have no access to a ubuntu machine. Thanks anyways. Maybe i get that sorted out another way.

Comment by Johan Wikman [ 2016-03-23 ]

What's the value of MYSQL_EMBEDDED_LIBRARIES when you run cmake?

Your stacktrace suggests libqc_mysqlembedded is linked against the shared library and not the static one (.../lib/libmysqld.a).

Comment by Thomas Stein [ 2016-03-23 ]

Yes. It seems so. Is this a bad thing?

maxscale build # ldd query_classifier/qc_mysqlembedded/libqc_mysqlembedded.so
        linux-vdso.so.1 (0x00007ffeb2124000)
        libmysqld.so.18 => /usr/lib64/mysql/libmysqld.so.18 (0x00007fdf2bcf9000)
        libaio.so.1 => /lib64/libaio.so.1 (0x00007fdf2baef000)
        libcrypt.so.1 => /lib64/libcrypt.so.1 (0x00007fdf2b8b8000)
        libcrypto.so.1.0.0 => /usr/lib64/libcrypto.so.1.0.0 (0x00007fdf2b478000)
        libdl.so.2 => /lib64/libdl.so.2 (0x00007fdf2b273000)
        libpcre.so.1 => /lib64/libpcre.so.1 (0x00007fdf2b003000)
        libssl.so.1.0.0 => /usr/lib64/libssl.so.1.0.0 (0x00007fdf2ad8c000)
        libstdc++.so.6 => /usr/lib/gcc/x86_64-pc-linux-gnu/4.9.3/libstdc++.so.6 (0x00007fdf2aa7c000)
        libz.so.1 => /lib64/libz.so.1 (0x00007fdf2a866000)
        libm.so.6 => /lib64/libm.so.6 (0x00007fdf2a563000)
        libgcc_s.so.1 => /usr/lib/gcc/x86_64-pc-linux-gnu/4.9.3/libgcc_s.so.1 (0x00007fdf2a34b000)
        libc.so.6 => /lib64/libc.so.6 (0x00007fdf29fb0000)
        /lib64/ld-linux-x86-64.so.2 (0x00007fdf2d792000)
        libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fdf29d94000)
maxscale build #

I guess this is because of this setting i set:

  # Use static version of libmysqld
  set(STATIC_EMBEDDED FALSE CACHE BOOL "Use static version of libmysqld")

Comment by Johan Wikman [ 2016-03-23 ]

Try linking it statically.

Comment by Johan Wikman [ 2016-03-24 ]

himbeere, did you have a chance to try with the static library?

Comment by Thomas Stein [ 2016-03-24 ]

I'm having a hard time to get a mariadb installed with the embedded option. I'm right on it.

Comment by Thomas Stein [ 2016-03-24 ]

Hi.

After compiling mariadb from source + maxscale (linked statically) from source i get:

MariaDB Corporation MaxScale    /var/log/maxscale/maxscale1.log Thu Mar 24 14:08:57 2016
-----------------------------------------------------------------------
2016-03-24 14:08:57   notice : Configuration file: /etc/maxscale.cnf
2016-03-24 14:08:57   notice : Log directory: /var/log/maxscale
2016-03-24 14:08:57   notice : Data directory: /var/lib/maxscale
2016-03-24 14:08:57   notice : Module directory: /usr/local/lib64/maxscale
2016-03-24 14:08:57   notice : Service cache: /var/cache/maxscale
2016-03-24 14:08:57   warning: Number of threads set to 4 which is greater than the number of processors available: 2
2016-03-24 14:08:57   notice : Initialise CLI router module V1.0.0.
2016-03-24 14:08:57   notice : Loaded module cli: V1.0.0 from /usr/local/lib64/maxscale/libcli.so
2016-03-24 14:08:57   notice : Initializing statemend-based read/write split router module.
2016-03-24 14:08:57   notice : Loaded module readwritesplit: V1.0.2 from /usr/local/lib64/maxscale/libreadwritesplit.so
2016-03-24 14:08:57   notice : Initialise the MySQL Monitor module V1.4.0.
2016-03-24 14:08:57   notice : Loaded module mysqlmon: V1.4.0 from /usr/local/lib64/maxscale/libmysqlmon.so
2016-03-24 14:08:57   notice : Encrypted password file /var/lib/maxscale/.secrets can't be accessed (No such file or directory). Password encryption is not used.
2016-03-24 14:08:57   notice : No query classifier specified, using default 'qc_mysqlembedded'.
2016-03-24 14:08:57   error  : Unable to load library for module: qc_mysqlembedded
 
                      /usr/local/lib64/maxscale/libqc_mysqlembedded.so: undefined symbol: PSI_server.
 
2016-03-24 14:08:57   error  : Could not load qc_mysqlembedded.
2016-03-24 14:08:57   error  : Error : Failed to initialise query classifier library.    
2016-03-24 14:08:57   MaxScale is shut down.

maxscale build # ldd  /usr/local/lib64/maxscale/libqc_mysqlembedded.so
	linux-vdso.so.1 (0x00007ffe577ca000)
	libaio.so.1 => /lib64/libaio.so.1 (0x00007f458c6c4000)
	libcrypt.so.1 => /lib64/libcrypt.so.1 (0x00007f458c48c000)
	libcrypto.so.1.0.0 => /usr/lib64/libcrypto.so.1.0.0 (0x00007f458c04c000)
	libdl.so.2 => /lib64/libdl.so.2 (0x00007f458be48000)
	libpcre.so.1 => /lib64/libpcre.so.1 (0x00007f458bbd7000)
	libssl.so.1.0.0 => /usr/lib64/libssl.so.1.0.0 (0x00007f458b960000)
	libstdc++.so.6 => /usr/lib/gcc/x86_64-pc-linux-gnu/4.9.3/libstdc++.so.6 (0x00007f458b651000)
	libz.so.1 => /lib64/libz.so.1 (0x00007f458b43a000)
	libm.so.6 => /lib64/libm.so.6 (0x00007f458b137000)
	libgcc_s.so.1 => /usr/lib/gcc/x86_64-pc-linux-gnu/4.9.3/libgcc_s.so.1 (0x00007f458af20000)
	libc.so.6 => /lib64/libc.so.6 (0x00007f458ab84000)
	/lib64/ld-linux-x86-64.so.2 (0x00007f458cad9000)
	libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f458a968000)
maxscale build #

Any ideas?

Comment by Thomas Stein [ 2016-03-24 ]

Just tried Maxscale 1.4.1 linked statically. Works. No crashing anymore.

thanks and cheers
t.

Comment by Johan Wikman [ 2016-03-29 ]

That's a bit peculiar, though, since there are no changes between 1.4.0 and 1.4.1 that should have any impact on this. But good that the problem has disappeared.

Thanks for reporting!

Comment by Johan Wikman [ 2016-03-29 ]

With 1.4.1 building on Gentoo succeeds when libqc_mysqlembedded is linked statically.

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