Bug #78362 InnoDB: Error: MySQL is trying to perform a consistent read
Submitted: 8 Sep 2015 8:47 Modified: 8 Sep 2015 9:23
Reporter: Denis Melnikov Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server: InnoDB storage engine Severity:S2 (Serious)
Version:5.5.16 OS:Red Hat (2.6.32-431.17.1.el6.x86_64)
Assigned to: CPU Architecture:Any
Tags: crash, read view

[8 Sep 2015 8:47] Denis Melnikov
Description:
Hi,

MySQL began to crash every 5-6 days on similar queries last 3 times.
The query executes frequently so it's not a cause of crashes itself.

InnoDB: Error: MySQL is trying to perform a consistent read
InnoDB: but the read view is not assigned!
TRANSACTION 1E1794A2E6, ACTIVE 0 sec fetching rows, thread declared inside InnoDB 500
mysql tables in use 28, locked 23
MySQL thread id 27618622, OS thread handle 0x7f1fb3547700, query id 76740519616 192.168.x.x imdbuser checking permissions

<Query here>

150908 10:32:57  InnoDB: Assertion failure in thread 139774129370880 in file row0sel.c line 3862
InnoDB: We intentionally generate a memory trap.
InnoDB: Submit a detailed bug report to http://bugs.mysql.com.
InnoDB: If you get repeated assertion failures or crashes, even
InnoDB: immediately after the mysqld startup, there may be
InnoDB: corruption in the InnoDB tablespace. Please refer to
InnoDB: http://dev.mysql.com/doc/refman/5.5/en/forcing-innodb-recovery.html
InnoDB: about forcing recovery.
150908 10:32:57 - 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=6442450944
read_buffer_size=131072
max_used_connections=312
max_threads=250
thread_count=85
connection_count=85
It is possible that mysqld could use up to 
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 6839175 K
bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

Thread pointer: 0x47bb1400
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 = 0x7f1fb3546e28 thread_stack 0x31000
/usr/sbin/mysqld(my_print_stacktrace+0x39)[0x7a0799]
/usr/sbin/mysqld(handle_segfault+0x464)[0x510224]
/lib64/libpthread.so.0(+0xf710)[0x7f2bf4787710]
/lib64/libc.so.6(gsignal+0x35)[0x7f2bf394e925]
/lib64/libc.so.6(abort+0x175)[0x7f2bf3950105]
/usr/sbin/mysqld[0x83a44c]
/usr/sbin/mysqld[0x8107cd]
/usr/sbin/mysqld[0x5a33c1]
/usr/sbin/mysqld(_Z10sub_selectP4JOINP13st_join_tableb+0x79)[0x5ac659]
/usr/sbin/mysqld[0x5a390e]
/usr/sbin/mysqld(_Z10sub_selectP4JOINP13st_join_tableb+0x86)[0x5ac666]
/usr/sbin/mysqld[0x5a390e]
/usr/sbin/mysqld(_Z10sub_selectP4JOINP13st_join_tableb+0x86)[0x5ac666]
/usr/sbin/mysqld[0x5a390e]
/usr/sbin/mysqld(_Z10sub_selectP4JOINP13st_join_tableb+0x86)[0x5ac666]
/usr/sbin/mysqld[0x5ad5e2]
/usr/sbin/mysqld(_ZN4JOIN4execEv+0xc40)[0x5c2c90]
/usr/sbin/mysqld(_Z12mysql_selectP3THDPPP4ItemP10TABLE_LISTjR4ListIS1_ES2_jP8st_orderSB_S2_SB_yP13select_resultP18st_select_lex_unitP13st_select_lex+0x12c)[0x5be7ac]
/usr/sbin/mysqld(_Z13handle_selectP3THDP3LEXP13select_resultm+0x1cd)[0x5c447d]
/usr/sbin/mysqld[0x582202]
/usr/sbin/mysqld(_Z21mysql_execute_commandP3THD+0x1226)[0x585b36]
/usr/sbin/mysqld(_Z11mysql_parseP3THDPcjP12Parser_state+0x313)[0x589353]
/usr/sbin/mysqld(_Z16dispatch_command19enum_server_commandP3THDPcj+0x15a2)[0x58a9a2]
/usr/sbin/mysqld(_Z24do_handle_one_connectionP3THD+0xd7)[0x622767]
/usr/sbin/mysqld(handle_one_connection+0x51)[0x6228a1]
/usr/sbin/mysqld(pfs_spawn_thread+0x59)[0x7bc8e9]
/lib64/libpthread.so.0(+0x79d1)[0x7f2bf477f9d1]
/lib64/libc.so.6(clone+0x6d)[0x7f2bf3a04b7d]

Trying to get some variables.
Some pointers may be invalid and cause the dump to abort.
Query (0x7f1ca888e500): is an invalid pointer
Connection ID (thread ID): 27618622
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.
mysqld: /home/ignacio.nin/src/work/BUILD/Percona-Server-5.5.16-rel22.0/Percona-Server-5.5.16-rel22.0/mysys/my_new.cc:52: int __cxa_pure_virtual(): Assertion `! "Aborted: pure virtual method called."' failed.
150908 10:32:57 mysqld_safe Number of processes running now: 0
150908 10:32:57 mysqld_safe mysqld restarted

How to repeat:
No idea.

Suggested fix:
Fix the bug.
[8 Sep 2015 9:23] MySQL Verification Team
Hi Denis,

Thank you for the report.
But version 5.5.16 is very old and many bugs were fixed since. Please upgrade to current GA version in one of 5.5/5.6, try with it and inform us if problem still exists and provide repeatable test case(exact schema, subset of data to reproduce).

If you can provide more information, feel free to add it to this bug and change the status back to 'Open'.

Thank you for your interest in MySQL.

Thanks,
Umesh