[MXS-429] Binlog Router crashes due to segmentation fault with no meaningful error if no listener is configured Created: 2015-10-27  Updated: 2015-12-01  Resolved: 2015-12-01

Status: Closed
Project: MariaDB MaxScale
Component/s: binlogrouter
Affects Version/s: 1.2.1
Fix Version/s: 1.3.0

Type: Bug Priority: Major
Reporter: Geoff Montee (Inactive) Assignee: Massimiliano Pinto (Inactive)
Resolution: Fixed Votes: 0
Labels: None


 Description   

Maxscale crashes due to a segmentation fault if the Binlog Router is configured, but there is no listener configured for the service.

No useful error message is printed to inform the user about why this happens.

I have a configuration file that looks like this:

[maxscale]
threads=4
log_debug=1
log_trace=1
 
[MySQL Monitor]
type=monitor
module=mysqlmon
servers=master
user=maxscale_user
passwd=password
monitor_interval=10000
 
[Binlog_Service]
type=service
router=binlogrouter
servers=master
router_options=mariadb10-compatibility=1,server-id=2,master-id=2,binlogdir=/var/tmp/binlog
user=maxscale_user
passwd=password
version_string=10.0.20-MariaDB-enterprise-log
 
[master]
type=server
address=server_address_goes_here
port=3306
protocol=MySQLBackend
 
[Debug Interface]
type=service
router=debugcli
 
[CLI]
type=service
router=cli
 
[Debug Listener]
type=listener
service=Debug Interface
protocol=telnetd
address=127.0.0.1
port=4442
 
[CLI Listener]
type=listener
service=CLI
protocol=maxscaled
port=6603

The user was created on the backend MariaDB 10.0 server with:

CREATE USER 'maxscale_user'@'%' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON *.* TO 'maxscale_user'@'%';

And the binlog directory was created on the maxscale server with:

sudo mkdir /var/tmp/binlog
sudo chown maxscale:maxscale /var/tmp/binlog

After starting up maxscale, it crashes immediately.

error1.log:

MariaDB Corporation MaxScale    /var/log/maxscale/error1.log Tue Oct 27 14:39:08 2015
-----------------------------------------------------------------------
---     Logging is enabled.
2015-10-27 14:39:08   Error : Failed to start service 'Binlog_Service'.
2015-10-27 14:39:09   Fatal: MaxScale 1.2.1 received fatal signal 11. Attempting backtrace.
2015-10-27 14:39:09   Commit ID: 7bfda81b098bfd0db3c306495725d1910294d2e8 System name: Linux Release string: Red Hat Enterprise Linux Server release 6.7 (Santiago) Embedded library version: 5.5.42-MariaDB
2015-10-27 14:39:09     /usr/bin/maxscale() [0x523a32]
2015-10-27 14:39:09     /lib64/libpthread.so.0(+0xf790) [0x7fcedc5e8790]
2015-10-27 14:39:09     /usr/lib64/maxscale/libbinlogrouter.so(+0x9063) [0x7fced44c4063]
2015-10-27 14:39:09     /usr/lib64/maxscale/libbinlogrouter.so(blr_master_response+0x12ee) [0x7fced44c3d2d]
2015-10-27 14:39:09     /usr/lib64/maxscale/libbinlogrouter.so(+0x6863) [0x7fced44c1863]
2015-10-27 14:39:09     /usr/lib64/maxscale/libMySQLBackend.so(+0x515e) [0x7fcec105615e]
2015-10-27 14:39:09     /usr/bin/maxscale() [0x5394b5]
2015-10-27 14:39:09     /usr/bin/maxscale(poll_waitevents+0x634) [0x538d74]
2015-10-27 14:39:09     /lib64/libpthread.so.0(+0x7a51) [0x7fcedc5e0a51]
2015-10-27 14:39:09     /lib64/libc.so.6(clone+0x6d) [0x7fcedaf5196d]

messages1.log:

