[MDEV-6553] Frozen insert on myisam table Created: 2014-08-08  Updated: 2014-09-28  Due: 2014-09-16  Resolved: 2014-09-28

Status: Closed
Project: MariaDB Server
Component/s: OTHER
Affects Version/s: 5.5.33a
Fix Version/s: N/A

Type: Bug Priority: Major
Reporter: Patryk Pomykalski Assignee: Elena Stepanova
Resolution: Incomplete Votes: 0
Labels: None
Environment:

Centos 6.4



 Description   

Single row insert on myisam table got locked somewhere. Cut from processlist:

Time State Info
116770 update INSERT INTO myisam_table ...
113828 Waiting for table level lock UPDATE myisam_table SET column = 0
30424 Waiting for table level lock INSERT INTO myisam_table ...
27428 Waiting for table level lock UPDATE myisam_table SET column = 0

Selects on that table run normally.

This happened second time in about 3 months, some time after setting concurrent_insert = 2 so maybe related to that.

Relevant thread backtraces:

Thread 36 (Thread 0x7f9124102700 (LWP 18221)):
#0  0x0000003c7a60b98e in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x0000000000a8ec1f in wait_for_lock ()
#2  0x0000000000a8f3d7 in thr_multi_lock ()
#3  0x000000000078f674 in mysql_lock_tables(THD*, st_mysql_lock*, unsigned int) ()
#4  0x000000000078f8d3 in mysql_lock_tables(THD*, TABLE**, unsigned int, unsigned int) ()
#5  0x00000000005479d5 in lock_tables(THD*, TABLE_LIST*, unsigned int, unsigned int) ()
#6  0x0000000000612dfd in mysql_update(THD*, TABLE_LIST*, List<Item>&, List<Item>&, Item*, unsigned int, st_order*, unsigned long long, enum_duplicates, bool, unsigned long long*, unsigned long long*) ()
#7  0x000000000058bb13 in mysql_execute_command(THD*) ()
#8  0x000000000058ee19 in mysql_parse(THD*, char*, unsigned int, Parser_state*) ()
#9  0x0000000000590270 in dispatch_command(enum_server_command, THD*, char*, unsigned int) ()
#10 0x0000000000649c1f in do_handle_one_connection(THD*) ()
#11 0x0000000000649cbc in handle_one_connection ()
#12 0x0000003c7a6079d1 in start_thread () from /lib64/libpthread.so.0
#13 0x0000003c7a2e8b6d in clone () from /lib64/libc.so.6
        
Thread 31 (Thread 0x7f911b564700 (LWP 18226)):
#0  0x0000003c7a60ac50 in pthread_rwlock_wrlock () from /lib64/libpthread.so.0
#1  0x0000000000a483d8 in inline_mysql_rwlock_wrlock.clone.0 ()
#2  0x0000000000a487de in mi_write ()
#3  0x00000000006d55fd in handler::ha_write_row(unsigned char*) ()
#4  0x000000000056fa61 in write_record(THD*, TABLE*, st_copy_info*) ()
#5  0x00000000005778e7 in mysql_insert(THD*, TABLE_LIST*, List<Item>&, List<List<Item> >&, List<Item>&, List<Item>&, enum_duplicates, bool) ()
#6  0x000000000058bc08 in mysql_execute_command(THD*) ()
#7  0x000000000058ee19 in mysql_parse(THD*, char*, unsigned int, Parser_state*) ()
#8  0x0000000000590270 in dispatch_command(enum_server_command, THD*, char*, unsigned int) ()
#9  0x0000000000649c1f in do_handle_one_connection(THD*) ()
#10 0x0000000000649cbc in handle_one_connection ()
#11 0x0000003c7a6079d1 in start_thread () from /lib64/libpthread.so.0
#12 0x0000003c7a2e8b6d in clone () from /lib64/libc.so.6
 
