Hi,
Thanks for the help, I do not seem to be able to run with that
--debug=d,*:t:i
setup, it does not seem to progress. But, I attached a debugger to
node0 mysqld and set up a breakpoint on savepoint set and
rollback, I see at set:
#1 0x000000000086c981 in ha_savepoint (thd=0x41b9d40,
sv=0x7f0ac4007328) at
/home/jan/mysql/galera-10.0/sql/handler.cc:2065
(gdb) graph display *trans
(gdb) p *sv
$4 = {prev = 0xa5a5a5a5a5a5a5a5, name = 0x7f0ac4007390 "A", length
= 1, ha_list = 0xa5a5a5a5a5a5a5a5, mdl_savepoint = {m_stmt_ticket
= 0xa5a5a5a5a5a5a5a5, m_trans_ticket = 0xa5a5a5a5a5a5a5a5}}
and in
static int binlog_savepoint_set(handlerton *hton, THD *thd, void
*sv)
{
DBUG_ENTER("binlog_savepoint_set");
int error= 1;
char buf[1024];
#ifdef WITH_WSREP
if (wsrep_emulate_bin_log) DBUG_RETURN(0);
#endif /* WITH_WSREP */
wsrep_emulate_bin_log = 1, thus no savepoint is written to bin log
and continue in debugger we get
#1 0x000000000086c6fe in ha_rollback_to_savepoint (thd=0x47c7d40,
sv=0x7fe364007328) at
/home/jan/mysql/galera-10.0/sql/handler.cc:2009
(gdb) print *sv
$2 = {prev = 0x0, name = 0x7fe364007390 "A", length = 1, ha_list =
0x47c9ba0, mdl_savepoint = {m_stmt_ticket = 0x0, m_trans_ticket =
0x7fe36405b1e0}}
where mdl_savepoint.m_trans_ticket
(gdb) p *sv->mdl_savepoint.m_trans_ticket
$5 = {<MDL_wait_for_subgraph> = {_vptr.MDL_wait_for_subgraph
= 0x16ce390 <vtable for MDL_ticket+16>}, next_in_context =
0x7fe36405aec0, prev_in_context = 0x47c7f30, next_in_lock = 0x0,
prev_in_lock = 0x7fe364059298, m_type = MDL_SHARED_WRITE,
m_duration = MDL_TRANSACTION, m_ctx = 0x47c7e38, m_lock =
0x4659000}
(gdb) p sv
$6 = (SAVEPOINT *) 0x7fe364007328
(gdb) p ht
$7 = (handlerton *) 0x3aa1fb0
(gdb) p ht->savepoint_offset
This I can't understand:
if ((err= ht->savepoint_rollback(ht, thd,
(uchar
*)(sv+1)+ht->savepoint_offset)))
there
(gdb) p ht->savepoint_offset
$8 = 0
and
$9 = (SAVEPOINT *) 0x7fe364007358
(gdb) p *(sv+1)
$10 = {prev = 0xa5a5a5a5a5a5a5a5, name = 0xa5a5a5a5a5a5a5a5
<Address 0xa5a5a5a5a5a5a5a5 out of bounds>, length =
2779096485, ha_list = 0xa5a5a5a5a5a5a5a5, mdl_savepoint =
{m_stmt_ticket = 0xa5a5a5a5a5a5a5a5, m_trans_ticket =
0xa5a5a5a5a5a5a5a5}}
Ok, so I analysed things and found something.
The direct cause of the assert is that reinit_io_cache() fails, as seen in the
logs:
reinit_io_cache: enter: cache: 0x3cee63b0 type: 2 seek_offset: 0 clear_cache: 0
my_b_flush_io_cache: enter: cache: 0x3cee63b0
my_seek: my: fd: 58 Pos: 11936128518282651045 Whence: 0 MyFlags: 16
my_error: my: nr: 33 MyFlags: 0 errno: 22
my_message_sql: error: error: 33 message: 'Can't seek in file '/home/jan/mysql/galera-test/node0/tmp/ML7E3rnl' (Errcode: 22 "Invalid argument")' Flag: 0
my_seek: error: lseek: 18446744073709551615 errno: 22
Error handling is missing when the binlog code calls reinit_io_cache(), so the
error is ignored, and it proceeds to trigger the assertion in reset() as the
reinit_io_cache() did not complete.
Should I do a bug report to you or can
this handled in some other MDEV ?
R:
--
Jan Lindström
Principal Engineer
MariaDB | MaxScale | skype: jan_p_lindstrom
www.skysql.com