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

enabling debug=d,debug_filesort causes ASSERT failure

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Minor
    • Resolution: Unresolved
    • 10.6.15, 11.3.0
    • 10.6
    • Configuration
    • None

    Description

      enabling debug=d,debug_filesort causes assert failure

      #0  __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at ./nptl/pthread_kill.c:44
      #1  0x00007ffff79cad2f in __pthread_kill_internal (signo=6, threadid=<optimized out>) at ./nptl/pthread_kill.c:78
      #2  0x00007ffff797bef2 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
      #3  0x00007ffff7966472 in __GI_abort () at ./stdlib/abort.c:79
      #4  0x00007ffff7966395 in __assert_fail_base (fmt=<optimized out>, assertion=<optimized out>, file=<optimized out>, line=<optimized out>, function=<optimized out>)
          at ./assert/assert.c:92
      #5  0x00007ffff7974df2 in __GI___assert_fail (assertion=0x5555570dba3d "marked_for_read()", file=0x5555570db3e0 "/home/rex/src/mariadb/server.11.3.MDEV-31431/sql/field.cc", 
          line=4497, function=0x5555570dcaa8 "virtual String* Field_long::val_str(String*, String*)") at ./assert/assert.c:101
      #6  0x00005555563849cd in Field_long::val_str (this=0x7fff90080b60, val_buffer=0x7fffe0106280, val_ptr=0x7fffe0106280)
          at /home/rex/src/mariadb/server.11.3.MDEV-31431/sql/field.cc:4497
      #7  0x0000555555e581ad in Field::val_str (this=0x7fff90080b60, str=0x7fffe0106280) at /home/rex/src/mariadb/server.11.3.MDEV-31431/sql/field.h:1038
      #8  0x00005555563ae969 in dbug_print_record (table=0x7fff9007fa20, print_rowid=true) at /home/rex/src/mariadb/server.11.3.MDEV-31431/sql/filesort.cc:815
      #9  0x00005555563af167 in find_all_keys (thd=0x7fff90000dc8, param=0x7fffe0106970, select=0x7fff90089f48, fs_info=0x7fff900814a0, buffpek_pointers=0x7fffe0106ba0, 
          tempfile=0x7fffe0106a30, pq=0x0, found_rows=0x7fff90081690) at /home/rex/src/mariadb/server.11.3.MDEV-31431/sql/filesort.cc:971
      #10 0x00005555563ad06f in filesort (thd=0x7fff90000dc8, table=0x7fff9007fa20, filesort=0x7fff9008a150, tracker=0x7fff9008a198, join=0x7fff90083598, first_table_bit=1)
          at /home/rex/src/mariadb/server.11.3.MDEV-31431/sql/filesort.cc:408
      #11 0x0000555556060a53 in create_sort_index (thd=0x7fff90000dc8, join=0x7fff90083598, tab=0x7fff900a9a30, fsort=0x7fff9008a150)
          at /home/rex/src/mariadb/server.11.3.MDEV-31431/sql/sql_select.cc:26837
      #12 0x000055555605a8a8 in st_join_table::sort_table (this=0x7fff900a9a30) at /home/rex/src/mariadb/server.11.3.MDEV-31431/sql/sql_select.cc:24479
      #13 0x000055555605a42a in join_init_read_record (tab=0x7fff900a9a30) at /home/rex/src/mariadb/server.11.3.MDEV-31431/sql/sql_select.cc:24399
      #14 0x0000555556057eea in sub_select (join=0x7fff90083598, join_tab=0x7fff900a9a30, end_of_records=false) at /home/rex/src/mariadb/server.11.3.MDEV-31431/sql/sql_select.cc:23435
      #15 0x0000555556057047 in do_select (join=0x7fff90083598, procedure=0x0) at /home/rex/src/mariadb/server.11.3.MDEV-31431/sql/sql_select.cc:22955
      #16 0x00005555560232f5 in JOIN::exec_inner (this=0x7fff90083598) at /home/rex/src/mariadb/server.11.3.MDEV-31431/sql/sql_select.cc:4935
      #17 0x00005555560222bb in JOIN::exec (this=0x7fff90083598) at /home/rex/src/mariadb/server.11.3.MDEV-31431/sql/sql_select.cc:4712
      #18 0x0000555556023d76 in mysql_select (thd=0x7fff90000dc8, tables=0x7fff90005328, fields=..., conds=0x0, og_num=1, order=0x7fff90019338, group=0x0, having=0x0, proc_param=0x0, 
      <SNIP>
      

      #6  0x00005555563849cd in Field_long::val_str (this=0x7fff90080b60, val_buffer=0x7fffe0106280, val_ptr=0x7fffe0106280)
          at /home/rex/src/mariadb/server.11.3.MDEV-31431/sql/field.cc:4497
      4497	  DBUG_ASSERT(marked_for_read());
      

      solution ?

      // Column marked for read or the field set to read out of record[0]
      inline bool Field::marked_for_read() const
      {
        DBUG_EXECUTE_IF("debug_filesort", return 1;);
        return !table ||
               (!table->read_set ||
                bitmap_is_set(table->read_set, field_index) ||
                (!(ptr >= table->record[0] &&
                   ptr < table->record[0] + table->s->reclength)));
      }
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            Johnston Rex Johnston
            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.