Assertion `m_lock_type == 2' failed in sql/handler.cc:2631 | abort (sig=6) in handler::unbind_psi

Bug #1372757 reported by Ramesh Sivaraman
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona Server moved to https://jira.percona.com/projects/PS
Status tracked in 5.7
5.1
Invalid
Undecided
Unassigned
5.5
Incomplete
Undecided
Ramesh Sivaraman
5.6
Incomplete
Undecided
Ramesh Sivaraman
5.7
Incomplete
Undecided
Ramesh Sivaraman

Bug Description

********************* GDB

+bt
#0 0x00007f3fe11c9771 in pthread_kill () from /lib64/libpthread.so.0
#1 0x0000000000ab09a2 in my_write_core (sig=6) at /mnt/workspace/percona-server-5.6-binaries-debug-yassl/label_exp/centos6-64/percona-server-5.6.20-68.0/mysys/stacktrace.c:422
#2 0x000000000072ca03 in handle_fatal_signal (sig=6) at /mnt/workspace/percona-server-5.6-binaries-debug-yassl/label_exp/centos6-64/percona-server-5.6.20-68.0/sql/signal_handler.cc:236
#3 <signal handler called>
#4 0x00007f3fdfdcd5c9 in raise () from /lib64/libc.so.6
#5 0x00007f3fdfdcecd8 in abort () from /lib64/libc.so.6
#6 0x00007f3fdfdc6536 in __assert_fail_base () from /lib64/libc.so.6
#7 0x00007f3fdfdc65e2 in __assert_fail () from /lib64/libc.so.6
#8 0x000000000063eed2 in handler::unbind_psi (this=0x7f3f88b9c2d0) at /mnt/workspace/percona-server-5.6-binaries-debug-yassl/label_exp/centos6-64/percona-server-5.6.20-68.0/sql/handler.cc:2631
#9 0x000000000076aa91 in close_thread_table (thd=0x2351490, table_ptr=0x2351560) at /mnt/workspace/percona-server-5.6-binaries-debug-yassl/label_exp/centos6-64/percona-server-5.6.20-68.0/sql/sql_base.cc:1514
#10 0x00000000009e3d45 in handle_alter_part_error (lpt=0x7f3fa9fb6a80, action_completed=true, drop_partition=false, frm_install=false, close_table=false) at /mnt/workspace/percona-server-5.6-binaries-debug-yassl/label_exp/centos6-64/percona-server-5.6.20-68.0/sql/sql_partition.cc:6731
#11 0x00000000009e5246 in fast_alter_partition_table (thd=0x2351490, table=0x7f3f8819d850, alter_info=0x7f3fa9fb84d0, create_info=0x7f3fa9fb8590, table_list=0x7f3f880051a0, db=0x7f3f88005700 "test", table_name=0x7f3f88005168 "t1") at /mnt/workspace/percona-server-5.6-binaries-debug-yassl/label_exp/centos6-64/percona-server-5.6.20-68.0/sql/sql_partition.cc:7256
#12 0x0000000000858612 in mysql_alter_table (thd=0x2351490, new_db=0x7f3f88005700 "test", new_name=0x0, create_info=0x7f3fa9fb8590, table_list=0x7f3f880051a0, alter_info=0x7f3fa9fb84d0, order_num=0, order=0x0, ignore=false) at /mnt/workspace/percona-server-5.6-binaries-debug-yassl/label_exp/centos6-64/percona-server-5.6.20-68.0/sql/sql_table.cc:8352
#13 0x00000000009a020d in Sql_cmd_alter_table::execute (this=0x7f3f88005708, thd=0x2351490) at /mnt/workspace/percona-server-5.6-binaries-debug-yassl/label_exp/centos6-64/percona-server-5.6.20-68.0/sql/sql_alter.cc:317
#14 0x00000000007e6c61 in mysql_execute_command (thd=0x2351490) at /mnt/workspace/percona-server-5.6-binaries-debug-yassl/label_exp/centos6-64/percona-server-5.6.20-68.0/sql/sql_parse.cc:5382
#15 0x00000000007ea051 in mysql_parse (thd=0x2351490, rawbuf=0x7f3f880050a0 "ALTER TABLE t1 REBUILD PARTITION all", length=36, parser_state=0x7f3fa9fb9e30) at /mnt/workspace/percona-server-5.6-binaries-debug-yassl/label_exp/centos6-64/percona-server-5.6.20-68.0/sql/sql_parse.cc:6744
#16 0x00000000007dc5ec in dispatch_command (command=COM_QUERY, thd=0x2351490, packet=0x2b54851 "ALTER TABLE t1 REBUILD PARTITION all;", packet_length=37) at /mnt/workspace/percona-server-5.6-binaries-debug-yassl/label_exp/centos6-64/percona-server-5.6.20-68.0/sql/sql_parse.cc:1432
#17 0x00000000007db518 in do_command (thd=0x2351490) at /mnt/workspace/percona-server-5.6-binaries-debug-yassl/label_exp/centos6-64/percona-server-5.6.20-68.0/sql/sql_parse.cc:1049
#18 0x00000000007a34d5 in do_handle_one_connection (thd_arg=0x2351490) at /mnt/workspace/percona-server-5.6-binaries-debug-yassl/label_exp/centos6-64/percona-server-5.6.20-68.0/sql/sql_connect.cc:1532
#19 0x00000000007a2fdd in handle_one_connection (arg=0x2351490) at /mnt/workspace/percona-server-5.6-binaries-debug-yassl/label_exp/centos6-64/percona-server-5.6.20-68.0/sql/sql_connect.cc:1443
#20 0x0000000000dbdbb8 in pfs_spawn_thread (arg=0x2b0bc10) at /mnt/workspace/percona-server-5.6-binaries-debug-yassl/label_exp/centos6-64/percona-server-5.6.20-68.0/storage/perfschema/pfs.cc:1860
#21 0x00007f3fe11c4df3 in start_thread () from /lib64/libpthread.so.0
#22 0x00007f3fdfe8e01d in clone () from /lib64/libc.so.6
(gdb) +set logging off

***************** Error Info

mysqld: /mnt/workspace/percona-server-5.6-binaries-debug-yassl/label_exp/centos6-64/percona-server-5.6.20-68.0/sql/handler.cc:2631: virtual void handler::
unbind_psi(): Assertion `m_lock_type == 2' failed.
07:45:15 UTC - mysqld got signal 6 ;
--
--
Thread pointer: 0x2351490
Attempting backtrace. You can use the following information to find out
where mysqld died. If you see no messages after this, something went
terribly wrong...
stack_bottom = 7f3fa9fbae58 thread_stack 0x40000
/ssd/ramesh/Percona-Server-5.6.20-rel68.0-660.Linux.x86_64-debug/bin/mysqld(my_print_stacktrace+0x35)[0xab0920]
/ssd/ramesh/Percona-Server-5.6.20-rel68.0-660.Linux.x86_64-debug/bin/mysqld(handle_fatal_signal+0x41a)[0x72c80a]
/lib64/libpthread.so.0(+0xf130)[0x7f3fe11cc130]
/lib64/libc.so.6(gsignal+0x39)[0x7f3fdfdcd5c9]
/lib64/libc.so.6(abort+0x148)[0x7f3fdfdcecd8]
/lib64/libc.so.6(+0x2e536)[0x7f3fdfdc6536]
/lib64/libc.so.6(+0x2e5e2)[0x7f3fdfdc65e2]
/ssd/ramesh/Percona-Server-5.6.20-rel68.0-660.Linux.x86_64-debug/bin/mysqld(_ZN7handler10unbind_psiEv+0x3a)[0x63eed2]
/ssd/ramesh/Percona-Server-5.6.20-rel68.0-660.Linux.x86_64-debug/bin/mysqld(_Z18close_thread_tableP3THDPP5TABLE+0x225)[0x76aa91]
/ssd/ramesh/Percona-Server-5.6.20-rel68.0-660.Linux.x86_64-debug/bin/mysqld(_Z23handle_alter_part_errorP18st_lock_param_typebbbb+0x1c6)[0x9e3d45]
/ssd/ramesh/Percona-Server-5.6.20-rel68.0-660.Linux.x86_64-debug/bin/mysqld(_Z26fast_alter_partition_tableP3THDP5TABLEP10Alter_infoP24st_ha_create_informationP10TABLE_LISTPcPKc+0x11b2)[0x9e5246]
/ssd/ramesh/Percona-Server-5.6.20-rel68.0-660.Linux.x86_64-debug/bin/mysqld(_Z17mysql_alter_tableP3THDPcS1_P24st_ha_create_informationP10TABLE_LISTP10Alter_infojP8st_orderb+0xd2f)[0x858612]
/ssd/ramesh/Percona-Server-5.6.20-rel68.0-660.Linux.x86_64-debug/bin/mysqld(_ZN19Sql_cmd_alter_table7executeEP3THD+0x511)[0x9a020d]
/ssd/ramesh/Percona-Server-5.6.20-rel68.0-660.Linux.x86_64-debug/bin/mysqld(_Z21mysql_execute_commandP3THD+0x7c83)[0x7e6c61]
/ssd/ramesh/Percona-Server-5.6.20-rel68.0-660.Linux.x86_64-debug/bin/mysqld(_Z11mysql_parseP3THDPcjP12Parser_state+0x5a6)[0x7ea051]
/ssd/ramesh/Percona-Server-5.6.20-rel68.0-660.Linux.x86_64-debug/bin/mysqld(_Z16dispatch_command19enum_server_commandP3THDPcj+0xc88)[0x7dc5ec]
/ssd/ramesh/Percona-Server-5.6.20-rel68.0-660.Linux.x86_64-debug/bin/mysqld(_Z10do_commandP3THD+0x3ac)[0x7db518]
/ssd/ramesh/Percona-Server-5.6.20-rel68.0-660.Linux.x86_64-debug/bin/mysqld(_Z24do_handle_one_connectionP3THD+0x1c4)[0x7a34d5]
/ssd/ramesh/Percona-Server-5.6.20-rel68.0-660.Linux.x86_64-debug/bin/mysqld(handle_one_connection+0x33)[0x7a2fdd]
/ssd/ramesh/Percona-Server-5.6.20-rel68.0-660.Linux.x86_64-debug/bin/mysqld(pfs_spawn_thread+0x159)[0xdbdbb8]
/lib64/libpthread.so.0(+0x7df3)[0x7f3fe11c4df3]
/lib64/libc.so.6(clone+0x6d)[0x7f3fdfe8e01d]

Trying to get some variables.
Some pointers may be invalid and cause the dump to abort.
Query (7f3f880050a0): ALTER TABLE t1 REBUILD PARTITION all
Connection ID (thread ID): 4
Status: NOT_KILLED

Revision history for this message
Ramesh Sivaraman (rameshvs02) wrote :

GDB and error files

Revision history for this message
Laurynas Biveinis (laurynas-biveinis) wrote :

Please reduce the testcase (likely to be single-threaded) and test upstream.

Revision history for this message
Roel Van de Paar (roel11) wrote :

Test was indeed single threaded. Agreed to leave as incomplete unless we see it often or unless we produce a testcase.

Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PS-3182

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.