InnoDB: Failing assertion: block->page.buf_fix_count > 0 in file buf0buf.ic line 725 | abort (sig=6) in buf_block_get_frame

Bug #1217158 reported by Roel Van de Paar
12
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.1
Invalid
Undecided
Unassigned
5.5
Triaged
High
Unassigned
5.6
Invalid
Undecided
Unassigned
5.7
Invalid
Undecided
Unassigned

Bug Description

Thread 1 (LWP 26943):
+bt
#0 0x000000340cc0c69c in pthread_kill () from /lib64/libpthread.so.0
#1 0x00000000007ef479 in my_write_core (sig=6) at /bzr/5.5_dbg/Percona-Server-5.5.32-rel31.0/mysys/stacktrace.c:433
#2 0x00000000006b6c75 in handle_fatal_signal (sig=6) at /bzr/5.5_dbg/Percona-Server-5.5.32-rel31.0/sql/signal_handler.cc:250
#3 <signal handler called>
#4 0x000000340c4328a5 in raise () from /lib64/libc.so.6
#5 0x000000340c434085 in abort () from /lib64/libc.so.6
#6 0x000000000083dca1 in buf_block_get_frame (block=0x7ff827b75fd0) at /bzr/5.5_dbg/Percona-Server-5.5.32-rel31.0/storage/innobase/include/buf0buf.ic:725
#7 i_s_innodb_buffer_pool_pages_blob_fill (thd=0x1c1f940, tables=<optimized out>, cond=<optimized out>) at /bzr/5.5_dbg/Percona-Server-5.5.32-rel31.0/storage/innobase/handler/i_s.cc:6776
#8 0x00000000005ebbb3 in do_fill_table (join_table=0x7ff808013da0, table_list=0x7ff808005100, thd=0x1c1f940) at /bzr/5.5_dbg/Percona-Server-5.5.32-rel31.0/sql/sql_show.cc:7462
#9 get_schema_tables_result (join=0x7ff808012040, executed_place=PROCESSED_BY_JOIN_EXEC) at /bzr/5.5_dbg/Percona-Server-5.5.32-rel31.0/sql/sql_show.cc:7568
#10 0x00000000005e329e in JOIN::exec (this=0x7ff808012040) at /bzr/5.5_dbg/Percona-Server-5.5.32-rel31.0/sql/sql_select.cc:1959
#11 0x00000000005e5e13 in mysql_select (thd=0x1c1f940, rref_pointer_array=0x1c21e08, tables=0x7ff808005100, wild_num=1, fields=..., conds=<optimized out>, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2684619520, result=0x7ff80801c8e8, unit=0x1c21600, select_lex=0x1c21c20) at /bzr/5.5_dbg/Percona-Server-5.5.32-rel31.0/sql/sql_select.cc:2645
#12 0x00000000005e63ae in handle_select (thd=0x1c1f940, lex=0x1c21540, result=0x7ff80801c8e8, setup_tables_done_option=<optimized out>) at /bzr/5.5_dbg/Percona-Server-5.5.32-rel31.0/sql/sql_select.cc:313
#13 0x000000000059ce8e in execute_sqlcom_select (thd=0x1c1f940, all_tables=0x7ff808005100) at /bzr/5.5_dbg/Percona-Server-5.5.32-rel31.0/sql/sql_parse.cc:4819
#14 0x00000000005a0bcb in mysql_execute_command (thd=0x1c1f940) at /bzr/5.5_dbg/Percona-Server-5.5.32-rel31.0/sql/sql_parse.cc:2322
#15 0x00000000005a5d30 in mysql_parse (thd=0x1c1f940, rawbuf=0x7ff808004c10 "SELECT * FROM INFORMATION_SCHEMA . `INNODB_BUFFER_POOL_PAGES_BLOB` AS table1 WHERE (NOT ( ( (NOT table1 . `next_page_no` >= table1 . `space_id` AND table1 . `compressed` >= table1 . `compressed`) AND table1 . `compressed` >= 'mp') AND table1 . `space_id` <= table1 . `next_page_no`) OR table1 . `lru_position` = table1 . `part_len`) LIMIT 2", length=<optimized out>, parser_state=0x7ff813ffeb10) at /bzr/5.5_dbg/Percona-Server-5.5.32-rel31.0/sql/sql_parse.cc:5889
#16 0x00000000005a70a2 in dispatch_command (command=COM_QUERY, thd=0x1c1f940, packet=<optimized out>, packet_length=342) at /bzr/5.5_dbg/Percona-Server-5.5.32-rel31.0/sql/sql_parse.cc:1079
#17 0x00000000005a8783 in do_command (thd=0x1c1f940) at /bzr/5.5_dbg/Percona-Server-5.5.32-rel31.0/sql/sql_parse.cc:789
#18 0x000000000064f7cf in do_handle_one_connection (thd_arg=<optimized out>) at /bzr/5.5_dbg/Percona-Server-5.5.32-rel31.0/sql/sql_connect.cc:1487
#19 0x000000000064f8ce in handle_one_connection (arg=0x1c1f940) at /bzr/5.5_dbg/Percona-Server-5.5.32-rel31.0/sql/sql_connect.cc:1402
#20 0x000000340cc07851 in start_thread () from /lib64/libpthread.so.0
#21 0x000000340c4e890d in clone () from /lib64/libc.so.6

