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

Assertion `max_doc_id > 0' failed in storage/innobase/fts/fts0fts.cc

    XMLWordPrintable

    Details

      Description

      Stack trace is

      (gdb) where
      #0  __pthread_kill (threadid=<optimized out>, signo=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
      #1  0x0000559f2974c742 in my_write_core (sig=6) at /data/Server/bb-10.6-MDEV-14180/mysys/stacktrace.c:424
      #2  0x0000559f284b114f in handle_fatal_signal (sig=6) at /data/Server/bb-10.6-MDEV-14180/sql/signal_handler.cc:344
      #3  <signal handler called>
      #4  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
      #5  0x00007f0bd4697859 in __GI_abort () at abort.c:79
      #6  0x00007f0bd4697729 in __assert_fail_base (fmt=0x7f0bd482d588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", 
          assertion=0x559f2a76ffe0 "max_doc_id > 0", file=0x559f2a76b820 "/data/Server/bb-10.6-MDEV-14180/storage/innobase/fts/fts0fts.cc", 
          line=4780, function=<optimized out>) at assert.c:92
      #7  0x00007f0bd46a8f36 in __GI___assert_fail (assertion=0x559f2a76ffe0 "max_doc_id > 0", 
          file=0x559f2a76b820 "/data/Server/bb-10.6-MDEV-14180/storage/innobase/fts/fts0fts.cc", line=4780, 
          function=0x559f2a770020 "doc_id_t fts_init_doc_id(const dict_table_t*)") at assert.c:101
      #8  0x0000559f295054a6 in c (table=0x618000262908)
          at /data/Server/bb-10.6-MDEV-14180/storage/innobase/fts/fts0fts.cc:4780
      #9  0x0000559f294f7bb8 in fts_get_next_doc_id (table=0x618000262908, doc_id=0x7f0ba4cbbfb0)
          at /data/Server/bb-10.6-MDEV-14180/storage/innobase/fts/fts0fts.cc:2516
      #10 0x0000559f29140752 in row_mysql_convert_row_to_innobase (row=0x621000096b18, prebuilt=0x621000096188, 
          mysql_rec=0x61a0002d78b8 "\322S\n", blob_heap=0x7f0ba4cbc0f0)
          at /data/Server/bb-10.6-MDEV-14180/storage/innobase/row/row0mysql.cc:621
      #11 0x0000559f29145296 in row_insert_for_mysql (mysql_rec=0x61a0002d78b8 "\322S\n", prebuilt=0x621000096188, ins_mode=ROW_INS_NORMAL)
          at /data/Server/bb-10.6-MDEV-14180/storage/innobase/row/row0mysql.cc:1321
      #12 0x0000559f28dcfabd in ha_innobase::write_row (this=0x61d0008d72b8, record=0x61a0002d78b8 "\322S\n")
          at /data/Server/bb-10.6-MDEV-14180/storage/innobase/handler/ha_innodb.cc:7667
      #13 0x0000559f284e21b0 in handler::ha_write_row (this=0x61d0008d72b8, buf=0x61a0002d78b8 "\322S\n")
          at /data/Server/bb-10.6-MDEV-14180/sql/handler.cc:7240
      #14 0x0000559f27c6c15b in write_record (thd=0x62b000150218, table=0x6190004f4798, info=0x7f0ba4cbce60, sink=0x0)
          at /data/Server/bb-10.6-MDEV-14180/sql/sql_insert.cc:2113
      #15 0x0000559f27c64a53 in mysql_insert (thd=0x62b000150218, table_list=0x62b0001574d0, fields=..., values_list=..., update_fields=..., 
          update_values=..., duplic=DUP_ERROR, ignore=false, result=0x0) at /data/Server/bb-10.6-MDEV-14180/sql/sql_insert.cc:1104
      #16 0x0000559f27d2148b in mysql_execute_command (thd=0x62b000150218) at /data/Server/bb-10.6-MDEV-14180/sql/sql_parse.cc:4556
      #17 0x0000559f27d387fd in mysql_parse (thd=0x62b000150218, 
          rawbuf=0x62b000157238 "INSERT INTO t1 (col1,col2, col_int, col_string, col_text) VALUES ( 2643, 2643 - 1, 2643, REPEAT(SUBSTR(CAST( --Type <RET> for more, q to quit, c to continue without paging--
      2643 AS CHAR),1,1), 10), REPEAT(SUBSTR(CAST( 2643 AS CHAR),1,1), @fill_amount) ) /* E_R Thr"..., length=225, 
          parser_state=0x7f0ba4cbdb20) at /data/Server/bb-10.6-MDEV-14180/sql/sql_parse.cc:8016
      #18 0x0000559f27d10b40 in dispatch_command (command=COM_QUERY, thd=0x62b000150218, 
          packet=0x629000c3f219 " INSERT INTO t1 (col1,col2, col_int, col_string, col_text) VALUES ( 2643, 2643 - 1, 2643, REPEAT(SUBSTR(CAST( 2643 AS CHAR),1,1), 10), REPEAT(SUBSTR(CAST( 2643 AS CHAR),1,1), @fill_amount) ) /* E_R Th"..., packet_length=227, blocking=true)
          at /data/Server/bb-10.6-MDEV-14180/sql/sql_parse.cc:1897
      #19 0x0000559f27d0df21 in do_command (thd=0x62b000150218, blocking=true) at /data/Server/bb-10.6-MDEV-14180/sql/sql_parse.cc:1406
      #20 0x0000559f28109de4 in do_handle_one_connection (connect=0x6080000033b8, put_in_cache=true)
          at /data/Server/bb-10.6-MDEV-14180/sql/sql_connect.cc:1410
      #21 0x0000559f28109746 in handle_one_connection (arg=0x6080000033b8) at /data/Server/bb-10.6-MDEV-14180/sql/sql_connect.cc:1312
      #22 0x00007f0bd4bc0609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #23 0x00007f0bd4794293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      From the error log looks like InnoDB encountered lock wait issue:

      2021-06-11 16:10:34 19 [ERROR] InnoDB: (Lock wait timeout) while getting next doc id for table `test`.`t1`
      

      All concurrent threads are waiting for MDL on the table. There is no other thread does work on table inside InnoDB. Basically failure happened in fts_cmp_set_sync_doc_id()

      Core dump is present in

      sdp:/data/Results/1623436157/TBR-1123
      gdb -c ./dev/shm/vardir/1623436157/28/1/data/core /data/Server_bin/bb-10.6-MDEV-14180_asan/bin/mysqld
      

        Attachments

          Activity

            People

            Assignee:
            thiru Thirunarayanan Balathandayuthapani
            Reporter:
            thiru Thirunarayanan Balathandayuthapani
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:

                Git Integration