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

Notify a router session when its endpoint is closed

    XMLWordPrintable

Details

    • Task
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 25.10
    • 26.10.0
    • Core
    • None
    • MXS-SPRINT-280

    Description

      A router session that does blocking work on thread pool threads, and keeps itself alive with a shared_ptr meanwhile, may outlive its ServiceEndpoint, but has no way of finding out that the endpoint, and with it the Session, has been closed. The use count cannot be used for the purpose, as the thread pool task holds a reference of its own. When the task then continues on the worker, e.g. to deliver a result to the client, it runs against a destroyed Session, which leads to a heap-use-after-free. A router session of that kind must therefore be told when its endpoint is closed.

      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 - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0d
                0d
                Logged:
                Time Spent - 3h
                3h

                Git Integration

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