Uploaded image for project: 'MariaDB MaxScale'
  1. MariaDB MaxScale
  2. MXS-2324

Maxscale disconnect after commit without begin from Icinga2

    XMLWordPrintable

Details

    • MXS-SPRINT-77, MXS-SPRINT-78, MXS-SPRINT-79

    Description

      Icinga2 sometimes send a commit without a bagin.

      This is caused from this codepart of icinga2

      void IdoMysqlConnection::InternalNewTransaction()
      {
      	AssertOnWorkQueue();
       
      	if (!GetConnected())
      		return;
       
      	AsyncQuery("COMMIT");
      	AsyncQuery("BEGIN");
      }
      

      2019-02-06 10:37:42 info : (26) > Autocommit: [enabled], trx is [not open], cmd: (0x03) COM_QUERY, plen: 17, type: QUERY_TYPE_COMMIT, stmt: COMMIT;BEGIN
      2019-02-06 10:37:42 info : (26) Route query to master: -server [192.168.53.12]:3306 <
      2019-02-06 10:37:42 info : (26) Reply complete, last reply from server
      2019-02-06 10:37:42 info : (26) Non-space data found after semi-colon: 'BEGIN'.
      2019-02-06 10:37:42 info : (26) Multi-statement query or stored procedure call, routing all future queries to master.
      

      Leads to crash

      2019-02-06 10:37:46 info : (26) Non-space data found after semi-colon: 'BEGIN'.
      2019-02-06 10:37:46 info : (26) Storing query (len: 17 cmd: 3), expecting 1 replies to current command
      2019-02-06 10:40:11 info : (7) Started maxadmin-service client session [30] for 'root' from localhost
      2019-02-06 10:40:11 info : (30) MaxAdmin: list servers
      2019-02-06 10:40:11 info : Stopped maxadmin-service client session [30]
      2019-02-06 10:40:15 info : (7) Started maxadmin-service client session [31] for 'root' from localhost
      2019-02-06 10:40:15 info : (31) MaxAdmin: show monitors
      2019-02-06 10:40:15 info : Stopped maxadmin-service client session [31]
      2019-02-06 10:40:23 info : (7) Started maxadmin-service client session [32] for 'root' from localhost
      2019-02-06 10:40:23 info : (32) MaxAdmin: list services
      2019-02-06 10:40:23 info : Stopped maxadmin-service client session [32]
      [...]
      2019-02-06 10:41:06 info : Stopped maxadmin-service client session [40]
      2019-02-06 10:41:16 info : Worker 0x56243959e8b0 received shutdown message.
      2019-02-06 10:41:16 info : Worker 0x5624395a4bd0 received shutdown message.
      2019-02-06 10:41:16 info : Worker 0x56243959f730 received shutdown message.
      2019-02-06 10:41:16 info : Worker 0x5624395a14d0 received shutdown message.
      2019-02-06 10:41:16 info : Worker 0x5624395a6e30 received shutdown message.
      2019-02-06 10:41:16 info : Worker 0x5624395a1bb0 received shutdown message.
      2019-02-06 10:41:16 info : Worker 0x5624395a6070 received shutdown message.
      2019-02-06 10:41:16 info : Worker 0x5624395a14d0 has shut down.
      2019-02-06 10:41:16 info : Worker 0x5624395a44f0 received shutdown message.
      2019-02-06 10:41:16 info : Worker 0x5624395a3730 received shutdown message.
      2019-02-06 10:41:16 info : Worker 0x5624395a5990 received shutdown message.
      2019-02-06 10:41:16 info : Worker 0x5624395a0120 received shutdown message.
      2019-02-06 10:41:16 info : Worker 0x5624395a0df0 received shutdown message.
      [....]
       
      019-02-06 10:41:16 notice : Housekeeper shutting down.
      2019-02-06 10:41:16 notice : Housekeeper has shut down.
      2019-02-06 10:41:16 info : Waiting for worker 0x56243959e8b0.
      2019-02-06 10:41:16 info : Waited for worker 0x56243959e8b0.
      2019-02-06 10:41:16 info : Waiting for worker 0x56243959f730.
      2019-02-06 10:41:16 info : Waited for worker 0x56243959f730.
      2019-02-06 10:41:16 info : Waiting for worker 0x56243959fb70.
      2019-02-06 10:41:16 info : Waited for worker 0x56243959fb70.
      2019-02-06 10:41:16 info : Waiting for worker 0x5624395a0120.
      2019-02-06 10:41:16 info : Waited for worker 0x5624395a0120.
      2019-02-06 10:41:16 info : Waiting for worker 0x5624395a0780.
      2019-02-06 10:41:16 info : Waited for worker 0x5624395a0780.
      2019-02-06 10:41:16 info : Waiting for worker 0x5624395a0df0.
      [....]
      2019-02-06 10:41:16 notice : All workers have shut down.
      2019-02-06 10:41:16 info : Stopped readwrite-splitter-service client session [1]
      2019-02-06 10:41:16 info : Stopped readwrite-splitter-service client session [2]
      2019-02-06 10:41:16 info : Stopped readwrite-splitter-service client session [3]
      2019-02-06 10:41:16 info : Stopped readwrite-splitter-service client session [4]
      2019-02-06 10:41:16 info : Stopped readwrite-splitter-service client session [5]
      2019-02-06 10:41:16 info : Stopped readwrite-splitter-service client session [6]
      2019-02-06 10:41:16 info : Stopped maxadmin-service client session [7]
      2019-02-06 10:41:16 notice : MaxScale received signal SIGTERM. Exiting.
      2019-02-06 10:41:16 notice : MaxScale is shutting down.
      2019-02-06 10:41:16 notice : MaxScale shutdown completed.
      2019-02-06 10:41:16 MariaDB MaxScale is shut down.
      

      Sometimes it can reproduced with

      mysqlslap --user=maxscale --password=xxxxx --host=127.0.0.1 --port=4006 --concurrency=50 --iterations=1000 --create-schema=test --query="commit;insert into test.t1 (a) values('test');select * from test.t1 limit 2;begin;insert into test.t1 (a) values('test');commit;begin;"
      

      Works fine with Maxscale 2.2

      Attachments

        Activity

          People

            markus makela markus makela
            Richard Richard Stracke
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.