Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-16812

Semisync slave io thread segfaults at STOP-SLAVE handling

Details

    Description

      When the semisync slave is being stopped with STOP SLAVE just after the master was shut down it attempts to reconnect with the master anyway per a semisync routine.
      Instead of an expected error the io-thread segfauls like

      #0 0x0000555555ecad06 in mysql_real_connect (mysql=0x7fff9801f2f8, host=0x7fff9801cad0 "127.0.0.1", user=0x7fff9801cd28 "root", passwd=0x7fff98007d38 "", db=0x0, port=10760, unix_socket=0x0, client_flag=0) at client.c:3660
      #1 0x0000555555dfa604 in Repl_semi_sync_slave::kill_connection (this=0x55555746ef70 <repl_semisync_slave>, mysql=0x7fff9801edd8) at semisync_slave.cc:141
      #2 0x0000555555dfa50c in Repl_semi_sync_slave::slave_stop (this=0x55555746ef70 <repl_semisync_slave>, mi=0x555558253ed0) at semisync_slave.cc:120
      #3 0x0000555555b2b7ec in handle_slave_io (arg=0x555558253ed0) at slave.cc:4980
      

      at the stack head function is executing

      if (!(client_flag & CLIENT_REMEMBER_OPTIONS) &&
      !mysql->options.extension->async_context)
      mysql_close_free_options(mysql);
      

      when mysql->options.extension is NULL.

      Apparently not-NULL check for mysql->options.extension is missed and should
      be deployed to fix the issue.

      Attachments

        Issue Links

          Activity

            Elkin Andrei Elkin created issue -
            Elkin Andrei Elkin made changes -
            Field Original Value New Value
            Assignee Andrei Elkin [ elkin ]
            Elkin Andrei Elkin made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            Elkin Andrei Elkin added a comment -

            The patch is also available in bb-10.3-andrei MDEV-16812 at top commit.

            Elkin Andrei Elkin added a comment - The patch is also available in bb-10.3-andrei MDEV-16812 at top commit.
            Elkin Andrei Elkin made changes -
            Assignee Andrei Elkin [ elkin ] Oleksandr Byelkin [ sanja ]
            Status In Progress [ 3 ] In Review [ 10002 ]

            OK to push!

            sanja Oleksandr Byelkin added a comment - OK to push!
            sanja Oleksandr Byelkin made changes -
            Assignee Oleksandr Byelkin [ sanja ] Andrei Elkin [ elkin ]
            Status In Review [ 10002 ] Stalled [ 10000 ]
            Elkin Andrei Elkin added a comment -

            a97c190d95b is pushed to 10.3.

            Elkin Andrei Elkin added a comment - a97c190d95b is pushed to 10.3.
            Elkin Andrei Elkin made changes -
            Fix Version/s 10.3.9 [ 23114 ]
            Fix Version/s 10.3 [ 22126 ]
            Resolution Fixed [ 1 ]
            Status Stalled [ 10000 ] Closed [ 6 ]
            serg Sergei Golubchik made changes -
            Workflow MariaDB v3 [ 88546 ] MariaDB v4 [ 133635 ]
            alice Alice Sherepa made changes -
            mariadb-jira-automation Jira Automation (IT) made changes -
            Zendesk Related Tickets 108280

            People

              Elkin Andrei Elkin
              Elkin Andrei Elkin
              Votes:
              0 Vote for this issue
              Watchers:
              2 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.