MariaDB Corporation MaxScale    /var/log/maxscale/messages1.log Tue Oct 27 14:39:08 2015
-----------------------------------------------------------------------
---     Logging is enabled.
2015-10-27 14:39:08   Configuration file: /etc/maxscale.cnf
2015-10-27 14:39:08   Log directory: /var/log/maxscale//
2015-10-27 14:39:08   Data directory: /var/lib/maxscale/data/data2325
2015-10-27 14:39:08   Module directory: /usr/lib64/maxscale
2015-10-27 14:39:08   Service cache: /var/cache/maxscale/
2015-10-27 14:39:08   Initialise CLI router module V1.0.0.
2015-10-27 14:39:08   Loaded module cli: V1.0.0 from /usr/lib64/maxscale/libcli.so
2015-10-27 14:39:08   Initialise debug CLI router module V1.1.1.
2015-10-27 14:39:08   Loaded module debugcli: V1.1.1 from /usr/lib64/maxscale/libdebugcli.so
2015-10-27 14:39:08   Initialise binlog router module V1.0.6.
2015-10-27 14:39:08   Loaded module binlogrouter: V1.0.6 from /usr/lib64/maxscale/libbinlogrouter.so
2015-10-27 14:39:08   Initialise the MySQL Monitor module V1.4.0.
2015-10-27 14:39:08   Loaded module mysqlmon: V1.4.0 from /usr/lib64/maxscale/libmysqlmon.so
2015-10-27 14:39:08   MariaDB Corporation MaxScale 1.2.1 (C) MariaDB Corporation Ab 2013-2014
2015-10-27 14:39:08   MaxScale is running in process  2325
2015-10-27 14:39:08   Loaded module MySQLBackend: V2.0.0 from /usr/lib64/maxscale/libMySQLBackend.so
2015-10-27 14:39:08   Binlog_Service: attempting to connect to master server 52.10.173.241.
2015-10-27 14:39:08   Loaded module telnetd: V1.0.1 from /usr/lib64/maxscale/libtelnetd.so
2015-10-27 14:39:08   Listening telnet connections at 127.0.0.1:4442
2015-10-27 14:39:08   Loaded module maxscaled: V1.0.0 from /usr/lib64/maxscale/libmaxscaled.so
2015-10-27 14:39:08   Listening maxscale connections at 0.0.0.0:6603
2015-10-27 14:39:08   MaxScale started with 4 server threads.
2015-10-27 14:39:08   Started MaxScale log flusher.

debug1.log:

