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

Connect crashes server because of duplicate 'free()' in GetUser

Details

    Description

      The error log contains:
      free(): invalid pointer
      250305 21:05:05 [ERROR] mysqld got signal 6 ;
      stack_bottom = 0x7fa1e0094000 thread_stack 0x40000
      2025-03-05 21:05:06 0 [Note] /usr/sbin/mariadbd (initiated by: unknown): Normal shutdown
      2025-03-05 21:05:06 1 [Note] Stopping ack receiver thread

      /usr/sbin/mariadbd(my_print_stacktrace+0x2e)[0x55b300257e4e]
      /usr/sbin/mariadbd(handle_fatal_signal+0x485)[0x55b2ffd04905]
      /lib64/libpthread.so.0(+0x12d20)[0x7fa1f6797d20]
      /lib64/libc.so.6(gsignal+0x10f)[0x7fa1f5ae252f]
      /lib64/libc.so.6(abort+0x127)[0x7fa1f5ab5e65]
      /lib64/libc.so.6(+0x8f727)[0x7fa1f5b23727] ; in __libc_message () from /lib64/libc.so.6
      /lib64/libc.so.6(+0x96a2c)[0x7fa1f5b2aa2c] ; malloc_printerr () from /lib64/libc.so.6
      /lib64/libc.so.6(+0x985b4)[0x7fa1f5b2c5b4] ; in _int_free () from /lib64/libc.so.6

      /var/lib/mysql/lib64/mysql/plugin/ha_connect.so(FreeSarea+0x19)[0x7fa1e0179ec9]
      /var/lib/mysql/lib64/mysql/plugin/ha_connect.so(PlugExit+0x2c)[0x7fa1e0179f3c]
      /var/lib/mysql/lib64/mysql/plugin/ha_connect.so(user_connect::~user_connect()+0x1b0x7fa1e0147b9b]
      /var/lib/mysql/lib64/mysql/plugin/ha_connect.so(user_connect::~user_connect()+0x12)[0x7fa1e0147bb2]
      /var/lib/mysql/lib64/mysql/plugin/ha_connect.so(+0xa1311)[0x7fa1e0135311]
      /var/lib/mysql/lib64/mysql/plugin/ha_connect.so(ha_connect::open(char const*, int, unsigned int)+0x74)[0x7fa1e0138e04]

      Attachments

        Activity

          This happens if the connect is not able to allocate connect.work_size amount of memory (in this case 64M) during opening a new of the table with a user it had not used before.
          Fixed by clearing a pointer that was freed two times in this scenario

          monty Michael Widenius added a comment - This happens if the connect is not able to allocate connect.work_size amount of memory (in this case 64M) during opening a new of the table with a user it had not used before. Fixed by clearing a pointer that was freed two times in this scenario

          Pushed to 10.6 tree

          monty Michael Widenius added a comment - Pushed to 10.6 tree

          People

            monty Michael Widenius
            monty Michael Widenius
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

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