This is similar to bug 1607359 / bug 1606782 / https://bugs.mysql.com/bug.php?id=58754: setting DEBUG while there are concurrent readers (in this case binlog dump thread) may crash the server.
PS 5.5 trunk:
rpl.rpl_bug58546 'stmt' w1 [ fail ]
Test ended at 2016-08-12 14:13:01
CURRENT_TEST: rpl.rpl_bug58546
mysqltest: In included file "./include/rpl_end.inc":
included from ./include/rpl_end.inc at line 77:
At line 77: query 'let $_tmp= query_get_value(SHOW SLAVE STATUS, Master_Host, 1)' failed: 2013: Lost connection to MySQL server during query
The result from queries just before the failure was:
< snip >
BEGIN;
INSERT INTO t1 VALUES(2, 2);
INSERT INTO t2 VALUES(1);
UPDATE t1 SET c2 = 3 WHERE c1 = 1;
COMMIT;
[connection slave1]
STOP SLAVE;
[connection slave]
ROLLBACK;
[connection master]
SET DEBUG_SYNC= 'now SIGNAL signal.continue';
SET DEBUG_SYNC= 'RESET';
[connection slave]
include/wait_for_slave_to_stop.inc
[connection slave1]
include/start_slave.inc
[connection master]
DROP TABLE t1, t2;
SET GLOBAL debug= $debug_save;
include/rpl_end.inc
...
Program terminated with signal SIGSEGV, Segmentation fault.
#0 __pthread_kill (threadid=<optimized out>, signo=signo@entry=11) at ../sysdeps/unix/sysv/linux/pthread_kill.c:62
62 ../sysdeps/unix/sysv/linux/pthread_kill.c: No such file or directory.
[Current thread is 1 (Thread 0x7fec484b9700 (LWP 4272))]
#0 __pthread_kill (threadid=<optimized out>, signo=signo@entry=11) at ../sysdeps/unix/sysv/linux/pthread_kill.c:62
#1 0x0000000000807c63 in my_write_core (sig=sig@entry=11) at /mnt/workspace/percona-server-5.5-trunk/BUILD_TYPE/debug/Host/ubuntu-xenial-64bit/mysys/stacktrace.c:433
#2 0x00000000006c558f in handle_fatal_signal (sig=11) at /mnt/workspace/percona-server-5.5-trunk/BUILD_TYPE/debug/Host/ubuntu-xenial-64bit/sql/signal_handler.cc:250
#3 <signal handler called>
#4 internal_fnmatch (pattern=<optimized out>, string=string@entry=0xae2550 "warning", string_end=0xae2557 "", no_leading_period=no_leading_period@entry=0, flags=flags@entry=0, ends=ends@entry=0x0, alloca_used=0) at fnmatch_loop.c:56
#5 0x00007fec4aae8b7d in __fnmatch (pattern=pattern@entry=0xa <error: Cannot access memory at address 0xa>, string=string@entry=0xae2550 "warning", flags=flags@entry=0) at fnmatch.c:451
#6 0x0000000000a7ebde in InList (linkp=0x1, cp=cp@entry=0xae2550 "warning") at /mnt/workspace/percona-server-5.5-trunk/BUILD_TYPE/debug/Host/ubuntu-xenial-64bit/dbug/dbug.c:1502
#7 0x0000000000a8007e in _db_keyword_ (cs=cs@entry=0x7fec0c000a10, keyword=0xae2550 "warning", strict=65538, strict@entry=0) at /mnt/workspace/percona-server-5.5-trunk/BUILD_TYPE/debug/Host/ubuntu-xenial-64bit/dbug/dbug.c:1719
#8 0x0000000000a8015b in _db_doprnt_ (format=format@entry=0xb65eb8 "Read only %d bytes off %lu from %d, errno: %d") at /mnt/workspace/percona-server-5.5-trunk/BUILD_TYPE/debug/Host/ubuntu-xenial-64bit/dbug/dbug.c:1263
#9 0x0000000000803f06 in my_read (Filedes=Filedes@entry=60, Buffer=Buffer@entry=0x7fec0c007d10 "\254\021\256W\002\001", Count=Count@entry=7072, MyFlags=MyFlags@entry=16) at /mnt/workspace/percona-server-5.5-trunk/BUILD_TYPE/debug/Host/ubuntu-xenial-64bit/mysys/my_read.c:66
#10 0x00000000007ec87d in inline_mysql_file_read (flags=16, count=7072, buffer=0x7fec0c007d10 "\254\021\256W\002\001", file=60, src_line=563, src_file=0xb60c40 "/mnt/workspace/percona-server-5.5-trunk/BUILD_TYPE/debug/Host/ubuntu-xenial-64bit/mysys/mf_iocache.c") at /mnt/workspace/percona-server-5.5-trunk/BUILD_TYPE/debug/Host/ubuntu-xenial-64bit/include/mysql/psi/mysql_file.h:1144
#11 _my_b_read (info=0x7fec484b7a10, Buffer=0x7fec484b7830 "\200xKH\354\177", Count=19) at /mnt/workspace/percona-server-5.5-trunk/BUILD_TYPE/debug/Host/ubuntu-xenial-64bit/mysys/mf_iocache.c:562
#12 0x000000000076cf18 in Log_event::read_log_event (file=file@entry=0x7fec484b7a10, packet=packet@entry=0x1fb7a60, log_lock=log_lock@entry=0x0, log_file_name_arg=log_file_name_arg@entry=0x0, is_binlog_active=is_binlog_active@entry=0x0) at /mnt/workspace/percona-server-5.5-trunk/BUILD_TYPE/debug/Host/ubuntu-xenial-64bit/sql/log_event.cc:1049
#13 0x00000000005bbefd in mysql_binlog_send (thd=thd@entry=0x1fb73d0, log_ident=0x7fec0c004c30 "master-bin.000001", pos=<optimized out>, pos@entry=1011, flags=flags@entry=0) at /mnt/workspace/percona-server-5.5-trunk/BUILD_TYPE/debug/Host/ubuntu-xenial-64bit/sql/sql_repl.cc:834
#14 0x00000000005a441e in dispatch_command (command=command@entry=COM_BINLOG_DUMP, thd=thd@entry=0x1fb73d0, packet=packet@entry=0x1fba6f1 "", packet_length=packet_length@entry=27) at /mnt/workspace/percona-server-5.5-trunk/BUILD_TYPE/debug/Host/ubuntu-xenial-64bit/sql/sql_parse.cc:1272
#15 0x00000000005a5745 in do_command (thd=0x1fb73d0) at /mnt/workspace/percona-server-5.5-trunk/BUILD_TYPE/debug/Host/ubuntu-xenial-64bit/sql/sql_parse.cc:789
#16 0x000000000065a0f9 in do_handle_one_connection (thd_arg=thd_arg@entry=0x1fb73d0) at /mnt/workspace/percona-server-5.5-trunk/BUILD_TYPE/debug/Host/ubuntu-xenial-64bit/sql/sql_connect.cc:1418
#17 0x000000000065a1f6 in handle_one_connection (arg=arg@entry=0x1fb73d0) at /mnt/workspace/percona-server-5.5-trunk/BUILD_TYPE/debug/Host/ubuntu-xenial-64bit/sql/sql_connect.cc:1325
#18 0x0000000000a68b34 in pfs_spawn_thread (arg=0x1f6eba0) at /mnt/workspace/percona-server-5.5-trunk/BUILD_TYPE/debug/Host/ubuntu-xenial-64bit/storage/perfschema/pfs.cc:1015
#19 0x00007fec4bf6f6fa in start_thread (arg=0x7fec484b9700) at pthread_create.c:333
#20 0x00007fec4ab1ab5d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109
rpl.rpl_bug58546 'stmt' w3 [ fail ]
Test ended at 2016-08-18 07:27:35
CURRENT_TEST: rpl.rpl_bug58546 rpl_end. inc": rpl_end. inc at line 77: value(SHOW SLAVE STATUS, Master_Host, 1)' failed: 2013: Lost connection to MySQL server during query 64-linux- gnu/libthread_ db.so.1" . /percona- server- 5.5-trunk/ BUILD_TYPE/ debug/Host/ ubuntu- wily-64bit' . <optimized out>, signo=signo@ entry=11) at ../sysdeps/ unix/sysv/ linux/pthread_ kill.c: 62 unix/sysv/ linux/pthread_ kill.c: No such file or directory. <optimized out>, signo=signo@ entry=11) at ../sysdeps/ unix/sysv/ linux/pthread_ kill.c: 62 percona- server- 5.5-trunk/ BUILD_TYPE/ debug/Host/ ubuntu- wily-64bit/ mysys/stacktrac e.c:433 percona- server- 5.5-trunk/ BUILD_TYPE/ debug/Host/ ubuntu- wily-64bit/ sql/signal_ handler. cc:250 string@ entry=0xb31dd4 "error", string_end=0xb31dd9 "", no_leading_ period= no_leading_ period@ entry=0, flags=flags@ entry=0, ends=ends@ entry=0x0, alloca_used=0) at fnmatch_loop.c:62 pattern@ entry=0x1000000 0b <error: Cannot access memory at address 0x10000000b>, string= string@ entry=0xb31dd4 "error", flags=flags@ entry=0) at fnmatch.c:458 0xb31dd4 "error") at /mnt/workspace/ percona- server- 5.5-trunk/ BUILD_TYPE/ debug/Host/ ubuntu- wily-64bit/ dbug/dbug. c:1502 entry=0x7f54e40 00a10, keyword=0xb31dd4 "error", strict=65538, strict@entry=0) at /mnt/workspace/ percona- server- 5.5-trunk/ BUILD_TYPE/ debug/Host/ ubuntu- wily-64bit/ dbug/dbug. c:1719 format@ entry=0xb4d5c3 "file->error: %d") at /mnt/workspace/ percona- server- 5.5-trunk/ BUILD_TYPE/ debug/Host/ ubuntu- wily-64bit/ dbug/dbug. c:1263 :read_log_ event (file=file@ entry=0x7f55189 3ea10, packet= packet@ entry=0x239e8c0 , log_lock= log_lock@ entry=0x11af608 <mysql_bin_log+8>, log_file_ name_arg= log_file_ name_arg@ entry=0x7f55189 3eb70 "./master- bin.000001" , is_binlog_ active= is_binlog_ active@ entry=0x7f55189 3e97f) at /mnt/workspace/ percona- server- 5.5-trunk/ BUILD_TYPE/ debug/Host/ ubuntu- wily-64bit/ sql/log_ event.cc: 1056 entry=0x239e230 , log_ident= 0x7f54e4011b40 "master- bin.000001" , pos=<optimized out>, pos@entry=4, flags=flags@ entry=0) at /mnt/workspace/ percona- server- 5.5-trunk/ BUILD_TYPE/ debug/Host/ ubuntu- wily-64bit/ sql/sql_ repl.cc: 683 command@ entry=COM_ BINLOG_ DUMP, thd=thd@ entry=0x239e230 , p...
mysqltest: In included file "./include/
included from ./include/
At line 77: query 'let $_tmp= query_get_
...
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_
Core was generated by `/mnt/workspace
Program terminated with signal SIGSEGV, Segmentation fault.
#0 __pthread_kill (threadid=
62 ../sysdeps/
[Current thread is 1 (Thread 0x7f5518940700 (LWP 10867))]
#0 __pthread_kill (threadid=
#1 0x0000000000806131 in my_write_core (sig=sig@entry=11) at /mnt/workspace/
#2 0x00000000006c3a87 in handle_fatal_signal (sig=11) at /mnt/workspace/
#3 <signal handler called>
#4 internal_fnmatch (pattern=<optimized out>, string=
#5 0x00007f551c13324d in __fnmatch (pattern=
#6 0x0000000000a7d0b8 in InList (linkp=0x100000002, cp=cp@entry=
#7 0x0000000000a7e558 in _db_keyword_ (cs=cs@
#8 0x0000000000a7e635 in _db_doprnt_ (format=
#9 0x000000000076b42c in Log_event:
#10 0x00000000005b9f11 in mysql_binlog_send (thd=thd@
#11 0x00000000005a295d in dispatch_command (command=