MariaDB Corporation MaxScale    /dev/shm/maxscale.2325/debug1.log Tue Oct 27 14:39:08 2015
-----------------------------------------------------------------------
---     Logging is disabled.
2015-10-27 14:39:08   ---       Logging to file is enabled      --
2015-10-27 14:39:08   140526452930528 [gw_create_backend_connection] Connection pending to 52.10.173.241:3306, protocol fd 13 client fd -1.
2015-10-27 14:39:08   140526452930528 [poll_add_dcb] Added dcb 0x33cc050 in state DCB_STATE_POLLING to poll set.
2015-10-27 14:39:08   140526452930528 [gw_MySQLWrite_backend] delayed write to dcb 0x33cc050 fd 13 protocol state MYSQL_PENDING_CONNECT.
2015-10-27 14:39:08   140526452930528 [poll_add_dcb] Added dcb 0x33cebb0 in state DCB_STATE_LISTENING to poll set.
2015-10-27 14:39:08   140526452930528 [poll_add_dcb] Added dcb 0x33cf750 in state DCB_STATE_LISTENING to poll set.
2015-10-27 14:39:08   140525934229248 [poll_waitevents] epoll_wait found 1 fds
2015-10-27 14:39:08   140525934229248 [poll_waitevents] event 4 dcb 0x33cc050 role DCB_ROLE_REQUEST_HANDLER
2015-10-27 14:39:08   140525934229248 [gw_write_backend_event] wrote to dcb 0x33cc050 fd 13, return 1
2015-10-27 14:39:08   140525934229248 [poll_waitevents] epoll_wait found 1 fds
2015-10-27 14:39:08   140525934229248 [poll_waitevents] event 5 dcb 0x33cc050 role DCB_ROLE_REQUEST_HANDLER
2015-10-27 14:39:08   140525934229248 [gw_write_backend_event] wrote to dcb 0x33cc050 fd 13, return 1
2015-10-27 14:39:08   140525934229248 [poll_waitevents] Read in dcb 0x33cc050 fd 13
2015-10-27 14:39:08   140525934229248 [gw_read_backend_event] Read dcb 0x33cc050 fd 13 protocol state 2, MYSQL_CONNECTED.
2015-10-27 14:39:08   140525934229248 [dcb_read] Read 97 bytes from dcb 0x33cc050 in state DCB_STATE_POLLING fd 13.
2015-10-27 14:39:08   140525934229248 [dcb_write] Wrote 93 Bytes to dcb 0x33cc050 in state DCB_STATE_POLLING fd 13
2015-10-27 14:39:08   140525934229248 [gw_receive_backend_auth] Read zero bytes from backend dcb 0x33cc050 fd 13 in state DCB_STATE_POLLING. n 0, head (nil), len 0
2015-10-27 14:39:08   140525934229248 [poll_waitevents] epoll_wait found 1 fds
2015-10-27 14:39:08   140525934229248 [poll_waitevents] event 5 dcb 0x33cc050 role DCB_ROLE_REQUEST_HANDLER
2015-10-27 14:39:08   140525934229248 [gw_write_backend_event] wrote to dcb 0x33cc050 fd 13, return 1
2015-10-27 14:39:08   140525934229248 [poll_waitevents] Read in dcb 0x33cc050 fd 13
2015-10-27 14:39:08   140525934229248 [gw_read_backend_event] Read dcb 0x33cc050 fd 13 protocol state 4, MYSQL_AUTH_RECV.
2015-10-27 14:39:08   140525934229248 [dcb_read] Read 11 bytes from dcb 0x33cc050 in state DCB_STATE_POLLING fd 13.
2015-10-27 14:39:08   140525934229248 [dcb_write] Wrote 28 Bytes to dcb 0x33cc050 in state DCB_STATE_POLLING fd 13
2015-10-27 14:39:08   140525934229248 [poll_waitevents] epoll_wait found 1 fds
2015-10-27 14:39:08   140525934229248 [poll_waitevents] event 5 dcb 0x33cc050 role DCB_ROLE_REQUEST_HANDLER
2015-10-27 14:39:08   140525934229248 [gw_write_backend_event] wrote to dcb 0x33cc050 fd 13, return 1
2015-10-27 14:39:08   140525934229248 [poll_waitevents] Read in dcb 0x33cc050 fd 13
2015-10-27 14:39:08   140525934229248 [gw_read_backend_event] Read dcb 0x33cc050 fd 13 protocol state 11, MYSQL_IDLE.
2015-10-27 14:39:08   140525934229248 [dcb_read] Read 80 bytes from dcb 0x33cc050 in state DCB_STATE_POLLING fd 13.
2015-10-27 14:39:08   140525934229248 [protocol_get_srv_command] Read command UNKNOWN MYSQL PACKET TYPE for fd 13.
2015-10-27 14:39:08   140525934229248 [gw_MySQLWrite_backend] write to dcb 0x33cc050 fd 13 protocol state MYSQL_IDLE.
2015-10-27 14:39:08   140525934229248 [dcb_write] Wrote 36 Bytes to dcb 0x33cc050 in state DCB_STATE_POLLING fd 13
2015-10-27 14:39:09   140525934229248 [poll_waitevents] epoll_wait found 1 fds
2015-10-27 14:39:09   140525934229248 [poll_waitevents] event 5 dcb 0x33cc050 role DCB_ROLE_REQUEST_HANDLER
2015-10-27 14:39:09   140525934229248 [gw_write_backend_event] wrote to dcb 0x33cc050 fd 13, return 1
2015-10-27 14:39:09   140525934229248 [poll_waitevents] Read in dcb 0x33cc050 fd 13
2015-10-27 14:39:09   140525934229248 [gw_read_backend_event] Read dcb 0x33cc050 fd 13 protocol state 11, MYSQL_IDLE.
2015-10-27 14:39:09   140525934229248 [dcb_read] Read 208 bytes from dcb 0x33cc050 in state DCB_STATE_POLLING fd 13.
2015-10-27 14:39:09   140525934229248 [protocol_get_srv_command] Read command UNKNOWN MYSQL PACKET TYPE for fd 13.
2015-10-27 14:39:09   140525934229248 [gw_MySQLWrite_backend] write to dcb 0x33cc050 fd 13 protocol state MYSQL_IDLE.
2015-10-27 14:39:09   140525934229248 [dcb_write] Wrote 48 Bytes to dcb 0x33cc050 in state DCB_STATE_POLLING fd 13
2015-10-27 14:39:09   140525934229248 [poll_waitevents] epoll_wait found 1 fds
2015-10-27 14:39:09   140525934229248 [poll_waitevents] event 5 dcb 0x33cc050 role DCB_ROLE_REQUEST_HANDLER
2015-10-27 14:39:09   140525934229248 [gw_write_backend_event] wrote to dcb 0x33cc050 fd 13, return 1
2015-10-27 14:39:09   140525934229248 [poll_waitevents] Read in dcb 0x33cc050 fd 13
2015-10-27 14:39:09   140525934229248 [gw_read_backend_event] Read dcb 0x33cc050 fd 13 protocol state 11, MYSQL_IDLE.
2015-10-27 14:39:09   140525934229248 [dcb_read] Read 11 bytes from dcb 0x33cc050 in state DCB_STATE_POLLING fd 13.
2015-10-27 14:39:09   140525934229248 [protocol_get_srv_command] Read command UNKNOWN MYSQL PACKET TYPE for fd 13.
2015-10-27 14:39:09   140525934229248 [gw_MySQLWrite_backend] write to dcb 0x33cc050 fd 13 protocol state MYSQL_IDLE.
2015-10-27 14:39:09   140525934229248 [dcb_write] Wrote 59 Bytes to dcb 0x33cc050 in state DCB_STATE_POLLING fd 13
2015-10-27 14:39:09   140525934229248 [poll_waitevents] epoll_wait found 1 fds
2015-10-27 14:39:09   140525934229248 [poll_waitevents] event 5 dcb 0x33cc050 role DCB_ROLE_REQUEST_HANDLER
2015-10-27 14:39:09   140525934229248 [gw_write_backend_event] wrote to dcb 0x33cc050 fd 13, return 1
2015-10-27 14:39:09   140525934229248 [poll_waitevents] Read in dcb 0x33cc050 fd 13
2015-10-27 14:39:09   140525934229248 [gw_read_backend_event] Read dcb 0x33cc050 fd 13 protocol state 11, MYSQL_IDLE.
2015-10-27 14:39:09   140525934229248 [dcb_read] Read 11 bytes from dcb 0x33cc050 in state DCB_STATE_POLLING fd 13.
2015-10-27 14:39:09   140525934229248 [protocol_get_srv_command] Read command UNKNOWN MYSQL PACKET TYPE for fd 13.
2015-10-27 14:39:09   140525934229248 [gw_MySQLWrite_backend] write to dcb 0x33cc050 fd 13 protocol state MYSQL_IDLE.
2015-10-27 14:39:09   140525934229248 [dcb_write] Wrote 35 Bytes to dcb 0x33cc050 in state DCB_STATE_POLLING fd 13
2015-10-27 14:39:09   140525934229248 [poll_waitevents] epoll_wait found 1 fds
2015-10-27 14:39:09   140525934229248 [poll_waitevents] event 5 dcb 0x33cc050 role DCB_ROLE_REQUEST_HANDLER
2015-10-27 14:39:09   140525934229248 [gw_write_backend_event] wrote to dcb 0x33cc050 fd 13, return 1
2015-10-27 14:39:09   140525934229248 [poll_waitevents] Read in dcb 0x33cc050 fd 13
2015-10-27 14:39:09   140525934229248 [gw_read_backend_event] Read dcb 0x33cc050 fd 13 protocol state 11, MYSQL_IDLE.
2015-10-27 14:39:09   140525934229248 [dcb_read] Read 81 bytes from dcb 0x33cc050 in state DCB_STATE_POLLING fd 13.
2015-10-27 14:39:09   140525934229248 [protocol_get_srv_command] Read command UNKNOWN MYSQL PACKET TYPE for fd 13.
2015-10-27 14:39:09   140525934229248 [gw_MySQLWrite_backend] write to dcb 0x33cc050 fd 13 protocol state MYSQL_IDLE.
2015-10-27 14:39:09   140525934229248 [dcb_write] Wrote 36 Bytes to dcb 0x33cc050 in state DCB_STATE_POLLING fd 13
2015-10-27 14:39:09   140525934229248 [poll_waitevents] epoll_wait found 1 fds
2015-10-27 14:39:09   140525934229248 [poll_waitevents] event 5 dcb 0x33cc050 role DCB_ROLE_REQUEST_HANDLER
2015-10-27 14:39:09   140525934229248 [gw_write_backend_event] wrote to dcb 0x33cc050 fd 13, return 1
2015-10-27 14:39:09   140525934229248 [poll_waitevents] Read in dcb 0x33cc050 fd 13
2015-10-27 14:39:09   140525934229248 [gw_read_backend_event] Read dcb 0x33cc050 fd 13 protocol state 11, MYSQL_IDLE.
2015-10-27 14:39:09   140525934229248 [dcb_read] Read 11 bytes from dcb 0x33cc050 in state DCB_STATE_POLLING fd 13.
2015-10-27 14:39:09   140525934229248 [protocol_get_srv_command] Read command UNKNOWN MYSQL PACKET TYPE for fd 13.
2015-10-27 14:39:09   140525934229248 [gw_MySQLWrite_backend] write to dcb 0x33cc050 fd 13 protocol state MYSQL_IDLE.
2015-10-27 14:39:09   140525934229248 [dcb_write] Wrote 38 Bytes to dcb 0x33cc050 in state DCB_STATE_POLLING fd 13
2015-10-27 14:39:09   140525934229248 [poll_waitevents] epoll_wait found 1 fds
2015-10-27 14:39:09   140525934229248 [poll_waitevents] event 5 dcb 0x33cc050 role DCB_ROLE_REQUEST_HANDLER
2015-10-27 14:39:09   140525934229248 [gw_write_backend_event] wrote to dcb 0x33cc050 fd 13, return 1
2015-10-27 14:39:09   140525934229248 [poll_waitevents] Read in dcb 0x33cc050 fd 13
2015-10-27 14:39:09   140525934229248 [gw_read_backend_event] Read dcb 0x33cc050 fd 13 protocol state 11, MYSQL_IDLE.
2015-10-27 14:39:09   140525934229248 [dcb_read] Read 192 bytes from dcb 0x33cc050 in state DCB_STATE_POLLING fd 13.
2015-10-27 14:39:09   140525934229248 [protocol_get_srv_command] Read command UNKNOWN MYSQL PACKET TYPE for fd 13.
2015-10-27 14:39:09   140525934229248 [gw_MySQLWrite_backend] write to dcb 0x33cc050 fd 13 protocol state MYSQL_IDLE.
2015-10-27 14:39:09   140525934229248 [dcb_write] Wrote 113 Bytes to dcb 0x33cc050 in state DCB_STATE_POLLING fd 13
2015-10-27 14:39:09   140525934229248 [poll_waitevents] epoll_wait found 1 fds
2015-10-27 14:39:09   140525934229248 [poll_waitevents] event 5 dcb 0x33cc050 role DCB_ROLE_REQUEST_HANDLER
2015-10-27 14:39:09   140525934229248 [gw_write_backend_event] wrote to dcb 0x33cc050 fd 13, return 1
2015-10-27 14:39:09   140525934229248 [poll_waitevents] Read in dcb 0x33cc050 fd 13
2015-10-27 14:39:09   140525934229248 [gw_read_backend_event] Read dcb 0x33cc050 fd 13 protocol state 11, MYSQL_IDLE.
2015-10-27 14:39:09   140525934229248 [dcb_read] Read 11 bytes from dcb 0x33cc050 in state DCB_STATE_POLLING fd 13.
2015-10-27 14:39:09   140525934229248 [protocol_get_srv_command] Read command UNKNOWN MYSQL PACKET TYPE for fd 13.
2015-10-27 14:39:09   140525934229248 [gw_MySQLWrite_backend] write to dcb 0x33cc050 fd 13 protocol state MYSQL_IDLE.
2015-10-27 14:39:09   140525934229248 [dcb_write] Wrote 21 Bytes to dcb 0x33cc050 in state DCB_STATE_POLLING fd 13
2015-10-27 14:39:09   140525934229248 [poll_waitevents] epoll_wait found 1 fds
2015-10-27 14:39:09   140525934229248 [poll_waitevents] event 5 dcb 0x33cc050 role DCB_ROLE_REQUEST_HANDLER
2015-10-27 14:39:09   140525934229248 [gw_write_backend_event] wrote to dcb 0x33cc050 fd 13, return 1
2015-10-27 14:39:09   140525934229248 [poll_waitevents] Read in dcb 0x33cc050 fd 13
2015-10-27 14:39:09   140525934229248 [gw_read_backend_event] Read dcb 0x33cc050 fd 13 protocol state 11, MYSQL_IDLE.
2015-10-27 14:39:09   140525934229248 [dcb_read] Read 11 bytes from dcb 0x33cc050 in state DCB_STATE_POLLING fd 13.
2015-10-27 14:39:09   140525934229248 [protocol_get_srv_command] Read command UNKNOWN MYSQL PACKET TYPE for fd 13.
2015-10-27 14:39:09   140525934229248 [gw_MySQLWrite_backend] write to dcb 0x33cc050 fd 13 protocol state MYSQL_IDLE.
2015-10-27 14:39:09   140525934229248 [dcb_write] Wrote 19 Bytes to dcb 0x33cc050 in state DCB_STATE_POLLING fd 13
2015-10-27 14:39:09   140525934229248 [poll_waitevents] epoll_wait found 1 fds
2015-10-27 14:39:09   140525934229248 [poll_waitevents] event 5 dcb 0x33cc050 role DCB_ROLE_REQUEST_HANDLER
2015-10-27 14:39:09   140525934229248 [gw_write_backend_event] wrote to dcb 0x33cc050 fd 13, return 1
2015-10-27 14:39:09   140525934229248 [poll_waitevents] Read in dcb 0x33cc050 fd 13
2015-10-27 14:39:09   140525934229248 [gw_read_backend_event] Read dcb 0x33cc050 fd 13 protocol state 11, MYSQL_IDLE.
2015-10-27 14:39:09   140525934229248 [dcb_read] Read 11 bytes from dcb 0x33cc050 in state DCB_STATE_POLLING fd 13.
2015-10-27 14:39:09   140525934229248 [protocol_get_srv_command] Read command UNKNOWN MYSQL PACKET TYPE for fd 13.
2015-10-27 14:39:09   140525934229248 [gw_MySQLWrite_backend] write to dcb 0x33cc050 fd 13 protocol state MYSQL_IDLE.
2015-10-27 14:39:09   140525934229248 [dcb_write] Wrote 13 Bytes to dcb 0x33cc050 in state DCB_STATE_POLLING fd 13
2015-10-27 14:39:09   140525934229248 [poll_waitevents] epoll_wait found 1 fds
2015-10-27 14:39:09   140525934229248 [poll_waitevents] event 5 dcb 0x33cc050 role DCB_ROLE_REQUEST_HANDLER
2015-10-27 14:39:09   140525934229248 [gw_write_backend_event] wrote to dcb 0x33cc050 fd 13, return 1
2015-10-27 14:39:09   140525934229248 [poll_waitevents] Read in dcb 0x33cc050 fd 13
2015-10-27 14:39:09   140525934229248 [gw_read_backend_event] Read dcb 0x33cc050 fd 13 protocol state 11, MYSQL_IDLE.
2015-10-27 14:39:09   140525934229248 [dcb_read] Read 56 bytes from dcb 0x33cc050 in state DCB_STATE_POLLING fd 13.
2015-10-27 14:39:09   140525934229248 [protocol_get_srv_command] Read command UNKNOWN MYSQL PACKET TYPE for fd 13.
2015-10-27 14:39:09   140525934229248 [gw_MySQLWrite_backend] write to dcb 0x33cc050 fd 13 protocol state MYSQL_IDLE.
2015-10-27 14:39:09   140525934229248 [dcb_write] Wrote 21 Bytes to dcb 0x33cc050 in state DCB_STATE_POLLING fd 13
2015-10-27 14:39:09   140525934229248 [poll_waitevents] epoll_wait found 1 fds
2015-10-27 14:39:09   140525934229248 [poll_waitevents] event 5 dcb 0x33cc050 role DCB_ROLE_REQUEST_HANDLER
2015-10-27 14:39:09   140525934229248 [gw_write_backend_event] wrote to dcb 0x33cc050 fd 13, return 1
2015-10-27 14:39:09   140525934229248 [poll_waitevents] Read in dcb 0x33cc050 fd 13
2015-10-27 14:39:09   140525934229248 [gw_read_backend_event] Read dcb 0x33cc050 fd 13 protocol state 11, MYSQL_IDLE.
2015-10-27 14:39:09   140525934229248 [dcb_read] Read 82 bytes from dcb 0x33cc050 in state DCB_STATE_POLLING fd 13.
2015-10-27 14:39:09   140525934229248 [protocol_get_srv_command] Read command UNKNOWN MYSQL PACKET TYPE for fd 13.
2015-10-27 14:39:09   140525934229248 [gw_MySQLWrite_backend] write to dcb 0x33cc050 fd 13 protocol state MYSQL_IDLE.
2015-10-27 14:39:09   140525934229248 [dcb_write] Wrote 37 Bytes to dcb 0x33cc050 in state DCB_STATE_POLLING fd 13
2015-10-27 14:39:09   140525934229248 [poll_waitevents] epoll_wait found 1 fds
2015-10-27 14:39:09   140525934229248 [poll_waitevents] event 5 dcb 0x33cc050 role DCB_ROLE_REQUEST_HANDLER
2015-10-27 14:39:09   140525934229248 [gw_write_backend_event] wrote to dcb 0x33cc050 fd 13, return 1
2015-10-27 14:39:09   140525934229248 [poll_waitevents] Read in dcb 0x33cc050 fd 13
2015-10-27 14:39:09   140525934229248 [gw_read_backend_event] Read dcb 0x33cc050 fd 13 protocol state 11, MYSQL_IDLE.
2015-10-27 14:39:09   140525934229248 [dcb_read] Read 85 bytes from dcb 0x33cc050 in state DCB_STATE_POLLING fd 13.
2015-10-27 14:39:09   140525934229248 [protocol_get_srv_command] Read command UNKNOWN MYSQL PACKET TYPE for fd 13.
2015-10-27 14:39:09   140525934229248 [gw_MySQLWrite_backend] write to dcb 0x33cc050 fd 13 protocol state MYSQL_IDLE.
2015-10-27 14:39:09   140525934229248 [dcb_write] Wrote 22 Bytes to dcb 0x33cc050 in state DCB_STATE_POLLING fd 13
2015-10-27 14:39:09   140525934229248 [poll_waitevents] epoll_wait found 1 fds
2015-10-27 14:39:09   140525934229248 [poll_waitevents] event 5 dcb 0x33cc050 role DCB_ROLE_REQUEST_HANDLER
2015-10-27 14:39:09   140525934229248 [gw_write_backend_event] wrote to dcb 0x33cc050 fd 13, return 1
2015-10-27 14:39:09   140525934229248 [poll_waitevents] Read in dcb 0x33cc050 fd 13
2015-10-27 14:39:09   140525934229248 [gw_read_backend_event] Read dcb 0x33cc050 fd 13 protocol state 11, MYSQL_IDLE.
2015-10-27 14:39:09   140525934229248 [dcb_read] Read 107 bytes from dcb 0x33cc050 in state DCB_STATE_POLLING fd 13.
2015-10-27 14:39:09   140525934229248 [protocol_get_srv_command] Read command UNKNOWN MYSQL PACKET TYPE for fd 13.
2015-10-27 14:39:09   140525934229248 [gw_MySQLWrite_backend] write to dcb 0x33cc050 fd 13 protocol state MYSQL_IDLE.
2015-10-27 14:39:09   140525934229248 [dcb_write] Wrote 32 Bytes to dcb 0x33cc050 in state DCB_STATE_POLLING fd 13
2015-10-27 14:39:09   140525934229248 [poll_waitevents] epoll_wait found 1 fds
2015-10-27 14:39:09   140525934229248 [poll_waitevents] event 5 dcb 0x33cc050 role DCB_ROLE_REQUEST_HANDLER
2015-10-27 14:39:09   140525934229248 [gw_write_backend_event] wrote to dcb 0x33cc050 fd 13, return 1
2015-10-27 14:39:09   140525934229248 [poll_waitevents] Read in dcb 0x33cc050 fd 13
2015-10-27 14:39:09   140525934229248 [gw_read_backend_event] Read dcb 0x33cc050 fd 13 protocol state 11, MYSQL_IDLE.
2015-10-27 14:39:09   140525934229248 [dcb_read] Read 81 bytes from dcb 0x33cc050 in state DCB_STATE_POLLING fd 13.
2015-10-27 14:39:09   140525934229248 [protocol_get_srv_command] Read command UNKNOWN MYSQL PACKET TYPE for fd 13.

