Bug #20151 Slave instance crashed during exection of SP
Submitted: 30 May 2006 16:43 Modified: 9 Jun 2008 16:27
Reporter: Alexey Stroganov Email Updates:
Status: No Feedback Impact on me:
Category:MySQL Server: Row Based Replication ( RBR ) Severity:S2 (Serious)
Version:5.1.12pre OS:Any (All)
Assigned to: Assigned Account CPU Architecture:Any
Tags: assert

[30 May 2006 16:43] Alexey Stroganov
Slave instance of mysql server crashes on assertion below during simultaneously execution of following of SP by several threads.(5 at least).

from slave.err:
mysqld: log_event.cc:5407: virtual int Rows_log_event::exec_event(st_relay_log_info*): Assertion `rli->tables_to_
lock == __null && rli->tables_to_lock_count == 0' failed.
mysqld got signal 6;

SP from test case:
CREATE PROCEDURE test.viewer_sp()
   DECLARE ins_count INT DEFAULT 100;
   DELETE FROM test.viewer_tbl2;
   WHILE ins_count > 0 DO
     IF (!@RPL_SYS_SBR)
       INSERT INTO test.viewer_tbl1 VALUES (NULL,RAND() * 10, RAND() * 100);
     END IF;
     SET ins_count = ins_count - 1;
   INSERT INTO test.viewer_tbl2 SELECT * FROM test.viewer;

I am working on reducing of test case.

Backtrace from slave core for debug version of server:

(gdb) bt
#0  0xffffe410 in ?? ()
#1  0x403b4de4 in ?? ()
#2  0x00000006 in ?? ()
#3  0x00004a73 in ?? ()
#4  0x4003e838 in pthread_kill () from /lib/tls/libpthread.so.0
#5  0x082d6264 in write_core (sig=6) at stacktrace.c:220
#6  0x08196da2 in handle_segfault (sig=6) at mysqld.cc:2168
#7  <signal handler called>
#8  0xffffe410 in ?? ()
#9  0x403b511c in ?? ()
#10 0x00000006 in ?? ()
#11 0x00004a73 in ?? ()
#12 0x400da2c1 in raise () from /lib/tls/libc.so.6
#13 0x400dbb75 in abort () from /lib/tls/libc.so.6
#14 0x400d3903 in __assert_fail () from /lib/tls/libc.so.6
#15 0x0823f5f4 in Rows_log_event::exec_event (this=0x86561b0, rli=0x863182c) at log_event.cc:5407
#16 0x082c4102 in exec_relay_log_event (thd=0x865c3a8, rli=0x863182c) at slave.cc:3057
#17 0x082c555b in handle_slave_sql (arg=0x86309d0) at slave.cc:3599
#18 0x4003baa7 in start_thread () from /lib/tls/libpthread.so.0
#19 0x4016cc2e in clone () from /lib/tls/libc.so.6

How to repeat:
I will provide more details soon when test case will be reduced.
[9 May 2008 16:27] MySQL Verification Team
Hi Alexey,
Could you please provide the complete test case (create tables, view? statements).
Thanks in advance.
[9 Jun 2008 23:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".