[MDEV-7148] Recurring: InnoDB: Failing assertion: !lock->recursive Created: 2014-11-20  Updated: 2016-11-25  Resolved: 2015-03-05

Status: Closed
Project: MariaDB Server
Component/s: Platform Power, Storage Engine - InnoDB
Affects Version/s: 5.5.40, 10.0.14, 10.1.1
Fix Version/s: 5.5.41, 10.0.18, 10.1.4

Type: Bug Priority: Blocker
Reporter: Sergey Vojtovich Assignee: Sergey Vojtovich
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Relates
relates to MDEV-6478 MariaDB on Power8 Closed
relates to MDEV-6515 crash due to assertion on power8 Closed

 Description   

Our partners at Kangaroot reported this subtle assertion failure in InnoDB rwlocks. There was an attempt to fix it previously (MDEV-6515), but apparently it didn't work.

Version: '10.0.15-MariaDB-log'  socket: '/tmp/mysql.sock'  port: 3306  MariaDB Server
2014-11-10 12:15:09 3fffaecbf140  InnoDB: Assertion failure in thread 70367381811520 in file sync0rw.cc line 702
InnoDB: Failing assertion: !lock->recursive
...
sync/sync0rw.cc:702(rw_lock_x_lock_low)[0x1011692c]
sync/sync0rw.cc:706(rw_lock_x_lock_low)[0x1072d7a0]
include/sync0rw.ic:926(pfs_rw_lock_x_lock_func)[0x10791488]
btr/btr0cur.cc:1566(btr_cur_optimistic_insert(unsigned long, btr_cur_t*, unsigned long**, mem_block_info_t**, dtuple_t*, unsigned char**, big_rec_t**, unsigned long, que_thr_t*, mtr_t*))[0x1077a7ac]
row/row0ins.cc:2783(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*))[0x106e57cc]
row/row0ins.cc:2969(row_ins_sec_index_entry(dict_index_t*, dtuple_t*, que_thr_t*))[0x106e79fc]
row/row0upd.cc:1839(row_upd_sec_index_entry)[0x10712f14]
row/row0upd.cc:2571(row_upd)[0x107176d4]
row/row0mysql.cc:1738(row_update_for_mysql(unsigned char*, row_prebuilt_t*))[0x106f5f70]
handler/ha_innodb.cc:8044(ha_innobase::update_row(unsigned char const*, unsigned char*))[0x10630e80]
sql/handler.cc:5994(handler::ha_update_row(unsigned char const*, unsigned char*))[0x103e70ec]
sql/sql_update.cc:803(mysql_update(THD*, TABLE_LIST*, List<Item>&, List<Item>&, Item*, unsigned int, st_order*, unsigned long long, enum_duplicates, bool, unsigned long long*, unsigned long long*))[0x102b8608]
sql/sql_parse.cc:3294(mysql_execute_command(THD*))[0x101f9ac0]
sql/sql_prepare.cc:3971(Prepared_statement::execute(String*, bool))[0x10219140]
sql/sql_prepare.cc:3626(Prepared_statement::execute_loop(String*, bool, unsigned char*, unsigned char*))[0x102192e4]
sql/sql_prepare.cc:2725(mysqld_stmt_execute(THD*, char*, unsigned int))[0x10219648]
sql/sql_parse.cc:1250(dispatch_command(enum_server_command, THD*, char*, unsigned int))[0x101ff808]
sql/sql_connect.cc:1379(do_handle_one_connection(THD*))[0x102fdbac]
sql/sql_connect.cc:1295(handle_one_connection)[0x102fdcd4]



 Comments   
Comment by Sergey Vojtovich [ 2014-11-20 ]

Care to review another challenging fix?

Comment by Kristian Nielsen [ 2014-11-24 ]

Review sent to maria-developers@.

Patch looks ok.

Comment by Sergey Vojtovich [ 2014-12-01 ]

Can't push yet due to MDEV-7156.

Comment by Sergey Vojtovich [ 2014-12-10 ]

Pushed to 5.5.41:

revno: 4381
revision-id: svoj@mariadb.org-20141201105829-ctaoe194abtorhz2
parent: jplindst@mariadb.org-20141203113839-xkxdy39mq77vu99y
committer: Sergey Vojtovich <svoj@mariadb.org>
branch nick: 5.5
timestamp: Mon 2014-12-01 14:58:29 +0400
message:
  MDEV-7148 - Recurring: InnoDB: Failing assertion: !lock->recursive
 
  On PPC64 high-loaded server may crash due to assertion failure in InnoDB
  rwlocks code.
 
  This happened because load order between "recursive" and "writer_thread"
  wasn't properly enforced.

Comment by Sergey Vojtovich [ 2015-03-05 ]

Apparently this fix didn't hit neither 10.0.16 nor 10.1.3.

Comment by Sergey Vojtovich [ 2015-03-05 ]

serg, could you check if this fix didn't hit 10.0 for a reason. If not, just assign back to me and I'll re-apply the patch to 10.0.

Comment by Sergei Golubchik [ 2015-03-05 ]

It was a bad merge. No reason that I'm aware of.

Generated at Thu Feb 08 07:17:23 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.