trace1.log:

MariaDB Corporation MaxScale    /dev/shm/maxscale.2325/trace1.log Tue Oct 27 14:39:08 2015
-----------------------------------------------------------------------
---     Logging is disabled.
2015-10-27 14:39:08   ---       Logging to file is enabled      --
2015-10-27 14:39:08   Notification service feedback is not enabled
2015-10-27 14:39:08   Binlog router: current binlog file is: mysql-bin.000001, current position 4
2015-10-27 14:39:08   Started session [1] for Binlog_Service service
2015-10-27 14:39:08   Initialise Telnetd Protocol module.
2015-10-27 14:39:08   Started session [2] for Debug Interface service
2015-10-27 14:39:08   Initialise MaxScaled Protocol module.
2015-10-27 14:39:08   Started session [3] for CLI service
2015-10-27 14:39:09   [1]  Starting log flushing to disk.



 Comments   
Comment by Geoff Montee (Inactive) [ 2015-10-28 ]

Some gdb debugging with help from Massimiliano Pinto shows that *router->service->ports is NULL during the crash.

(gdb) p *router->service
$1 = {name = 0x1d6b1e0 "Binlog_Service", state = 1, ports = 0x0, routerModule = 0x1d6b200 "binlogrouter", routerOptions = 0x1d6b4b0,
  router = 0x7ffff46d5860, router_instance = 0x1d6c2c0, version_string = 0x1d6b220 "5.5.5-10.0.20-MariaDB-enterprise-log", dbref = 0x1d6b3c0,
  credentials = {name = 0x1d6b250 "maxscale_user", authdata = 0x1d6b270 "password"}, spin = {lock = 0}, stats = {started = 1446050935, n_sessions = 1,
    n_current = 1}, users = 0x0, enable_root = 0, localhost_match_wildcard_host = 0, resources = 0x0, svc_config_param = 0x0, svc_config_version = 0,
  svc_do_shutdown = false, users_from_all = false, strip_db_esc = false, optimize_wildcard = false, users_table_spin = {lock = 0}, rate_limit = {
    nloads = 0, last = 0}, filters = 0x0, n_filters = 0, conn_timeout = 0, ssl_mode = SSL_DISABLED, weightby = 0x0, next = 0x1d69ed0, ctx = 0x0,
  method = 0x0, ssl_cert_verify_depth = 100, ssl_method_type = 6, ssl_cert = 0x0, ssl_key = 0x0, ssl_ca_cert = 0x0, ssl_init_done = false}
