Uploaded image for project: 'Percona Server for MySQL'
  1. Percona Server for MySQL
  2. PS-7746

Possible double call to `free_share()` in ha_innobase::open()

Details

    • Bug
    • Status: Done
    • Medium
    • Resolution: Fixed
    • 5.7.34-37 (Q2 2021), 8.0.25-15 (Q2 2021)
    • None
    • None

    Description

      Found this issue while merging PS-5.7.34 to PXC.

      There is a chance that we may call `free_share()` twice in this code https://github.com/percona/percona-server/blob/release-5.7.34-37/storage/innobase/handler/ha_innodb.cc#L7059-L7068

      The first call came as part of the https://github.com/percona/percona-server/commit/55f8e5ea08 and the second call existed in PS from a long time.

      Even though `free_share()` internally uses reference counting, calling it twice is not desirable and may cause undefined behavior. This needs to be investigated.

      Attachments

        Activity

          People

            luis.donoso Luis Donoso (Inactive)
            venkatesh.prasad Venkatesh Prasad
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 7 hours
                7h

                Smart Checklist