Re: [Maria-developers] Galera-10.0 still does not work with rollbacks

2013-09-27 Thread Jan Lindström
Hi, I think I solved this issue by #ifdef WITH_WSREP if (!wsrep_emulate_bin_log)     binlog_trans_log_truncate(thd, *(my_off_t*)sv); #endif This avoids using the uninitialized memory in Galera, this was error in merge.

Re: [Maria-developers] Galera-10.0 still does not work with rollbacks

2013-09-27 Thread Kristian Nielsen
seppo.jaak...@codership.com writes: > Did I understand it right that the problem is with "ROLLBACK TO > SAVEPOINT...", where the designated savepoint does not exist? Did you No. It is a very simple issue. The beginning of binlog_savepoint_set() reads: #ifdef WITH_WSREP if (wsrep_emula

Re: [Maria-developers] Galera-10.0 still does not work with rollbacks

2013-09-27 Thread seppo . jaakola
Quoting Kristian Nielsen : Jan Lindström writes: The point I do not understant is at ha_savepoint we have again: if ((err= ht->savepoint_set(ht, thd, (uchar *)(sv+1)+ht->savepoint_offset))) (gdb) p *sv $3 = {prev = 0xa5a5a5a5a5a5a5a5, name = 0x7f505c007390 "A", length = 1, ha_list = 0x

Re: [Maria-developers] Galera-10.0 still does not work with rollbacks

2013-09-27 Thread seppo . jaakola
Quoting Jan Lindström : Seppo, Hi, What means: 30925 15:10:36 [ERROR] Slave SQL: Could not execute Update_rows event on table test.table10_key_pk_parts_2_int_autoinc; Can't find record in 'table10_key_pk_parts_2_int_autoinc', Error_code: 1032; handler error HA_ERR_KEY_NOT_FOUND; the ev

Re: [Maria-developers] Galera-10.0 still does not work with rollbacks

2013-09-25 Thread Kristian Nielsen
Kristian Nielsen writes: >> if ((err= ht->savepoint_set(ht, thd, (uchar *)(sv+1)+ht->savepoint_offset))) > Note that it is not "sv+1". It is ((uchar *)sv+1) + ht->savepoint_offset. Sorry, I messed up that explanation. The point is: sv points to a SAVEPOINT object. But (uchar *)(sv+1) does not

Re: [Maria-developers] Galera-10.0 still does not work with rollbacks

2013-09-25 Thread Jan Lindström
Seppo, Hi, What means: 30925 15:10:36 [ERROR] Slave SQL: Could not execute Update_rows event on table test.table10_key_pk_parts_2_int_autoinc; Can't find record in 'table10_key_pk_parts_2_int_autoinc', Error_code: 1032; handler err

Re: [Maria-developers] Galera-10.0 still does not work with rollbacks

2013-09-25 Thread Kristian Nielsen
Jan Lindström writes: > The point I do not understant is at ha_savepoint > > we have again: > > if ((err= ht->savepoint_set(ht, thd, (uchar *)(sv+1)+ht->savepoint_offset))) > > (gdb) p *sv > $3 = {prev = 0xa5a5a5a5a5a5a5a5, name = 0x7f505c007390 "A", length = 1, > ha_list > = 0xa5a5a5a5a5a5a5a5,

Re: [Maria-developers] Galera-10.0 still does not work with rollbacks

2013-09-25 Thread Jan Lindström
Hi, The point I do not understant is at ha_savepoint we have again: if ((err= ht->savepoint_set(ht, thd, (uchar *)(sv+1)+ht->savepoint_offset))) (gdb) p *sv $3 = {prev = 0xa5a5a5a5a5a5a5a5, name = 0x7f505c007390 "A", length

Re: [Maria-developers] Galera-10.0 still does not work with rollbacks

2013-09-25 Thread Kristian Nielsen
Jan Lindström writes: > static int binlog_savepoint_set(handlerton *hton, THD *thd, void *sv) > { > #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 Ah, I missed that. Right, then I

Re: [Maria-developers] Galera-10.0 still does not work with rollbacks

2013-09-25 Thread Jan Lindström
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  0

Re: [Maria-developers] Galera-10.0 still does not work with rollbacks

2013-09-24 Thread Kristian Nielsen
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: 1193612851828

Re: [Maria-developers] Galera-10.0 still does not work with rollbacks

2013-09-24 Thread Kristian Nielsen
Jan Lindström writes: > Full unedited log using --valgrind and --mysqld=--debug=+d at location: > https:/ > /www.dropbox.com/s/dcufp7l1cch8dfs/mysql.err.gz Ok, thanks. Hm, this log looks different from what I am used to seeing when I use mysql-test-run.pl --debug. From looking at the mysql-tes

Re: [Maria-developers] Galera-10.0 still does not work with rollbacks

2013-09-23 Thread Jan Lindström
Hi, Full unedited log using --valgrind and --mysqld=--debug=+d at location: https://www.dropbox.com/s/dcufp7l1cch8dfs/mysql.err.gz In below lines I have: static int binlog_commit(handlerton *hton, THD *thd, bool all) {   int error=

Re: [Maria-developers] Galera-10.0 still does not work with rollbacks

2013-09-21 Thread Alex Yurchenko
On 2013-09-20 15:51, Kristian Nielsen wrote: Jan Lindström writes: Correct log file attached. ==00:00:02:33.708 25289== Use of uninitialised value of size 8 ==00:00:02:33.708 25289==at 0x5EF865B: _itoa_word (_itoa.c:179) ==00:00:02:33.708 25289==by 0x5EFCB91: vfprintf (vfprintf.c:16

Re: [Maria-developers] Galera-10.0 still does not work with rollbacks

2013-09-20 Thread Kristian Nielsen
Jan Lindström writes: > Correct log file attached. > ==00:00:02:33.708 25289== Use of uninitialised value of size 8 > ==00:00:02:33.708 25289==at 0x5EF865B: _itoa_word (_itoa.c:179) > ==00:00:02:33.708 25289==by 0x5EFCB91: vfprintf (vfprintf.c:1654) > ==00:00:02:33.708 25289==by 0x5F

Re: [Maria-developers] Galera-10.0 still does not work with rollbacks

2013-09-20 Thread Kristian Nielsen
Jan Lindström writes: > Yes, I did run using valgrind, while it reported some uninitialized variables, > not really any memory corruptions.  Attached, the log from node0. Similarly, Well, uninitialised variables are exactly what I would expect could lead to things looking like you have shown so

Re: [Maria-developers] Galera-10.0 still does not work with rollbacks

2013-09-19 Thread Jan Lindström
Hi, Indeed. This strongly suggests that some memory corruption, or access of uninitialised memory, is happening. Did you manage to repeat it with Valgrind? If the problem is memory corruption, it is really hard to tell the origin of the problem from the informatio

Re: [Maria-developers] Galera-10.0 still does not work with rollbacks

2013-09-19 Thread Kristian Nielsen
Jan Lindström writes: > I need help. After merge galera-10.0 with 10.0, rollback asserts. I seem not > to > be able to find the actual reason. I added some extra output on log.cc to dump > out the cache_log data from both trx_cache and stmt_cache, but to me these > values do not really mean anyt

[Maria-developers] Galera-10.0 still does not work with rollbacks

2013-09-18 Thread Jan Lindström
Hi, I need help. After merge galera-10.0 with 10.0, rollback asserts. I seem not to be able to find the actual reason. I added some extra output on log.cc to dump out the cache_log data from both trx_cache and stmt_cache, but to me these values do not reall