Bug #73530 ASSERT \'from->m_byte_count == 0\' AT sql_digest_storage::copy in sql_digest.h
Submitted: 11 Aug 2014 11:15 Modified: 19 Aug 2014 14:59
Reporter: Tarique Saleem Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Performance Schema Severity:S2 (Serious)
Version:5.7 OS:Any
Assigned to: CPU Architecture:Any

[11 Aug 2014 11:15] Tarique Saleem
Description:
Crash/Assert found in WL7415 regression runs.. 

mysqld: /log/RQG/ttarique/mysql-trunk-wl7415/sql/sql_digest.h:68: void sql_digest_storage::copy(const sql_digest_storage*): Assertion `from->m_byte_count == 0' failed.
22:27:55 UTC - mysqld got signal 6 ;
This could be because you hit a bug. It is also possible that this binary
or one of the libraries it was linked against is corrupt, improperly built,
or misconfigured. This error can also be caused by malfunctioning hardware.
We will try our best to scrape up some info that will hopefully help
diagnose the problem, but since we have already crashed,
something is definitely wrong and this may fail.

key_buffer_size=8388608
read_buffer_size=131072
max_used_connections=15
max_threads=151
thread_count=14
connection_count=14
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 68159 K  bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

Thread pointer: 0x7f5db0023b40
Attempting backtrace. You can use the following information to find out
where mysqld died. If you see no messages after this, something went
terribly wrong...
stack_bottom = 7f5e28c9bdc0 thread_stack 0x40000
/log/RQG/ttarique/mysql-trunk-wl7415/BLD_TRUNK_NEW/bin/mysqld(my_print_stacktrace+0x35) [0xda95a5]
/log/RQG/ttarique/mysql-trunk-wl7415/BLD_TRUNK_NEW/bin/mysqld(handle_fatal_signal+0x412) [0x7e50ca]
/lib64/libpthread.so.0(+0xf4a0) [0x7f5e4b76c4a0]
/lib64/libc.so.6(gsignal+0x35) [0x7f5e4a40a885]
/lib64/libc.so.6(abort+0x175) [0x7f5e4a40c065]
/lib64/libc.so.6(+0x2b9fe) [0x7f5e4a4039fe]
/lib64/libc.so.6(__assert_perror_fail+0) [0x7f5e4a403ac0]
/log/RQG/ttarique/mysql-trunk-wl7415/BLD_TRUNK_NEW/bin/mysqld(sql_digest_storage::copy(sql_digest_storage const*)+0xc5) [0xe5814d]
/log/RQG/ttarique/mysql-trunk-wl7415/BLD_TRUNK_NEW/bin/mysqld(table_events_statements_common::make_row_part_1(PFS_events_statements*, sql_digest_storage*)+0x50f) [0xe7bb61]
/log/RQG/ttarique/mysql-trunk-wl7415/BLD_TRUNK_NEW/bin/mysqld(table_events_statements_current::make_row(PFS_thread*, PFS_events_statements*)+0x86) [0xe7caf2]
/log/RQG/ttarique/mysql-trunk-wl7415/BLD_TRUNK_NEW/bin/mysqld(table_events_statements_current::rnd_next()+0xf2) [0xe7c87c]
/log/RQG/ttarique/mysql-trunk-wl7415/BLD_TRUNK_NEW/bin/mysqld(ha_perfschema::rnd_next(unsigned char*)+0xd0) [0xe4b3ca]
/log/RQG/ttarique/mysql-trunk-wl7415/BLD_TRUNK_NEW/bin/mysqld(handler::ha_rnd_next(unsigned char*)+0x124) [0x83f8a4]
/log/RQG/ttarique/mysql-trunk-wl7415/BLD_TRUNK_NEW/bin/mysqld(rr_sequential(READ_RECORD*)+0x6d) [0xa55577]
/log/RQG/ttarique/mysql-trunk-wl7415/BLD_TRUNK_NEW/bin/mysqld(join_init_read_record(st_join_table*)+0x166) [0xace8f4]
/log/RQG/ttarique/mysql-trunk-wl7415/BLD_TRUNK_NEW/bin/mysqld(sub_select(JOIN*, st_join_table*, bool)+0x1b6) [0xacbff7]
/log/RQG/ttarique/mysql-trunk-wl7415/BLD_TRUNK_NEW/bin/mysqld() [0xacb9e5]
/log/RQG/ttarique/mysql-trunk-wl7415/BLD_TRUNK_NEW/bin/mysqld(JOIN::exec()+0x5f9) [0xac98bb]
/log/RQG/ttarique/mysql-trunk-wl7415/BLD_TRUNK_NEW/bin/mysqld(mysql_select(THD*, List<Item>&, unsigned long long, select_result*, st_select_lex*)+0xf6) [0xb5bbe4]
/log/RQG/ttarique/mysql-trunk-wl7415/BLD_TRUNK_NEW/bin/mysqld(handle_select(THD*, select_result*, unsigned long)+0x1a2) [0xb5a266]
/log/RQG/ttarique/mysql-trunk-wl7415/BLD_TRUNK_NEW/bin/mysqld() [0xb13c64]
/log/RQG/ttarique/mysql-trunk-wl7415/BLD_TRUNK_NEW/bin/mysqld(mysql_execute_command(THD*)+0xdc0) [0xb0be49]
/log/RQG/ttarique/mysql-trunk-wl7415/BLD_TRUNK_NEW/bin/mysqld(mysql_parse(THD*, Parser_state*)+0x4d5) [0xb14a87]
/log/RQG/ttarique/mysql-trunk-wl7415/BLD_TRUNK_NEW/bin/mysqld(dispatch_command(enum_server_command, THD*, char*, unsigned long)+0xdd4) [0xb08f91]
/log/RQG/ttarique/mysql-trunk-wl7415/BLD_TRUNK_NEW/bin/mysqld(do_command(THD*)+0x352) [0xb07ccb]
/log/RQG/ttarique/mysql-trunk-wl7415/BLD_TRUNK_NEW/bin/mysqld(handle_connection+0x1a4) [0xc201dd]
/log/RQG/ttarique/mysql-trunk-wl7415/BLD_TRUNK_NEW/bin/mysqld(pfs_spawn_thread+0x14e) [0xe4d9d9]
/lib64/libpthread.so.0(+0x77f1) [0x7f5e4b7647f1]
/lib64/libc.so.6(clone+0x6d) [0x7f5e4a4bd70d]

Trying to get some variables.
Some pointers may be invalid and cause the dump to abort.
Query (7f5db0039e00): SELECT * FROM (performance_schema . `session_account_connect_attrs` AS table1 INNER JOIN performance_schema . `events_statements_current` AS table2 ON ( table2 . `EVENT_NAME` = table1 . `PROCESSLIST_ID` ) ) WHERE table1 . `PROCESSLIST_ID` LIKE 'wait/lock/table' AND table2 . `SORT_MERGE_PASSES` IN ( 7 , 5 , 1 ) LIMIT 4 OFFSET 8
Connection ID (thread ID): 228
Status: NOT_KILLED

The manual page at http://dev.mysql.com/doc/mysql/en/crashing.html contains
information that should help you find out what is causing the crash.
Writing a core file

How to repeat:
This issue was seen with regression runs setup for WL7415 with RMR.

Getting a reproducible RMR testcase may be difficult but I am working on it. 

This issue was seen on 

revision-id: marc.alff@oracle.com-20140613003933-sjfsv2qv8ienj00i
date: 2014-06-13 02:39:33 +0200
build-date: 2014-06-16 11:18:08 +0200
revno: 7420
branch-nick: mysql-trunk-wl7415
[19 Aug 2014 14:59] Paul DuBois
Noted in 5.7.5 changelog.

For debug builds, a SELECT under load from the Performance Schema
events_statements_current table could raise an assertion.
[19 Aug 2014 14:59] Paul DuBois
Noted in 5.7.5 changelog.

For debug builds, a SELECT under load from the Performance Schema
events_statements_current table could raise an assertion.