Bug #73534 ASSERT \'s_latch == rw_lock_own(&index->lock, RW_LOCK_S)\' at row0ins.cc
Submitted: 11 Aug 2014 13:24 Modified: 18 Sep 2014 14:57
Reporter: Tarique Saleem Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: InnoDB storage engine Severity:S2 (Serious)
Version:5.7 OS:Any
Assigned to: CPU Architecture:Any

[11 Aug 2014 13:24] Tarique Saleem
Description:
Assert found while running RMR on mysql-trunk branch . 

2014-08-11 13:01:54 0x7fbe040f7700  InnoDB: Assertion failure in thread 140454088636160 in file row0ins.cc line 1918
InnoDB: Failing assertion: s_latch == rw_lock_own(&index->lock, RW_LOCK_S)
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.7/en/forcing-innodb-recovery.html
InnoDB: about forcing recovery.
11:01:54 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=13
max_threads=151
thread_count=13
connection_count=13
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 68180 K  bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

Thread pointer: 0x7fbd94000c50
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 = 7fbe040f6dc0 thread_stack 0x40000
/log/RQG/ttarique/mysql-trunk/BLD_TRUNK_NEW/bin/mysqld(my_print_stacktrace+0x35) [0xddcb1b]
/log/RQG/ttarique/mysql-trunk/BLD_TRUNK_NEW/bin/mysqld(handle_fatal_signal+0x412) [0x80022a]
/lib64/libpthread.so.0(+0xf710) [0x7fbe26e33710]
/lib64/libc.so.6(gsignal+0x35) [0x7fbe25ade925]
/lib64/libc.so.6(abort+0x175) [0x7fbe25ae0105]
/log/RQG/ttarique/mysql-trunk/BLD_TRUNK_NEW/bin/mysqld() [0x1028347]
/log/RQG/ttarique/mysql-trunk/BLD_TRUNK_NEW/bin/mysqld() [0xf5e5c5]
/log/RQG/ttarique/mysql-trunk/BLD_TRUNK_NEW/bin/mysqld(row_ins_sec_index_entry_low(unsigned long, unsigned long, dict_index_t*, mem_block_info_t*, mem_block_info_t*, dtuple_t*, unsigned long, que_thr_t*, bool)+0x83e) [0xf60a01]
/log/RQG/ttarique/mysql-trunk/BLD_TRUNK_NEW/bin/mysqld(row_ins_sec_index_entry(dict_index_t*, dtuple_t*, que_thr_t*, bool)+0x22a) [0xf61ae6]
/log/RQG/ttarique/mysql-trunk/BLD_TRUNK_NEW/bin/mysqld() [0xfce41e]
/log/RQG/ttarique/mysql-trunk/BLD_TRUNK_NEW/bin/mysqld() [0xfce57e]
/log/RQG/ttarique/mysql-trunk/BLD_TRUNK_NEW/bin/mysqld(row_upd(upd_node_t*, que_thr_t*)+0x3f7) [0xfd0117]
/log/RQG/ttarique/mysql-trunk/BLD_TRUNK_NEW/bin/mysqld(row_upd_step(que_thr_t*)+0x25c) [0xfd047a]
/log/RQG/ttarique/mysql-trunk/BLD_TRUNK_NEW/bin/mysqld() [0xf7e4f0]
/log/RQG/ttarique/mysql-trunk/BLD_TRUNK_NEW/bin/mysqld(row_update_for_mysql(unsigned char const*, row_prebuilt_t*)+0x7c) [0xf7ec75]
/log/RQG/ttarique/mysql-trunk/BLD_TRUNK_NEW/bin/mysqld(ha_innobase::update_row(unsigned char const*, unsigned char*)+0x348) [0xe7a522]
/log/RQG/ttarique/mysql-trunk/BLD_TRUNK_NEW/bin/mysqld(handler::ha_update_row(unsigned char const*, unsigned char*)+0x14a) [0x86acb0]
/log/RQG/ttarique/mysql-trunk/BLD_TRUNK_NEW/bin/mysqld(mysql_update(THD*, List<Item>&, List<Item>&, unsigned long long, enum_duplicates, unsigned long long*, unsigned long long*)+0x20e9) [0xbaa400]
/log/RQG/ttarique/mysql-trunk/BLD_TRUNK_NEW/bin/mysqld(mysql_execute_command(THD*)+0x2e3a) [0xb0d71b]
/log/RQG/ttarique/mysql-trunk/BLD_TRUNK_NEW/bin/mysqld(mysql_parse(THD*, Parser_state*)+0x4d8) [0xb142de]
/log/RQG/ttarique/mysql-trunk/BLD_TRUNK_NEW/bin/mysqld(dispatch_command(enum_server_command, THD*, char*, unsigned long)+0xdd7) [0xb086a3]
/log/RQG/ttarique/mysql-trunk/BLD_TRUNK_NEW/bin/mysqld(do_command(THD*)+0x352) [0xb073da]
/log/RQG/ttarique/mysql-trunk/BLD_TRUNK_NEW/bin/mysqld(handle_connection+0x1b3) [0xc12e60]
/log/RQG/ttarique/mysql-trunk/BLD_TRUNK_NEW/bin/mysqld(pfs_spawn_thread+0x14e) [0xe0c5c1]
/lib64/libpthread.so.0(+0x79d1) [0x7fbe26e2b9d1]
/lib64/libc.so.6(clone+0x6d) [0x7fbe25b94b6d]

Trying to get some variables.
Some pointers may be invalid and cause the dump to abort.
Query (7fbd94005400): UPDATE t1 SET  col_blob = f_col_blob (col_int0) WHERE  col_char4 <= f_col_char4 (@val) ORDER BY col_char4 DESC LIMIT 4
Connection ID (thread ID): 14
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 mysql-trunk 

revision-id: marko.makela@oracle.com-20140811074311-jeo501qdmmulyo97
date: 2014-08-11 10:43:11 +0300
build-date: 2014-08-11 12:09:53 +0200
revno: 8560
branch-nick: mysql-trunk

Seen while testing with RQG RMR in concurrency mode. 

Working on getting a reproducible testcase.
[18 Sep 2014 14:57] Daniel Price
Posted by developer:
 
Fixed as of the upcoming 5.7.5 release, and here's the changelog entry:

Debug assertion code in file "row0ins.cc" did not account for rw-lock
shared-exclusive (sx-lock) mode, resulting in an assertion failure.