Crash with 5.5 UNIV_DEBUG with load data infile | Crash with 5.5 UNIV_DEBUG with load data infile | Failing assertion: xid_seqno > trx_sys_cur_xid_seqno

Bug #1282034 reported by Raghavendra D Prabhu
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MySQL patches by Codership
Status tracked in 5.6
5.5
New
Undecided
Unassigned
5.6
New
Undecided
Unassigned
Percona XtraDB Cluster moved to https://jira.percona.com/projects/PXC
Status tracked in 5.6
5.5
Won't Fix
Critical
Unassigned
5.6
Incomplete
Critical
Unassigned
summary: - Crash with 5.5 UNIV_DEBUG with load data infile
+ Crash with 5.5 UNIV_DEBUG with load data infile | Crash with 5.5
+ UNIV_DEBUG with load data infile | Failing assertion: xid_seqno >
+ trx_sys_cur_xid_seqno
Revision history for this message
Raghavendra D Prabhu (raghavendra-prabhu) wrote :
Download full text (4.4 KiB)

Pasting the full bt from ubuntu pastebin here (in case

#0 0x00007f937a5abf0c in __pthread_kill (threadid=<optimized out>,
    signo=signo@entry=6) at ../nptl/sysdeps/unix/sysv/linux/pthread_kill.c:62
#1 0x0000000000804b08 in my_write_core (sig=6)
    at /home/teemu/work/bzr/codership-mysql/5.5/mysys/stacktrace.c:433
#2 0x00000000006c388e in handle_fatal_signal (sig=6)
    at /home/teemu/work/bzr/codership-mysql/5.5/sql/signal_handler.cc:247
#3 <signal handler called>
#4 0x00007f93795cbf77 in __GI_raise (sig=sig@entry=6)
    at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#5 0x00007f93795cf5e8 in __GI_abort () at abort.c:90
#6 0x00000000008dfdce in trx_sys_update_wsrep_checkpoint (
    xid=xid@entry=0x7f932800f5e8,
    sys_header=sys_header@entry=0x7f9354a98026 "",
    mtr=mtr@entry=0x7f9368556a60)
    at /home/teemu/work/bzr/codership-mysql/5.5/storage/innobase/trx/trx0sys.c:837
#7 0x00000000008e3510 in trx_write_serialisation_history (
    trx=trx@entry=0x7f932800f538)
    at /home/teemu/work/bzr/codership-mysql/5.5/storage/innobase/trx/trx0trx.c:886
#8 0x00000000008e4dc0 in trx_commit_off_kernel (trx=trx@entry=0x7f932800f538)
    at /home/teemu/work/bzr/codership-mysql/5.5/storage/innobase/trx/trx0trx.c:953
#9 0x00000000008e692b in trx_commit_for_mysql (trx=0x7f932800f538)
    at /home/teemu/work/bzr/codership-mysql/5.5/storage/innobase/trx/trx0trx.c:1716
#10 0x000000000085910b in innobase_commit_low (trx=trx@entry=0x7f932800f538)
    at /home/teemu/work/bzr/codership-mysql/5.5/storage/innobase/handler/ha_innodb.cc:2763
#11 0x0000000000862658 in innobase_commit (hton=<optimized out>, thd=
    0x1e17bb0, all=<optimized out>)
    at /home/teemu/work/bzr/codership-mysql/5.5/storage/innobase/handler/ha_innodb.cc:2914
#12 0x00000000006c6746 in ha_commit_one_phase (thd=thd@entry=0x1e17bb0,
    all=all@entry=true)
    at /home/teemu/work/bzr/codership-mysql/5.5/sql/handler.cc:1436
#13 0x00000000006c72c1 in ha_commit_trans (thd=thd@entry=0x1e17bb0,
    all=all@entry=true)
    at /home/teemu/work/bzr/codership-mysql/5.5/sql/handler.cc:1359
#14 0x00000000006587c9 in trans_commit (thd=thd@entry=0x1e17bb0)
    at /home/teemu/work/bzr/codership-mysql/5.5/sql/transaction.cc:199
#15 0x000000000065a7e6 in fix_autocommit (self=<optimized out>, thd=0x1e17bb0,
    type=<optimized out>)
    at /home/teemu/work/bzr/codership-mysql/5.5/sql/sys_vars.cc:2375
#16 0x00000000005201d8 in sys_var::update (this=0x114b880 <Sys_autocommit>,
    thd=0x1e17bb0, var=0x7f9328000dd8)
    at /home/teemu/work/bzr/codership-mysql/5.5/sql/set_var.cc:205
#17 0x00000000005204e1 in set_var::update (this=<optimized out>,
    thd=<optimized out>)
    at /home/teemu/work/bzr/codership-mysql/5.5/sql/set_var.cc:668
#18 0x0000000000520d6a in sql_set_variables (thd=thd@entry=0x1e17bb0,
    var_list=var_list@entry=0x1e1a330)
    at /home/teemu/work/bzr/codership-mysql/5.5/sql/set_var.cc:571
#19 0x0000000000597549 in mysql_execute_command (thd=thd@entry=0x1e17bb0)
    at /home/teemu/work/bzr/codership-mysql/5.5/sql/sql_parse.cc:3547
#20 0x000000000059c737 in mysql_parse (thd=thd@entry=0x1e17bb0,
    rawbuf=rawbuf@entry=0x7f9328000ca0 "SET autocommit=1",
    length=length...

Read more...

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

Managed to crash lp:codership-mysql/5.6 with grammar from http://bazaar.launchpad.net/~teemu-ollakka/randgen/randgen_gc/view/head:/conf/galera/galera_stress-56.yy . LOAD DATA is not involved, but I suppose that the reason for the crash may be the same.

Function wsrep_run_wsrep_commit() in wsrep_hton.cc overrides thd->transaction.xid_state.xid if it has MySQLXid prefix:

    /* Override XID iff it was generated by mysql */
    if (thd->transaction.xid_state.xid.get_my_xid())
    {
      wsrep_xid_init(&thd->transaction.xid_state.xid,
                     &thd->wsrep_trx_meta.gtid.uuid,
                     thd->wsrep_trx_meta.gtid.seqno);
    }

If thd->transaction.xid_state.xid is not reset after previous commit for some reason and XID remain with WSREPXid prefix, it is not overridden here at commit time and old XID is used in InnoDB commit leading to assertion.

Overriding XID here also in case of WSREPXid prefix would avoid the crash. However, warning message or DBUG_ASSERT should be added somewhere to make sure that situations where thd->transaction.xid_state.xid reset is skipped between transactions are caught.

Revision history for this message
Krunal Bauskar (krunal-bauskar) wrote :

Can you please try this out with latest 5.6.

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-928

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.