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

LP #1612118: Two DBUG +O commands in a row leak the first output file handle

    Details

    • Type: Bug
    • Status: Done
    • Priority: Low
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None

      Description

      **Reported in Launchpad by Laurynas Biveinis last update 17-08-2016 07:17:34

      SET SESSION debug= '+O,../../log/bug46165.5.trace';
      SET SESSION debug= '+O,../../log/bug46165.6.trace';
      SET SESSION debug= '-O';

      results in unclosed bug46165.5.trace.

      This also shows up as a Valgrind error on main.variables_debug on 5.5 trunk:

      main.variables_debug w3 [ pass ] 563
      worker[3] Valgrind report from /home/laurynas/obj-percona-5.5-valgrind/mysql-test/var/3/log/mysqld.1.err after tests:
      main.variables_debug
      --------------------------------------------------------------------------
      HEAP SUMMARY:
      in use at exit: 30,644,184 bytes in 209 blocks
      total heap usage: 66,915 allocs, 66,706 frees, 87,992,076 bytes allocated

      552 bytes in 1 blocks are still reachable in loss record 107 of 128
      at 0x4C2DB8F: malloc (vg_replace_malloc.c:299)
      by 0x666BC8C: __fopen_internal (iofopen.c:69)
      by 0xAC4619: DBUGOpenFile (dbug.c:1904)
      by 0xAC65AE: DbugParse (dbug.c:607)
      by 0xAC68B7: db_set (dbug.c:800)
      by 0x67FB08: Sys_var_dbug::session_update(THD*, set_var*) (sys_vars.h:609)
      by 0x51E2BE: sys_var::update(THD*, set_var*) (set_var.cc:204)
      by 0x51E658: set_var::update(THD*) (set_var.cc:677)
      by 0x51EF92: sql_set_variables(THD*, List<set_var_base>*) (set_var.cc:577)
      by 0x5A035E: mysql_execute_command(THD*) (sql_parse.cc:3447)
      by 0x5A4B6F: mysql_parse(THD*, char*, unsigned int, Parser_state*) (sql_parse.cc:6060)
      by 0x5A63AC: dispatch_command(enum_server_command, THD*, char*, unsigned int) (sql_parse.cc:1075)
      by 0x5A8158: do_command(THD*) (sql_parse.cc:789)
      by 0x661DF2: do_handle_one_connection(THD*) (sql_connect.cc:1418)
      by 0x661EEF: handle_one_connection (sql_connect.cc:1325)
      by 0x83F867: pfs_spawn_thread (pfs.cc:1015)

      LEAK SUMMARY:
      definitely lost: 0 bytes in 0 blocks
      indirectly lost: 0 bytes in 0 blocks
      possibly lost: 0 bytes in 0 blocks
      still reachable: 552 bytes in 1 blocks
      suppressed: 30,643,632 bytes in 208 blocks

        Smart Checklist

          Attachments

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                lpjirasync lpjirasync (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: