Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MDEV-5405 partitions-99-hash fails on safe_mutex_unlock at mariadb/mysys/thr_mutex.c:420 #20

Closed
joel9001 opened this issue Dec 4, 2013 · 5 comments
Labels
Milestone

Comments

@joel9001
Copy link

joel9001 commented Dec 4, 2013

During a non-combinations run of partitions-99-hash.yy, a crash occurs. The stack trace appears as shown below:

#0  0x00007f3dcedd3f0c in __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../nptl/sysdeps/unix/sysv/linux/pthread_kill.c:62
#0  0x00007f3dcedd3f0c in __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../nptl/sysdeps/unix/sysv/linux/pthread_kill.c:62
#1  0x0000000000b91c63 in my_write_core (sig=6) at /home/tokubuild/builds/build-tokudb-1386006533-debug-e/mariadb/mysys/stacktrace.c:457
#2  0x00000000006f78ca in handle_fatal_signal (sig=6) at /home/tokubuild/builds/build-tokudb-1386006533-debug-e/mariadb/sql/signal_handler.cc:264
#3  <signal handler called>
#4  0x00007f3dce42df77 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#5  0x00007f3dce4315e8 in __GI_abort () at abort.c:90
#6  0x0000000000b984ba in safe_mutex_unlock (mp=<optimized out>, file=file@entry=0xcfaaa8 "/home/tokubuild/builds/build-tokudb-1386006533-debug-e/mariadb/storage/myisam/mi_keycache.c", line=line@entry=87) at /home/tokubuild/builds/build-tokudb-1386006533-debug-e/mariadb/mysys/thr_mutex.c:420
#7  0x00000000009155c9 in mi_assign_to_key_cache (info=0x7f3d88b5e260, key_map=<optimized out>, key_cache=0x7f3db3b2fae0) at /home/tokubuild/builds/build-tokudb-1386006533-debug-e/mariadb/storage/myisam/mi_keycache.c:87
#8  0x00000000008f931c in ha_myisam::assign_to_keycache (this=0x7f3d8422b078, thd=0x7f3db3fec060, check_opt=<optimized out>) at /home/tokubuild/builds/build-tokudb-1386006533-debug-e/mariadb/storage/myisam/ha_myisam.cc:1237
#9  0x0000000000b6b969 in ha_partition::handle_opt_part (this=this@entry=0x7f3d95caa678, thd=thd@entry=0x7f3db3fec060, check_opt=check_opt@entry=0x7f3db13f9660, part_id=part_id@entry=0, flag=flag@entry=5) at /home/tokubuild/builds/build-tokudb-1386006533-debug-e/mariadb/sql/ha_partition.cc:1091
#10 0x0000000000b6bc2f in ha_partition::handle_opt_partitions (this=this@entry=0x7f3d95caa678, thd=thd@entry=0x7f3db3fec060, check_opt=check_opt@entry=0x7f3db13f9660, flag=flag@entry=5) at /home/tokubuild/builds/build-tokudb-1386006533-debug-e/mariadb/sql/ha_partition.cc:1246
#11 0x0000000000b6be02 in ha_partition::assign_to_keycache (this=0x7f3d95caa678, thd=0x7f3db3fec060, check_opt=0x7f3db13f9660) at /home/tokubuild/builds/build-tokudb-1386006533-debug-e/mariadb/sql/ha_partition.cc:1018
#12 0x00000000006773cc in mysql_admin_table(THD *, TABLE_LIST *, HA_CHECK_OPT *, const char *, thr_lock_type, bool, bool, uint, int (*)(THD *, TABLE_LIST *, HA_CHECK_OPT *), struct {...}, int (*)(THD *, TABLE_LIST *)) (thd=thd@entry=0x7f3db3fec060, tables=tables@entry=0x7f3d8d0ac1a0, check_opt=check_opt@entry=0x7f3db13f9660, operator_name=operator_name@entry=0xcf8a48 "assign_to_keycache", lock_type=lock_type@entry=TL_READ_NO_INSERT, open_for_modify=open_for_modify@entry=false, repair_table_use_frm=repair_table_use_frm@entry=false, extra_open_options=extra_open_options@entry=0, prepare_func=prepare_func@entry=0x0, operator_func=&virtual table offset 512, view_operator_func=view_operator_func@entry=0x0) at /home/tokubuild/builds/build-tokudb-1386006533-debug-e/mariadb/sql/sql_admin.cc:654
#13 0x00000000006790be in mysql_assign_to_keycache (thd=thd@entry=0x7f3db3fec060, tables=tables@entry=0x7f3d8d0ac1a0, key_cache_name=key_cache_name@entry=0x7f3db3fefe58) at /home/tokubuild/builds/build-tokudb-1386006533-debug-e/mariadb/sql/sql_admin.cc:997
#14 0x00000000005a0fbd in mysql_execute_command (thd=thd@entry=0x7f3db3fec060) at /home/tokubuild/builds/build-tokudb-1386006533-debug-e/mariadb/sql/sql_parse.cc:2352
#15 0x00000000005a84f7 in mysql_parse (thd=thd@entry=0x7f3db3fec060, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x7f3db13fa5f0) at /home/tokubuild/builds/build-tokudb-1386006533-debug-e/mariadb/sql/sql_parse.cc:5812
#16 0x00000000005a908a in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x7f3db3fec060, packet=packet@entry=0x7f3db3ff1061 "", packet_length=packet_length@entry=49) at /home/tokubuild/builds/build-tokudb-1386006533-debug-e/mariadb/sql/sql_parse.cc:1082
#17 0x00000000005aaa16 in do_command (thd=0x7f3db3fec060) at /home/tokubuild/builds/build-tokudb-1386006533-debug-e/mariadb/sql/sql_parse.cc:797
#18 0x000000000066b82e in do_handle_one_connection (thd_arg=thd_arg@entry=0x7f3db3fec060) at /home/tokubuild/builds/build-tokudb-1386006533-debug-e/mariadb/sql/sql_connect.cc:1266
#19 0x000000000066b920 in handle_one_connection (arg=0x7f3db3fec060) at /home/tokubuild/builds/build-tokudb-1386006533-debug-e/mariadb/sql/sql_connect.cc:1181
#20 0x00007f3dcedcef6e in start_thread (arg=0x7f3db13fb700) at pthread_create.c:311
#21 0x00007f3dce4f19cd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:113
@joel9001
Copy link
Author

joel9001 commented Dec 6, 2013

This issue also causes a crash during a single trial of partitions_hash_key_less_rand.yy.

@joel9001
Copy link
Author

joel9001 commented Dec 6, 2013

Here is a runall script for this issue:

./runall.pl --grammar=conf/partitioning/partitions-99-hash.yy --duration=300 --queries=100000000 --threads=64 --basedir=/home/joel/data/mariadb-5.5.34-tokudb-1386006533-debug-e-linux-x86_64 --vardir=/home/joel/data/vardir1 --mask-level=0 --mask=0 --seed=1 --mysqld=--general_log --sqltrace

@joel9001
Copy link
Author

joel9001 commented Dec 6, 2013

This issue also causes a crash during a single trial of partitions.yy.

@prohaska
Copy link
Contributor

prohaska commented Dec 6, 2013

mi_assign_to_key_cache is not thread safe.

@prohaska
Copy link
Contributor

prohaska commented Dec 6, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants