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

Assertion `thd' failed in int temp_file_size_cb_func(tmp_file_tracking*, int)

    XMLWordPrintable

Details

    Description

      Replay using CLI. Could not reproduce the issue using MTR

      SET aria_repair_threads=2;
      CREATE TABLE t (a CHAR(255),b INT,INDEX (b));
      INSERT INTO t SELECT SEQ,SEQ FROM seq_1_to_100000;
      SELECT * FROM t UNION SELECT * FROM t;
      

      Leads to:

      11.5.0 8f0c9340537b84fcd7012d4a31e6f858e7eb919c (Debug)

      mariadbd: /test/server_dbg/sql/mysqld.cc:3763: int temp_file_size_cb_func(tmp_file_tracking*, int): Assertion `thd' failed.
      

      11.5.0 8f0c9340537b84fcd7012d4a31e6f858e7eb919c (Debug)

      Core was generated by `/test/MD200324-mariadb-11.5.0-linux-x86_64-dbg/bin/mariadbd --no-defaults --max'.
      Program terminated with signal SIGABRT, Aborted.
      #0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
      [Current thread is 1 (Thread 0x147434072700 (LWP 2796928))]
      (gdb) bt
      #0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
      #1  0x0000147436246859 in __GI_abort () at abort.c:79
      #2  0x0000147436246729 in __assert_fail_base (fmt=0x1474363dc588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x5576587dba25 "thd", file=0x5576585ea178 "/test/server_dbg/sql/mysqld.cc", line=3763, function=<optimized out>) at assert.c:92
      #3  0x0000147436257fd6 in __GI___assert_fail (assertion=assertion@entry=0x5576587dba25 "thd", file=file@entry=0x5576585ea178 "/test/server_dbg/sql/mysqld.cc", line=line@entry=3763, function=function@entry=0x5576585ea7b0 "int temp_file_size_cb_func(tmp_file_tracking*, int)") at assert.c:101
      #4  0x00005576577e1a1d in temp_file_size_cb_func (track=0x1473e5195778, no_error=1) at /test/server_dbg/sql/mysqld.cc:3763
      #5  0x000055765840990f in tmp_file_track (file_size=<optimized out>, info=0x1473e5195670) at /test/server_dbg/mysys/mf_iocache.c:86
      #6  _my_b_cache_write (info=0x1473e5195670, Buffer=0x1473dc8e25a8 "\017", Count=524288) at /test/server_dbg/mysys/mf_iocache.c:1596
      #7  0x000055765840b830 in my_b_flush_io_cache (info=info@entry=0x1473e5195670, need_append_buffer_lock=<optimized out>, need_append_buffer_lock@entry=1) at /test/server_dbg/mysys/mf_iocache.c:1802
      #8  0x000055765840c1f4 in _my_b_write (info=info@entry=0x1473e5195670, Buffer=0x147434071bbf "", Buffer@entry=0x147434071bbe "\023", Count=1, Count@entry=2) at /test/server_dbg/mysys/mf_iocache.c:629
      #9  0x0000557657f0eff4 in my_b_write (Count=2, Buffer=0x147434071bbe "\023", info=0x1473e5195670) at /test/server_dbg/include/my_sys.h:550
      #10 my_var_write (bufs=0x1473dc8ae0b5 "\001\005\063\062\065\070\070\001", to_file=0x1473e5195670, info=0x1473e51954e8) at /test/server_dbg/storage/maria/ma_sort.c:781
      #11 write_keys_varlen (info=info@entry=0x1473e51954e8, sort_keys=0x1473dc031da0, sort_keys@entry=0x1473dc000d48, count=count@entry=33376, buffpek=<optimized out>, tempfile=tempfile@entry=0x1473e5195670) at /test/server_dbg/storage/maria/ma_sort.c:812
      #12 0x0000557657f10131 in _ma_thr_find_all_keys_exec (sort_param=0x1473e51954e8) at /test/server_dbg/storage/maria/ma_sort.c:503
      #13 _ma_thr_find_all_keys (arg=0x1473e51954e8) at /test/server_dbg/storage/maria/ma_sort.c:546
      #14 0x0000147436757609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #15 0x0000147436343133 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      Bug confirmed present in:
      MariaDB: 11.5.0 (dbg)

      Bug (or feature/syntax) confirmed not present in:
      MariaDB: 10.4.34 (opt), 10.5.25 (dbg), 10.5.25 (opt), 10.6.18 (dbg), 10.6.18 (opt), 10.11.8 (dbg), 10.11.8 (opt), 11.0.6 (dbg), 11.0.6 (opt), 11.1.4 (dbg), 11.1.4 (opt), 11.2.4 (dbg), 11.2.4 (opt), 11.3.2 (dbg), 11.3.2 (opt), 11.4.2 (dbg), 11.4.2 (opt), 11.5.0 (opt)

      Attachments

        Issue Links

          Activity

            People

              monty Michael Widenius
              ramesh Ramesh Sivaraman
              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.