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.

Bug #1737023 reported by Roel Van de Paar
8
This bug affects 1 person
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_bug_bundle.tar.gz) gives the testcase as an exact match of our system, including some handy utilities

$ 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_run_pquery # STEP5: Run the testcase with the pquery binary
$ ./1512639429_run # STEP5 ALTERNATIVE: Run the testcase with the mysql CLI (also reproduces the issue on my system)
$ vi /dev/shm/1512639429/error.log.out # STEP6: Verify the error log
$ ./1512639429_gdb # OPTIONAL: Brings you to a gdb prompt with gdb attached to the used mysqld and attached to the generated core
$ ./1512639429_parse_core # OPTIONAL: Creates 1512639429_STD.gdb and 1512639429_FULL.gdb; standard and full variables gdb stack traces

Tags: qa regression
Revision history for this message
Roel Van de Paar (roel11) wrote :
Download full text (4.9 KiB)

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.
Version: '5.6.38-82.3-debug-log' socket: '/dev/shm/1512639429/socket.sock' port: 35021 MySQL Community Server (GPL)
mysqld: /git/PS-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.
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'.
Program terminated with signal 6, Aborted.
#0 0x00007ff36946c9b1 in __pthread_kill (threadid=<optimized out>, signo=6) at ../nptl/sysdeps/unix/sysv/linux/pthread_kill.c:61
61 val = INTERNAL_SYSCALL (tgkill, err, 3, THREAD_GETMEM (THREAD_SELF, pid),
(gdb) bt
#0 0x00007ff36946c9b1 in __pthread_kill (threadid=<optimized out>, signo=6) at ../nptl/sysdeps/unix/sysv/linux/pthread_kill.c:61
#1 0x0000000000aca231 in my_write_core (sig=6) at /git/PS-5.6-trunk_dbg/mysys/stacktrace.c:424
#2 0x000000000073a92d in handle_fatal_signal (sig=6) at /git/PS-5.6-trunk_dbg/sql/signal_handler.cc:236
#3 <signal handler called>
#4 0x00007ff3677841f7 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#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=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=file@entry=0xf8f940 "/git/PS-5.6-trunk_dbg/sql/log_event.cc", line=line@entry=7852,
    function=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*)")
    at assert.c:92
#7 0x00007ff36777d312 in __GI___assert_fail (
    assertion=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=0xf8f940 "/git/PS-5.6-trunk_dbg/sql/log_event.cc", line=7852,
    function=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
#8 0x0000000000a304aa in User_var_log_event::User_var_log_event (this=0x7ff3218ef500, buf=0x7ff32181a268 "", event_len=43,
    description_event=0x7ff32188d600) at /git/PS-5.6-trunk_dbg/sql/log_event.cc:7842
#9 0x0000000000a22447 in Log_event::read_l...

Read more...

tags: added: qa
Revision history for this message
Roel Van de Paar (roel11) wrote :
Revision history for this message
Laurynas Biveinis (laurynas-biveinis) wrote :

Already discovered and being fixed by Zsolt

tags: added: regression
Revision history for this message
Zsolt Parragi (zsolt.parragi) wrote :
Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PS-1131

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.