(gdb) p *router->service->ports
Cannot access memory at address 0x0

Comment by Geoff Montee (Inactive) [ 2015-10-28 ]

Adding a proper listener for the Binlog Router allows everything to work. e.g.:

[Binlog_Listener]
type=listener
service=Binlog_Service
protocol=MySQLClient
port=8808
address=127.0.0.1

Comment by Geoff Montee (Inactive) [ 2015-10-28 ]

Without the listener, the segmentation fault happens here:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffda1fc700 (LWP 3650)]
0x00007ffff44c7063 in blr_make_registration (router=0x1d6c2c0) at
/home/vagrant/workspace/server/modules/routing/binlog/blr_master.c:656
656     /home/vagrant/workspace/server/modules/routing/binlog/blr_master.c:
No such file or directory.
        in /home/vagrant/workspace/server/modules/routing/binlog/blr_master.c
Missing separate debuginfos, use: debuginfo-install

Comment by Massimiliano Pinto (Inactive) [ 2015-11-26 ]

A check is being added in createInstance for missing listener:

if missing this message is logged
2015-11-26 10:40:13 error : Binlog_Service: Error: No listener configured for binlogrouter. Add a listener section in config file.

and the service doesn't start:

2015-11-26 10:40:13 error : Binlog_Service: Failed to create router instance for service. Service not started.

Comment by Massimiliano Pinto (Inactive) [ 2015-11-26 ]

Fix pushed to develop branch:

https://github.com/mariadb-corporation/MaxScale/commit/dd922a1ff95215610bc3413ae1de1308db2f9ed9

Comment by Massimiliano Pinto (Inactive) [ 2015-11-26 ]

Fix in develop

https://github.com/mariadb-corporation/MaxScale/commit/dd922a1ff95215610bc3413ae1de1308db2f9ed9

Generated at Thu Feb 08 03:59:13 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.