Uploaded image for project: 'Percona Server'
  1. Percona Server
  2. PS-4294

Handlerton. trx->tokudb_lock_count > 0

    Details

    • Type: Bug
    • Status: Done
    • Priority: High
    • Resolution: Fixed
    • Affects Version/s: 5.7.21-21
    • Fix Version/s: 5.7.22-22
    • Component/s: TokuDB
    • Labels:

      Description

      sql file:

      # mysqld options required for replay: --plugin-load=TokuDB=ha_tokudb.so --max_allowed_packet=33554432 --maximum-bulk_insert_buffer_size=1M --maximum-join_buffer_size=1M --maximum-max_heap_table_size=1M --maximum-max_join_size=1M --maximum-myisam_max_sort_file_size=1M --maximum-myisam_mmap_size=1M --maximum-myisam_sort_buffer_size=1M --maximum-optimizer_trace_max_mem_size=1M --maximum-preload_buffer_size=1M --maximum-query_alloc_block_size=1M --maximum-query_prealloc_size=1M --maximum-range_alloc_block_size=1M --maximum-read_buffer_size=1M --maximum-read_rnd_buffer_size=1M --maximum-sort_buffer_size=1M --maximum-tmp_table_size=1M --maximum-transaction_alloc_block_size=1M --maximum-transaction_prealloc_size=1M --log-output=none --sql_mode=ONLY_FULL_GROUP_BY --log_bin=binlog --server-id=0 --binlog_format=ROW --gtid_mode=ON --enforce_gtid_consistency=ON --master_verify_checksum=on --binlog_checksum=CRC32 --tokudb-check-jemalloc=0 --performance-schema --performance-schema-instrument='%=on' --thread_handling=pool-of-threads --innodb_file_per_table=1  --tokudb_enable_fast_update=1 --tokudb_enable_fast_upsert=1 --innodb-show-locks-held=2 --tokudb-loader-memory-size=12 --tokudb-cardinality-scale-percent=88 --tokudb-max-lock-memory=1023
      
      CREATE DATABASE test;
      USE test;
      CREATE TABLE t(a INT,b INT,c CHAR(1),d CHAR (1),e VARCHAR(1),f VARCHAR(1),g BLOB,h BLOB,id INT,KEY(b),CLUSTERING KEY(e)) ENGINE=tokudb;
      ALTER TABLE t CHANGE COLUMN a a CHAR(1);
      create table t(k int,uq int,unique key ix1 (uq))ENGINE=InnoDB;
      drop table t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36,t37,t38,t39,t40,t41,t42,t43,t44,t45,t46,t47,t48,t49,t50,t51,t52,t53,t54,t55,t56,t57,t58,t59,t60,t61,t62,t63,t64,t65,t66,t67,t68,t69,t70,t71,t72,t73,t74,t75,t76,t77,t78,t79,t80,t81,t82,t83,t84,t85,t86,t87,t88,t89,t90,t91,t92,t93,t94,t95,t96,t97,t98,t99,t100,t101,t102,t103,t104,t105,t106,t107,t108,t109,t110,t111,t112,t113,t114,t115,t116,t117,t118,t119,t120,t121,t122,t123,t124,t125,t126,t127,t128,t129,t130,t131,t132,t133,t134,t135,t136,t137,t138,t139,t140,t141,t142,t143,t144,t145,t146,t147,t148,t149,t150,t151,t152,t153,t154,t155,t156,t157,t158,t159,t160,t161,t162,t163,t164,t165,t166,t167,t168,t169,t170,t171,t172,t173,t174,t175,t176,t177,t178,t179,t180,t181,t182,t183,t184,t185,t186,t187,t188,t189,t190,t191,t192,t193,t194,t195,t196,t197,t198,t199,t200,t201,t202,t203,t204,t205,t206,t207,t208,t209,t210,t211,t212,t213,t214,t215,t216,t217,t218,t219,t220,t221,t222,t223,t224,t225,t226,t227,t228,t229,t230,t231,t232,t233,t234,t235,t236,t237,t238,t239,t240,t241,t242,t243,t244,t245,t246,t247,t248,t249,t250,t251,t252,t253,t254,t255,t256,t257,t00;
      ALTER TABLE t ADD KEY bk(b);
      

      gdb

      (gdb) bt
      +bt
      #0  0x00007eff4e5a39b1 in __pthread_kill (threadid=<optimized out>, signo=6) at ../nptl/sysdeps/unix/sysv/linux/pthread_kill.c:61
      #1  0x0000000001872a64 in my_write_core (sig=6) at /home/hrvoje/worktable/PS-5.7-trunk_dbg/mysys/stacktrace.c:249
      #2  0x0000000000e90acf in handle_fatal_signal (sig=6) at /home/hrvoje/worktable/PS-5.7-trunk_dbg/sql/signal_handler.cc:223
      #3  <signal handler called>
      #4  0x00007eff4c6af1f7 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
      #5  0x00007eff4c6b08e8 in __GI_abort () at abort.c:90
      #6  0x00007eff0dd4e047 in toku_do_backtrace_abort () at /home/hrvoje/worktable/PS-5.7-trunk_dbg/storage/tokudb/PerconaFT/portability/toku_assert.cc:147
      #7  0x00007eff0dd4e136 in toku_do_assert_fail (expr_as_string=0x7eff4eb559b0 "Handlerton: trx->tokudb_lock_count > 0 ", function=0x7eff0dd5a190 <ha_tokudb::commit_inplace_alter_table(TABLE*, Alter_inplace_info*, bool)::__FUNCTION__> "commit_inplace_alter_table", file=0x7eff0dd56df8 "/home/hrvoje/worktable/PS-5.7-trunk_dbg/storage/tokudb/ha_tokudb_alter.cc", line=1561, caller_errno=0) at /home/hrvoje/worktable/PS-5.7-trunk_dbg/storage/tokudb/PerconaFT/portability/toku_assert.cc:168
      #8  0x00007eff0dc5d128 in env_crash (db_env=0x7eff32d8ae00, msg=0x7eff4eb559b0 "Handlerton: trx->tokudb_lock_count > 0 ", fun=0x7eff0dd5a190 <ha_tokudb::commit_inplace_alter_table(TABLE*, Alter_inplace_info*, bool)::__FUNCTION__> "commit_inplace_alter_table", file=0x7eff0dd56df8 "/home/hrvoje/worktable/PS-5.7-trunk_dbg/storage/tokudb/ha_tokudb_alter.cc", line=1561, caller_errno=0) at /home/hrvoje/worktable/PS-5.7-trunk_dbg/storage/tokudb/PerconaFT/src/ydb.cc:2583
      #9  0x00007eff0dc3f139 in toku_hton_assert_fail (expr_as_string=0x7eff0dd5742b "trx->tokudb_lock_count > 0", fun=0x7eff0dd5a190 <ha_tokudb::commit_inplace_alter_table(TABLE*, Alter_inplace_info*, bool)::__FUNCTION__> "commit_inplace_alter_table", file=0x7eff0dd56df8 "/home/hrvoje/worktable/PS-5.7-trunk_dbg/storage/tokudb/ha_tokudb_alter.cc", line=1561, caller_errno=0) at /home/hrvoje/worktable/PS-5.7-trunk_dbg/storage/tokudb/hatoku_hton.cc:180
      #10 0x00007eff0dc37c14 in ha_tokudb::commit_inplace_alter_table (this=0x7efeb1cae030, altered_table=0x7efeb1de9e20, ha_alter_info=0x7eff4eb567b0, commit=false) at /home/hrvoje/worktable/PS-5.7-trunk_dbg/storage/tokudb/ha_tokudb_alter.cc:1561
      #11 0x0000000000f2813e in handler::ha_commit_inplace_alter_table (this=0x7efeb1cae030, altered_table=0x7efeb1de9e20, ha_alter_info=0x7eff4eb567b0, commit=false) at /home/hrvoje/worktable/PS-5.7-trunk_dbg/sql/handler.cc:5123
      #12 0x00000000015cd9ae in mysql_inplace_alter_table (thd=0x7eff1ebfc000, table_list=0x7eff305e39d0, table=0x7efeb1c29220, altered_table=0x7efeb1de9e20, ha_alter_info=0x7eff4eb567b0, inplace_supported=HA_ALTER_INPLACE_SHARED_LOCK_AFTER_PREPARE, target_mdl_request=0x7eff4eb561f0, alter_ctx=0x7eff4eb56d40) at /home/hrvoje/worktable/PS-5.7-trunk_dbg/sql/sql_table.cc:7915
      #13 0x00000000015d31fc in mysql_alter_table (thd=0x7eff1ebfc000, new_db=0x7eff305e3f58 "test", new_name=0x0, create_info=0x7eff4eb57a00, table_list=0x7eff305e39d0, alter_info=0x7eff4eb57930) at /home/hrvoje/worktable/PS-5.7-trunk_dbg/sql/sql_table.cc:10198
      #14 0x0000000001742e8a in Sql_cmd_alter_table::execute (this=0x7eff305e4020, thd=0x7eff1ebfc000) at /home/hrvoje/worktable/PS-5.7-trunk_dbg/sql/sql_alter.cc:338
      #15 0x000000000153a323 in mysql_execute_command (thd=0x7eff1ebfc000, first_level=true) at /home/hrvoje/worktable/PS-5.7-trunk_dbg/sql/sql_parse.cc:5117
      #16 0x000000000153c3bf in mysql_parse (thd=0x7eff1ebfc000, parser_state=0x7eff4eb59390) at /home/hrvoje/worktable/PS-5.7-trunk_dbg/sql/sql_parse.cc:5901
      #17 0x0000000001530f0f in dispatch_command (thd=0x7eff1ebfc000, com_data=0x7eff4eb59b70, command=COM_QUERY) at /home/hrvoje/worktable/PS-5.7-trunk_dbg/sql/sql_parse.cc:1490
      #18 0x000000000152fd97 in do_command (thd=0x7eff1ebfc000) at /home/hrvoje/worktable/PS-5.7-trunk_dbg/sql/sql_parse.cc:1021
      #19 0x000000000163ef63 in threadpool_process_request (thd=0x7eff1ebfc000) at /home/hrvoje/worktable/PS-5.7-trunk_dbg/sql/threadpool_common.cc:258
      #20 0x00000000016576bd in handle_event (connection=0x7eff1eb27990) at /home/hrvoje/worktable/PS-5.7-trunk_dbg/sql/threadpool_unix.cc:1583
      #21 0x0000000001657840 in worker_main (param=0x2cf8a00 <all_groups+1536>) at /home/hrvoje/worktable/PS-5.7-trunk_dbg/sql/threadpool_unix.cc:1635
      #22 0x000000000189635d in pfs_spawn_thread (arg=0x7eff4a819120) at /home/hrvoje/worktable/PS-5.7-trunk_dbg/storage/perfschema/pfs.cc:2190
      #23 0x00007eff4e59ee25 in start_thread (arg=0x7eff4eb5a700) at pthread_create.c:308
      #24 0x00007eff4c77234d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:113
      

      Reproduced on 5.7 trunk (d666728a14ff7349fbb923336bc9977565cbe479)

        Smart Checklist

          Attachments

            Activity

              People

              • Assignee:
                george.lorch George Lorch
                Reporter:
                hrvoje.matijakovic Hrvoje Matijakovic
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 7 hours, 16 minutes
                  7h 16m