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

Innodb hangs in row_mysql_handle_errors in a RQG test #7

Closed
philip-galera opened this issue Oct 30, 2014 · 2 comments

Comments

Projects
None yet
3 participants
@philip-galera
Copy link
Contributor

commented Oct 30, 2014

All threads hang like this:

#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1  0x0000000000bea020 in os_cond_wait (cond=0x7f855c045560, fast_mutex=0x7f855c045520) at /home/vagrant/codership-mysql/storage/innobase/os/os0sync.cc:214
#2  0x0000000000bea590 in os_event_wait_low (event=0x7f855c045520, reset_sig_count=105) at /home/vagrant/codership-mysql/storage/innobase/os/os0sync.cc:610
#3  0x0000000000bc7e5d in lock_wait_suspend_thread (thr=0x7f8544041aa8) at /home/vagrant/codership-mysql/storage/innobase/lock/lock0wait.cc:344
#4  0x0000000000c5ebd9 in row_mysql_handle_errors (new_err=0x7f85b0567274, trx=0x7f85600b74b8, thr=0x7f8544041aa8, savept=0x0) at /home/vagrant/codership-mysql/storage/innobase/row/row0mysql.cc:632

#5  0x0000000000c92227 in row_search_for_mysql (buf=0x7f854405ff88 "\361", mode=1, prebuilt=0x7f8544041378, match_mode=0, direction=1)
    at /home/vagrant/codership-mysql/storage/innobase/row/row0sel.cc:5058
#6  0x0000000000b676d1 in ha_innobase::general_fetch (this=0x7f854405fcc0, buf=0x7f854405ff88 "\361", direction=1, match_mode=0)
    at /home/vagrant/codership-mysql/storage/innobase/handler/ha_innodb.cc:8466
---Type <return> to continue, or q <return> to quit---
#7  0x0000000000b67c0b in ha_innobase::rnd_next (this=0x7f854405fcc0, buf=0x7f854405ff88 "\361") at /home/vagrant/codership-mysql/storage/innobase/handler/ha_innodb.cc:8682
#8  0x000000000065b9b8 in handler::ha_rnd_next (this=0x7f854405fcc0, buf=0x7f854405ff88 "\361") at /home/vagrant/codership-mysql/sql/handler.cc:2760
#9  0x00000000009594c4 in find_all_keys (param=0x7f85b0567f80, select=0x7f85600023d0, fs_info=0x7f85b0567f10, buffpek_pointers=0x7f85b05681a0, tempfile=0x7f85b0568080, pq=0x7f85b0567ec0,
    found_rows=0x7f85b05683a0) at /home/vagrant/codership-mysql/sql/filesort.cc:771
#10 0x0000000000957e0a in filesort (thd=0x23bbfc0, table=0x7f85440647d0, filesort=0x7f85b0568420, sort_positions=true, examined_rows=0x7f85b0568398, found_rows=0x7f85b05683a0)
    at /home/vagrant/codership-mysql/sql/filesort.cc:337
#11 0x0000000000897225 in mysql_update (thd=0x23bbfc0, table_list=0x7f8560000b70, fields=..., values=..., conds=0x7f8560001578, order_num=5, order=0x7f85600019a0, limit=8,
    handle_duplicates=DUP_ERROR, ignore=false, found_return=0x7f85b0568a00, updated_return=0x7f85b0568a90) at /home/vagrant/codership-mysql/sql/sql_update.cc:572
#12 0x0000000000802100 in mysql_execute_command (thd=0x23bbfc0) at /home/vagrant/codership-mysql/sql/sql_parse.cc:3626
#13 0x000000000080bd27 in mysql_parse (thd=0x23bbfc0,
    rawbuf=0x7f85600008d0 "UPDATE  `table1000_innodb_int_autoinc` AS X SET `col_int` = 8 WHERE X . `col_char_12_key` BETWEEN 1 AND 7 ORDER BY `col_char_12`,`col_char_12_key`,`col_int`,`col_int_key`,`pk` LIMIT 8", length=183, parser_state=0x7f85b056a290) at /home/vagrant/codership-mysql/sql/sql_parse.cc:6815
#14 0x000000000080b32b in wsrep_mysql_parse (thd=0x23bbfc0,
    rawbuf=0x7f85600008d0 "UPDATE  `table1000_innodb_int_autoinc` AS X SET `col_int` = 8 WHERE X . `col_char_12_key` BETWEEN 1 AND 7 ORDER BY `col_char_12`,`col_char_12_key`,`col_int`,`col_int_key`,`pk` LIMIT 8", length=183, parser_state=0x7f85b056a290) at /home/vagrant/codership-mysql/sql/sql_parse.cc:6595
#15 0x00000000007fcd19 in dispatch_command (command=COM_QUERY, thd=0x23bbfc0,
    packet=0x2498311 "UPDATE  `table1000_innodb_int_autoinc` AS X SET `col_int` = 8 WHERE X . `col_char_12_key` BETWEEN 1 AND 7 ORDER BY `col_char_12`,`col_char_12_key`,`col_int`,`col_int_key`,`pk` LIMIT 8", packet_length=183) at /home/vagrant/codership-mysql/sql/sql_parse.cc:1525
#16 0x00000000007fb813 in do_command (thd=0x23bbfc0) at /home/vagrant/codership-mysql/sql/sql_parse.cc:1114
#17 0x00000000007c2127 in do_handle_one_connection (thd_arg=0x23bbfc0) at /home/vagrant/codership-mysql/sql/sql_connect.cc:1007
#18 0x00000000007c1c2a in handle_one_connection (arg=0x23bbfc0) at /home/vagrant/codership-mysql/sql/sql_connect.cc:916
#19 0x00007f85be007182 in start_thread (arg=0x7f85b056b700) at pthread_create.c:312
#20 0x00007f85bd513fbd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

http://127.0.0.1:8080/job/nightly-builds/Arch=64,GaleraVersion=3.x,MySQLVersion=5.6/615/consoleText

RQG command line:

http://127.0.0.1:8080/job/nightly-builds/Arch=64,GaleraVersion=3.x,MySQLVersion=5.6/615/consoleText
@sjaakola

This comment has been minimized.

Copy link
Contributor

commented Nov 16, 2014

I was able to reproduce similar issue with RQG grammar: galera_stress-56-noddl.yy, using 5.5 branch.
This hang was due to two appliers conflicting with local transaction and resulting later in(acceptable) BF BF lock conflict. Granting the lock back to other BF thread did not happen, after local transaction aborted.

@sjaakola

This comment has been minimized.

Copy link
Contributor

commented Nov 16, 2014

Fix for above issue was pushed in 5.5 branch. Similar vulnerability is in 5.6 branch, but problem has not reproduced in 5.6 so far. It may be possible to work out a regression test for this issue specifically.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.