sql_parse.cc:4895: int mysql_execute_command(THD*): Assertion `!thd->in_active_multi_stmt_transaction() || thd->in_multi_stmt_transaction_mode()' failed.

Bug #1244667 reported by Teemu Ollakka
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MySQL patches by Codership
Status tracked in 5.6
5.5
Fix Released
Medium
Teemu Ollakka
5.6
Fix Released
Medium
Teemu Ollakka
Percona XtraDB Cluster moved to https://jira.percona.com/projects/PXC
Status tracked in 5.6
5.5
Fix Released
Undecided
Unassigned
5.6
Fix Released
Undecided
Unassigned

Bug Description

Multimaster sqlgen load causes

131025 16:35:37 [Note] WSREP: thd 2962 seqno 80940 BF aborted by provider, will replay
131025 16:35:37 [Note] WSREP: replaying increased: 1, thd: 2962
131025 16:35:37 [Note] WSREP: commit failed for reason: 4
131025 16:35:37 [Note] WSREP: conflict state: 4
131025 16:35:37 [Note] WSREP: COMMIT failed, MDL released: 2962
131025 16:35:37 [Note] WSREP: replay trx: COMMIT 80940
131025 16:35:37 [Note] WSREP: replay failed, rolling back
131025 16:35:37 [Note] WSREP: replaying decreased: 0, thd: 2962
131025 16:35:37 [Note] WSREP: BF Aborted, thd: 2962 is_AC: 0, retry: 0 - 1 SQL: COMMIT
131025 16:35:37 [Note] WSREP: wsrep retrying AC query: UPDATE comm03 SET x = (x + 1) % 65537, y = ((y*x % 65537) + (58749*y % 65537) + (y*z % 65537)) % 65537, z = ((z*x % 65537) + (z*y % 65537) + (58749*z % 65537)) % 65537, r = RAND() WHERE p = 2
mysqld: /home/teemu/codership/galera/bzr/codership-mysql/5.5/sql/sql_parse.cc:4895: int mysql_execute_command(THD*): Assertion `!thd->in_active_multi_stmt_transaction() || thd->in_multi_stmt_transaction_mode()' failed.

if wsrep_retry_autocommit=1.

Full backtrace:

(gdb) bt
#0 __pthread_kill (threadid=<optimized out>, signo=<optimized out>) at ../nptl/sysdeps/unix/sysv/linux/pthread_kill.c:63
#1 0x0000000000808028 in my_write_core (sig=6) at /home/teemu/codership/galera/bzr/codership-mysql/5.5/mysys/stacktrace.c:433
#2 0x00000000006cbb35 in handle_fatal_signal (sig=6)
    at /home/teemu/codership/galera/bzr/codership-mysql/5.5/sql/signal_handler.cc:247
#3 <signal handler called>
#4 0x00007fb5c52c8425 in __GI_raise (sig=<optimized out>) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
#5 0x00007fb5c52cbb8b in __GI_abort () at abort.c:91
#6 0x00007fb5c52c10ee in __assert_fail_base (fmt=<optimized out>,
    assertion=0xa90a58 "!thd->in_active_multi_stmt_transaction() || thd->in_multi_stmt_transaction_mode()",
    file=0xa90378 "/home/teemu/codership/galera/bzr/codership-mysql/5.5/sql/sql_parse.cc", line=<optimized out>,
    function=<optimized out>) at assert.c:94
#7 0x00007fb5c52c1192 in __GI___assert_fail (
    assertion=0xa90a58 "!thd->in_active_multi_stmt_transaction() || thd->in_multi_stmt_transaction_mode()",
    file=0xa90378 "/home/teemu/codership/galera/bzr/codership-mysql/5.5/sql/sql_parse.cc", line=4895,
    function=0xa91400 "int mysql_execute_command(THD*)") at assert.c:103
#8 0x00000000005a6956 in mysql_execute_command (thd=0x33a3c00)
    at /home/teemu/codership/galera/bzr/codership-mysql/5.5/sql/sql_parse.cc:4894
#9 0x00000000005a903b in mysql_parse (thd=0x33a3c00,
    rawbuf=0x7fb56401ab70 "UPDATE comm00 SET x = (x + 1) % 65537, y = ((y*x % 65537) + (9301*y % 65537) + (y*z % 65537)) % 65537, z = ((z*x % 65537) + (z*y % 65537) + (9301*z % 65537)) % 65537, r = RAND() WHERE r > 0.412359 AND"...,
    length=<optimized out>, parser_state=0x7fb596a99130)
    at /home/teemu/codership/galera/bzr/codership-mysql/5.5/sql/sql_parse.cc:6180
#10 0x00000000005a9291 in wsrep_mysql_parse (thd=0x33a3c00,
    rawbuf=0x7fb56401ab70 "UPDATE comm00 SET x = (x + 1) % 65537, y = ((y*x % 65537) + (9301*y % 65537) + (y*z % 65537)) % 65537, z = ((z*x % 65537) + (z*y % 65537) + (9301*z % 65537)) % 65537, r = RAND() WHERE r > 0.412359 AND"..., length=213,
    parser_state=0x7fb596a99130) at /home/teemu/codership/galera/bzr/codership-mysql/5.5/sql/sql_parse.cc:6012
#11 0x00000000005aa8f9 in dispatch_command (command=COM_QUERY, thd=0x33a3c00,
    packet=0x337b371 "UPDATE comm00 SET x = (x + 1) % 65537, y = ((y*x % 65537) + (9301*y % 65537) + (y*z % 65537)) % 65537, z = ((z*x % 65537) + (z*y % 65537) + (9301*z % 65537)) % 65537, r = RAND() WHERE r > 0.412359 AND"...,
    packet_length=<optimized out>) at /home/teemu/codership/galera/bzr/codership-mysql/5.5/sql/sql_parse.cc:1203
#12 0x00000000005acb71 in do_command (thd=0x33a3c00)
    at /home/teemu/codership/galera/bzr/codership-mysql/5.5/sql/sql_parse.cc:858
#13 0x0000000000655581 in do_handle_one_connection (thd_arg=<optimized out>)
    at /home/teemu/codership/galera/bzr/codership-mysql/5.5/sql/sql_connect.cc:887
#14 0x000000000065573d in handle_one_connection (arg=0x33a3c00)
    at /home/teemu/codership/galera/bzr/codership-mysql/5.5/sql/sql_connect.cc:799
#15 0x00007fb5c628de9a in start_thread (arg=0x7fb596a9a700) at pthread_create.c:308
#16 0x00007fb5c5385ccd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#17 0x0000000000000000 in ?? ()

description: updated
Revision history for this message
Teemu Ollakka (teemu-ollakka) wrote :

Possible reason for this is that thd->server_status is not saved to shadow before replay.

Revision history for this message
Teemu Ollakka (teemu-ollakka) wrote :
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/PXC-1492

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

Other bug subscribers

Remote bug watches

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