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

OdbcRouterSession is destroyed on a thread pool thread if the worker has stopped

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 26.10.0
    • 26.10.1
    • Core
    • None
    • MXS-SPRINT-281, MXS-SPRINT-282
    • Not for ES Release Notes
    • Hide
      If MaxScale was shut down while a client query was still running in an ODBC-based router (ExasolRouter or GridGain router), the router session could be destroyed on a thread other than its worker thread. A debug build would abort on an assertion. MaxScale now logs a warning and completes the shutdown normally.
      Show
      If MaxScale was shut down while a client query was still running in an ODBC-based router (ExasolRouter or GridGain router), the router session could be destroyed on a thread other than its worker thread. A debug build would abort on an assertion. MaxScale now logs a warning and completes the shutdown normally.

    Description

      If MaxScale is shut down while an ODBC call is in flight in a session that has already been closed, call_t() cannot hand its shared_ptr back to the session's worker, because the worker no longer accepts messages. The failed post deletes the task in the thread pool thread, which then destroys the session there. A debug build aborts on the assertion in Worker::Callable::~Callable() (worker.cc:335); a release build runs the destructor in the wrong thread. t_return() has the same problem. Found by the intermittent failure of exasolrouter_test. Possible fixes: cancel the ODBC calls and drain the thread pool before the workers are stopped, or make a failed post safe.

      Attachments

        Activity

          People

            johan.wikman Johan Wikman
            johan.wikman Johan Wikman
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 1d
                1d
                Remaining:
                Remaining Estimate - 0d
                0d
                Logged:
                Time Spent - 0.75d Time Not Required
                0.75d

                Git Integration

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