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

LP:612600 - Lost memory reported in valgrind in os_aio_simulated_handle

    Details

    • Type: Bug
    • Status: Closed
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:

      Description

      When running the test innodb_plugin.innodb-use-sys-malloc (not support test), xtradb doesn't properly free memory when test is aborted.

      How to repeat:

      mysql-test-run --valgrind innodb_plugin.innodb-use-sys-malloc

      Error output:

      innodb_plugin.innodb_mysql w3 [ skipped ] Test requires: 'true'
      ***Warnings generated in error logs during shutdown after running tests: innodb_plugin.innodb-use-sys-malloc

      ==8801== 1,310,720 bytes in 3 blocks are still reachable in loss record 7 of 7
      ==8801== at 0x4C259AE: malloc (vg_replace_malloc.c:207)
      ==8801== by 0xA056A2: ut_malloc_low (ut0mem.c:106)
      ==8801== by 0x9B8896: os_aio_simulated_handle (os0file.c:4191)
      ==8801== by 0xA3F027: fil_aio_wait (fil0fil.c:4892)
      ==8801== by 0x9F07B7: io_handler_thread (srv0start.c:492)
      ==8801== by 0x504906F: start_thread (in /lib64/libpthread-2.9.so)
      ==8801== by 0x5FFE11C: clone (in /lib64/libc-2.9.so)

      This affects MariaDB 5.1. MySQL 5.1 doesn't have this issue

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            christofferhall Christoffer Hall added a comment -

            It seems the os_aio_thread_buffer for read/write combining gets allocated on the fly but never deallocated at the end. This simple patch fixes it.

            Free buffers in os_aio_thread_buffer at cleanup
            LPexportBug612600_case612600.patch

            Show
            christofferhall Christoffer Hall added a comment - It seems the os_aio_thread_buffer for read/write combining gets allocated on the fly but never deallocated at the end. This simple patch fixes it. Free buffers in os_aio_thread_buffer at cleanup LPexportBug612600_case612600.patch
            Hide
            christofferhall Christoffer Hall added a comment -

            Re: Lost memory reported in valgrind in os_aio_simulated_handle
            It seems the os_aio_thread_buffer for read/write combining gets allocated on the fly but never deallocated at the end. This simple patch fixes it.

            Show
            christofferhall Christoffer Hall added a comment - Re: Lost memory reported in valgrind in os_aio_simulated_handle It seems the os_aio_thread_buffer for read/write combining gets allocated on the fly but never deallocated at the end. This simple patch fixes it.
            Hide
            christofferhall Christoffer Hall added a comment -

            Re: Lost memory reported in valgrind in os_aio_simulated_handle
            Verified that it works on percona-xtradb

            Show
            christofferhall Christoffer Hall added a comment - Re: Lost memory reported in valgrind in os_aio_simulated_handle Verified that it works on percona-xtradb
            Hide
            ratzpo Rasmus Johansson added a comment -

            Launchpad bug id: 612600

            Show
            ratzpo Rasmus Johansson added a comment - Launchpad bug id: 612600

              People

              • Assignee:
                Unassigned
                Reporter:
                monty Michael Widenius
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: