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

main.mdev-35046 Leaks Memory

    XMLWordPrintable

Details

    • Can result in unexpected behaviour
    • Q4/2025 Server Maintenance

    Description

      The test main.mdev-35046 can result in memory leaks. A couple examples of failures:

      Failure on a ubasan builder:

      SET pseudo_slave_mode=1;
      CREATE TABLE t1 (c INT) ENGINE=InnoDB;
      CREATE TABLE t2 (c INT) ENGINE=MEMORY;
      XA START 'a';
      INSERT INTO t1 VALUES (0);
      CREATE TEMPORARY TABLE t1t (c INT) ENGINE=InnoDB;
      INSERT INTO t1t VALUES (0);
      XA END 'a';
      XA PREPARE 'a';
      OPTIMIZE TABLE t1t;
      Table	Op	Msg_type	Msg_text
      test.t1t	optimize	Error	Table 'test.t1t' doesn't exist
      test.t1t	optimize	status	Operation failed
      LOCK TABLE t2 READ;
      XA COMMIT 'a';
      # restart
      DROP TABLE t1, t2;
      line
      ==223778==ERROR: LeakSanitizer: detected memory leaks
      SUMMARY: AddressSanitizer: 9022 byte(s) leaked in 1028 allocation(s).
      251002  9:43:19 [ERROR] /home/buildbot/bld/sql/mariadbd got signal 6 ;
      Attempting backtrace. Include this in the bug report.
      ^ Found warnings in /dev/shm/normal/16/log/mysqld.1.err
      ok
      

      Failure on a regular builder:

                            main.mdev-35046                          w13 [ fail ]  Found warnings/errors in server log file!
              Test ended at 2025-10-02 10:34:36
      line
      Warning: Internal memory accounting error of 32960 bytes
      ^ Found warnings in /home/buildbot/amd64-ubuntu-2504/build/mysql-test/var/13/log/mysqld.1.err
      ok
      

      Thanks danblack for discovering!

      Attachments

        Issue Links

          Activity

            People

              Gosselin Dave Gosselin
              bnestere Brandon Nesterenko
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:

                Git Integration

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