Thread 24 (Thread 0x7f90fa6db700 (LWP 18234)):
#0  0x0000003c7a60b98e in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x0000000000a8ec1f in wait_for_lock ()
#2  0x0000000000a8f3d7 in thr_multi_lock ()
#3  0x000000000078f674 in mysql_lock_tables(THD*, st_mysql_lock*, unsigned int) ()
#4  0x000000000078f8d3 in mysql_lock_tables(THD*, TABLE**, unsigned int, unsigned int) ()
#5  0x00000000005479d5 in lock_tables(THD*, TABLE_LIST*, unsigned int, unsigned int) ()
#6  0x0000000000612dfd in mysql_update(THD*, TABLE_LIST*, List<Item>&, List<Item>&, Item*, unsigned int, st_order*, unsigned long long, enum_duplicates, bool, unsigned long long*, unsigned long long*) ()
#7  0x000000000058bb13 in mysql_execute_command(THD*) ()
#8  0x000000000058ee19 in mysql_parse(THD*, char*, unsigned int, Parser_state*) ()
#9  0x0000000000590270 in dispatch_command(enum_server_command, THD*, char*, unsigned int) ()
#10 0x0000000000649c1f in do_handle_one_connection(THD*) ()
#11 0x0000000000649cbc in handle_one_connection ()
#12 0x0000003c7a6079d1 in start_thread () from /lib64/libpthread.so.0
#13 0x0000003c7a2e8b6d in clone () from /lib64/libc.so.6
 
Thread 21 (Thread 0x7f90fa5b7700 (LWP 20223)):
#0  0x0000003c7a60b98e in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x0000000000a8ec1f in wait_for_lock ()
#2  0x0000000000a8f3d7 in thr_multi_lock ()
#3  0x000000000078f674 in mysql_lock_tables(THD*, st_mysql_lock*, unsigned int) ()
#4  0x000000000078f8d3 in mysql_lock_tables(THD*, TABLE**, unsigned int, unsigned int) ()
#5  0x00000000005479d5 in lock_tables(THD*, TABLE_LIST*, unsigned int, unsigned int) ()
#6  0x000000000054cca2 in open_and_lock_tables(THD*, TABLE_LIST*, bool, unsigned int, Prelocking_strategy*) ()
#7  0x0000000000577053 in mysql_insert(THD*, TABLE_LIST*, List<Item>&, List<List<Item> >&, List<Item>&, List<Item>&, enum_duplicates, bool) ()
#8  0x000000000058bc08 in mysql_execute_command(THD*) ()
#9  0x000000000058ee19 in mysql_parse(THD*, char*, unsigned int, Parser_state*) ()
#10 0x0000000000590270 in dispatch_command(enum_server_command, THD*, char*, unsigned int) ()
#11 0x0000000000649c1f in do_handle_one_connection(THD*) ()
#12 0x0000000000649cbc in handle_one_connection ()
#13 0x0000003c7a6079d1 in start_thread () from /lib64/libpthread.so.0
#14 0x0000003c7a2e8b6d in clone () from /lib64/libc.so.6



 Comments   
Comment by Elena Stepanova [ 2014-08-08 ]

Hi Patryk,

Is it a complete process list, no other threads at all? Or no other threads touching the table at the moment?

Comment by Patryk Pomykalski [ 2014-08-08 ]

There were also other threads, full list: http://derp.co.uk/bf9dd

Comment by Patryk Pomykalski [ 2014-08-08 ]

Queries on other tables were working without problems.

Comment by Elena Stepanova [ 2014-08-13 ]

Hi Patryk,

Could you please provide SHOW CREATE TABLE for the table, the INSERT statement (obfuscate values and column names if you need to), and whatever else you can say about the table – SHOW TABLE STATUS, SHOW INDEX...
Also, please attach your cnf file(s) and/or paste output of SHOW VARIABLES.

Thanks.

Comment by Elena Stepanova [ 2014-09-28 ]

Closing as incomplete for now, please add the details and comment if the issue is still relevant and needs to be re-opened.

Generated at Thu Feb 08 07:12:48 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.