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

SIGSEGV in srw_lock_impl<true>::wr_lock and PolicyMutex<TTASEventMutex<GenericPolicy> >::pfs_begin_lock

    XMLWordPrintable

Details

    Description

      I am creating this ticket as separate from MDEV-27857 as this issue seems to be InnoDB specific and otherwise unrelated.

      --source include/have_innodb.inc
      SET sql_mode='';
      SET enforce_storage_engine=InnoDB;
      SET GLOBAL tx_read_only=1;
      SET GLOBAL general_log='ON';
      ALTER TABLE mysql.general_log ENGINE=MyISAM;
      SHOW WARNINGS;
      SET GLOBAL init_slave='SELECT 1';
      SET GLOBAL log_output="FILE,TABLE";
      CHANGE MASTER TO master_host='127.0.0.1';
      START SLAVE SQL_THREAD;
      

      Leads to:

      11.5.0 eeba940311ed17d160023280783fd2bbb64abef3 (Optimized)

      Core was generated by `/test/MD190224-mariadb-11.5.0-linux-x86_64-opt/bin/mariadbd --no-defaults --max'.
      Program terminated with signal SIGSEGV, Segmentation fault.
      #0  srw_lock_impl<true>::wr_lock (line=1392, 
          file=0x55af42c21240 "/test/11.5_opt/storage/innobase/trx/trx0undo.cc", 
          this=0x8) at /test/11.5_opt/storage/innobase/include/srw_lock.h:521
      [Current thread is 1 (LWP 713898)]
      (gdb) bt
      #0  srw_lock_impl<true>::wr_lock (line=1392, file=0x55af42c21240 "/test/11.5_opt/storage/innobase/trx/trx0undo.cc", this=0x8) at /test/11.5_opt/storage/innobase/include/srw_lock.h:521
      #1  trx_undo_assign_low<false> (trx=trx@entry=0x14f977d59b80, rseg=rseg@entry=0x0, undo=undo@entry=0x14f977d5a4c8, mtr=mtr@entry=0x14f96cef9350, err=err@entry=0x14f96cef9304) at /test/11.5_opt/storage/innobase/trx/trx0undo.cc:1392
      #2  0x000055af426f20bc in trx_undo_report_row_operation (thr=thr@entry=0x14f94c021a28, index=index@entry=0x14f94c0303d0, clust_entry=clust_entry@entry=0x14f94c02ff30, update=update@entry=0x0, cmpl_info=cmpl_info@entry=0, rec=rec@entry=0x0, offsets=0x0, roll_ptr=0x14f96cefa3e0) at /test/11.5_opt/storage/innobase/trx/trx0rec.cc:1897
      #3  0x000055af4272c305 in btr_cur_ins_lock_and_undo (inherit=0x14f96cefa3c7, mtr=0x14f96cefaa80, thr=0x14f94c021a28, entry=0x14f94c02ff30, cursor=0x14f96cefa4f0, flags=0) at /test/11.5_opt/storage/innobase/btr/btr0cur.cc:2139
      #4  btr_cur_optimistic_insert (flags=0, cursor=0x14f96cefa4f0, offsets=offsets@entry=0x14f96cefa4d8, heap=heap@entry=0x14f96cefa4d0, entry=entry@entry=0x14f94c02ff30, rec=rec@entry=0x14f96cefa4e8, big_rec=0x14f96cefa4c8, n_ext=<optimized out>, thr=0x14f94c021a28, mtr=0x14f96cefaa80) at /test/11.5_opt/storage/innobase/btr/btr0cur.cc:2363
      #5  0x000055af426a21df in row_ins_clust_index_entry_low (flags=<optimized out>, mode=<optimized out>, index=0x14f94c0303d0, n_uniq=<optimized out>, entry=0x14f94c02ff30, n_ext=<optimized out>, thr=<optimized out>) at /test/11.5_opt/storage/innobase/row/row0ins.cc:2868
      #6  0x000055af426a6e89 in row_ins_clust_index_entry (index=0x14f94c0303d0, entry=entry@entry=0x14f94c02ff30, thr=thr@entry=0x14f94c021a28, n_ext=n_ext@entry=0) at /test/11.5_opt/storage/innobase/row/row0ins.cc:3252
      #7  0x000055af426a754c in row_ins_index_entry (thr=0x14f94c021a28, entry=<optimized out>, index=<optimized out>) at /test/11.5_opt/storage/innobase/row/row0ins.cc:3384
      #8  row_ins_index_entry_step (thr=0x14f94c021a28, node=0x14f94c0216c0) at /test/11.5_opt/storage/innobase/row/row0ins.cc:3552
      #9  row_ins (thr=0x14f94c021a28, node=0x14f94c0216c0) at /test/11.5_opt/storage/innobase/row/row0ins.cc:3669
      #10 row_ins_step (thr=thr@entry=0x14f94c021a28) at /test/11.5_opt/storage/innobase/row/row0ins.cc:3798
      #11 0x000055af426b96ff in row_insert_for_mysql (mysql_rec=<optimized out>, prebuilt=0x14f94c021140, ins_mode=ROW_INS_NORMAL) at /test/11.5_opt/storage/innobase/row/row0mysql.cc:1314
      #12 0x000055af426051db in ha_innobase::write_row (this=0x14f94c02b280, record=0x14f94c02ae70 "e\347\271\067\016\001\322\b") at /test/11.5_opt/storage/innobase/handler/ha_innodb.cc:7825
      #13 0x000055af422f5278 in handler::ha_write_row (this=0x14f94c02b280, buf=0x14f94c02ae70 "e\347\271\067\016\001\322\b") at /test/11.5_opt/sql/handler.cc:7873
      #14 0x000055af42405b56 in Log_to_csv_event_handler::log_general (this=<optimized out>, thd=0x14f9400015a8, event_time=<optimized out>, user_host=0x14f96cefc100 "[] @  []", user_host_len=8, thread_id_arg=5, command_type=0x55af42a32977 "Query", command_type_len=5, sql_text=0x14f94000d380 "SELECT 1", sql_text_len=8, client_cs=0x55af43325b40 <my_charset_latin1>) at /test/11.5_opt/sql/log.cc:774
      #15 0x000055af424080f5 in LOGGER::general_log_write (this=0x55af433fbf80 <logger>, thd=0x14f9400015a8, command=<optimized out>, query=0x14f94000d380 "SELECT 1", query_length=8) at /test/11.5_opt/sql/log.cc:1360
      #16 0x000055af42066e7b in dispatch_command (command=COM_QUERY, thd=0x14f9400015a8, packet=0x14f94000d370 "SELECT 1", packet_length=8, blocking=<optimized out>) at /test/11.5_opt/sql/sql_parse.cc:1865
      #17 0x000055af42068c37 in execute_init_command (thd=0x14f9400015a8, init_command=<optimized out>, var_lock=<optimized out>) at /test/11.5_opt/sql/sql_parse.cc:953
      #18 0x000055af41f9f8b3 in handle_slave_sql (arg=arg@entry=0x55af44617b30) at /test/11.5_opt/sql/slave.cc:5665
      #19 0x000055af42544711 in pfs_spawn_thread (arg=0x55af4459e358) at /test/11.5_opt/storage/perfschema/pfs.cc:2201
      #20 0x000014f98ce94ac3 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
      #21 0x000014f98cf26850 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
      

      Present in all 10.4-11.5 optimized builds. Note that debug builds will crash as well, but on the CHANGE MASTER instead, and that bug is handled in MDEV-27857.

      Attachments

        Issue Links

          Activity

            People

              sanja Oleksandr Byelkin
              Roel Roel Van de Paar
              Votes:
              0 Vote for this issue
              Watchers:
              5 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.