130825 12:26:16 InnoDB: Assertion failure in thread 140703464158976 in file buf0buf.ic line 725
InnoDB: Failing assertion: block->page.buf_fix_count > 0
[...]
Query (7ff808004c10): SELECT * FROM INFORMATION_SCHEMA . `INNODB_BUFFER_POOL_PAGES_BLOB` AS table1 WHERE (NOT ( ( (NOT table1 . `next_page_no` >= table1 . `space_id` AND table1 . `compressed` >= table1 . `compressed`) AND table1 . `compressed` >= 'mp') AND table1 . `space_id` <= table1 . `next_page_no`) OR table1 . `lru_position` = table1 . `part_len`) LIMIT 2
Connection ID (thread ID): 12
Status: NOT_KILLED

Revision history for this message
Roel Van de Paar (roel11) wrote :
no longer affects: percona-server
no longer affects: percona-xtradb-cluster
no longer affects: percona-xtradb-cluster/5.6
summary: - InnoDB: Failing assertion: block->page.buf_fix_count > 0 | abort (sig=6)
- in buf_block_get_frame
+ InnoDB: Failing assertion: block->page.buf_fix_count > 0 in file
+ buf0buf.ic line 725 | abort (sig=6) in buf_block_get_frame
Revision history for this message
Roel Van de Paar (roel11) wrote :

Set as hidden given that bug 1178575 is hidden. See bug 1178575. Logged as another bug since this is in file buf0buf.ic line 725 while the other one is in line 1277 (though this may be due to PXC changes?)

Revision history for this message
Roel Van de Paar (roel11) wrote :
Revision history for this message
Roel Van de Paar (roel11) wrote :
Revision history for this message
Roel Van de Paar (roel11) wrote :
Revision history for this message
Roel Van de Paar (roel11) wrote :
information type: Private → Public
Revision history for this message
Laurynas Biveinis (laurynas-biveinis) wrote :

A debug-only crash because the I_S function is calling buf_block_get_frame on any page it reads, which debug-asserts that the page is buffer-fixed, which is not the case in I_S query. Possible fixes: 1) acquire the buffer page mutex, buffer-fix the page, read the fields, buffer-unfix the page under the mutex; 2) just hold the buffer page mutex while the fields are read. The latter option seems more reasonable.

tags: added: low-hanging-fruit xtradb
Revision history for this message
Valerii Kravchuk (valerii-kravchuk) wrote :

Same code in 5.6, so I assume it's potentially also affected:

...
    677 # ifndef UNIV_HOTBACKUP
    678 ut_a(block->page.buf_fix_count > 0);
    679 # endif /* !UNIV_HOTBACKUP */
    680 /* fall through */
    681 case BUF_BLOCK_READY_FOR_USE:
    682 case BUF_BLOCK_MEMORY:
    683 case BUF_BLOCK_REMOVE_HASH:
    684 goto ok;
    685 }
    686 ut_error;
    687 ok:
    688 return((buf_frame_t*) block->frame);
    689 }
"Percona-Server-5.6.12-rc60.4/storage/innobase/include/buf0buf.ic" line 689 of 1
424 --48%-- col 1

Revision history for this message
Valerii Kravchuk (valerii-kravchuk) wrote :

Same story with 5.1 - also seems potentially affected.

Revision history for this message
Laurynas Biveinis (laurynas-biveinis) wrote :

The quoted code is not a problem and exists in all InnoDB versions, the problem is with the calling code that does not the necessary prerequisites. Resetting Triage for 5.1 and 5.6 until the same crash is reproduced or the code is reviewed (as the fixing can start since the 5.5 bug is clear).

Revision history for this message
Roel Van de Paar (roel11) wrote :

5.6 version of this one in bug 1224432?

Revision history for this message
Laurynas Biveinis (laurynas-biveinis) wrote :

No relation to bug 1224432.

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-3011

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

Duplicates of this bug

Other bug subscribers