User_var_log_event::User_var_log_event(const char*, uint, const Format_description_log_event*): Assertion `(bytes_read == (data_written - ((old_pre_checksum_fd || (description_event->checksum_alg == BINLOG_CHECKSUM_ALG_OFF)) ? 0 : 4))) || ((bytes_read == (data_written -1 - (old_pre_checksum_fd || (description_event->checksum_alg == BINLOG_CHECKSUM_ALG_OFF)) ? 0 : 4)))' failed.
Affects | Status | Importance | Assigned to | Milestone | ||
---|---|---|---|---|---|---|
Percona Server moved to https://jira.percona.com/projects/PS | Status tracked in 5.7 | |||||
5.5 |
Invalid
|
Undecided
|
Unassigned | |||
5.6 |
Fix Committed
|
High
|
Zsolt Parragi | |||
5.7 |
New
|
High
|
Zsolt Parragi |
Bug Description
1) This looks like a new regression. Never seen before.
2) The issue is currently only reproducible through a set of scripts prepared & reduced by reducer.sh. Not sure why I cannot get it to replay at the mysql client (yet). Here is the SQL;
# mysqld options required for replay: --log-bin
USE test;
create temporary TABLE t0(i int);
set @a=0,@b=0;
INSERT INTO t0 VALUES(@b);
show binlog events;
3) Here is how to use this testcase;
The attached tarball (1512639429_
$ vi 1512639429_mybase # STEP1: Update the base path in this file (usually the only change required!). If you use a non-binary distribution, please update SOURCE_DIR location also
$ ./1512639429_init # STEP2: Initializes the data dir
$ ./1512639429_start # STEP3: Starts mysqld
$ ./1512639429_cl # STEP4: To check mysqld is up
$ ./1512639429_
$ ./1512639429_run # STEP5 ALTERNATIVE: Run the testcase with the mysql CLI (also reproduces the issue on my system)
$ vi /dev/shm/
$ ./1512639429_gdb # OPTIONAL: Brings you to a gdb prompt with gdb attached to the used mysqld and attached to the generated core
$ ./1512639429_
2017-12-08 05:58:02 12735 [Note] /sda/PS021217- percona- server- 5.6.38- 82.3-linux- x86_64- debug/bin/ mysqld: ready for connections. 82.3-debug- log' socket: '/dev/shm/ 1512639429/ socket. sock' port: 35021 MySQL Community Server (GPL) 5.6-trunk_ dbg/sql/ log_event. cc:7852: User_var_ log_event: :User_var_ log_event( const char*, uint, const Format_ description_ log_event* ): Assertion `(bytes_read == (data_written - ((old_pre_ checksum_ fd || (description_ event-> checksum_ alg == BINLOG_ CHECKSUM_ ALG_OFF) ) ? 0 : 4))) || ((bytes_read == (data_written -1 - (old_pre_ checksum_ fd || (description_ event-> checksum_ alg == BINLOG_ CHECKSUM_ ALG_OFF) ) ? 0 : 4)))' failed.
Version: '5.6.38-
mysqld: /git/PS-
18:58:03 UTC - mysqld got signal 6 ;
Core was generated by `/sda/PS021217- percona- server- 5.6.38- 82.3-linux- x86_64- debug/bin/ mysqld --no-def'. <optimized out>, signo=6) at ../nptl/ sysdeps/ unix/sysv/ linux/pthread_ kill.c: 61 <optimized out>, signo=6) at ../nptl/ sysdeps/ unix/sysv/ linux/pthread_ kill.c: 61 5.6-trunk_ dbg/mysys/ stacktrace. c:424 5.6-trunk_ dbg/sql/ signal_ handler. cc:236 sysdeps/ unix/sysv/ linux/raise. c:56 assertion@ entry=0xf92ec8 "(bytes_read == (data_written - ((old_pre_ checksum_ fd || (description_ event-> checksum_ alg == BINLOG_ CHECKSUM_ ALG_OFF) ) ? 0 : 4))) || ((bytes_read == (data_written -1 - (old_pre_ checksum_ fd || (descript"..., file@entry= 0xf8f940 "/git/PS- 5.6-trunk_ dbg/sql/ log_event. cc", line=line@ entry=7852, function@ entry=0xf95fc0 <User_var_ log_event: :User_var_ log_event( char const*, unsigned int, Format_ description_ log_event const*) ::__PRETTY_ FUNCTION_ _> "User_var_ log_event: :User_var_ log_event( const char*, uint, const Format_ description_ log_event* )") 0xf92ec8 "(bytes_read == (data_written - ((old_pre_ checksum_ fd || (description_ event-> checksum_ alg == BINLOG_ CHECKSUM_ ALG_OFF) ) ? 0 : 4))) || ((bytes_read == (data_written -1 - (old_pre_ checksum_ fd || (descript"..., 5.6-trunk_ dbg/sql/ log_event. cc", line=7852, 0xf95fc0 <User_var_ log_event: :User_var_ log_event( char const*, unsigned int, Format_ description_ log_event const*) ::__PRETTY_ FUNCTION_ _> "User_var_ log_event: :User_var_ log_event( const char*, uint, const Format_ description_ log_event* )") at assert.c:101 log_event: :User_var_ log_event (this=0x7ff3218 ef500, buf=0x7ff32181a268 "", event_len=43, _event= 0x7ff32188d600) at /git/PS- 5.6-trunk_ dbg/sql/ log_event. cc:7842 :read_l. ..
Program terminated with signal 6, Aborted.
#0 0x00007ff36946c9b1 in __pthread_kill (threadid=
61 val = INTERNAL_SYSCALL (tgkill, err, 3, THREAD_GETMEM (THREAD_SELF, pid),
(gdb) bt
#0 0x00007ff36946c9b1 in __pthread_kill (threadid=
#1 0x0000000000aca231 in my_write_core (sig=6) at /git/PS-
#2 0x000000000073a92d in handle_fatal_signal (sig=6) at /git/PS-
#3 <signal handler called>
#4 0x00007ff3677841f7 in __GI_raise (sig=sig@entry=6) at ../nptl/
#5 0x00007ff3677858e8 in __GI_abort () at abort.c:90
#6 0x00007ff36777d266 in __assert_fail_base (fmt=0x7ff3678cfe68 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n",
assertion=
file=
function=
at assert.c:92
#7 0x00007ff36777d312 in __GI___assert_fail (
assertion=
file=0xf8f940 "/git/PS-
function=
#8 0x0000000000a304aa in User_var_
description
#9 0x0000000000a22447 in Log_event: