Bug #59488 Error trying to access page and assertion in fil0fil.c line 4407 with ICP on
Submitted: 13 Jan 2011 23:12 Modified: 3 Aug 2011 15:06
Reporter: Elena Stepanova Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: InnoDB storage engine Severity:S2 (Serious)
Version:5.6.1-m5 OS:Any
Assigned to: Marko Mäkelä CPU Architecture:Any

[13 Jan 2011 23:12] Elena Stepanova
Description:
This might be related to bug#59483, but since the assertion is different both for a release and debug version, I'm submitting it separately.

InnoDB: Error: trying to access page number 838859648 in space 0,
InnoDB: space name ./ibdata1,
InnoDB: which is outside the tablespace bounds.
InnoDB: Byte offset 0, len 16384, i/o type 10.
InnoDB: If you get this error at mysqld startup, please check that
InnoDB: your my.cnf matches the ibdata files that you have in the
InnoDB: MySQL server.
110114  1:54:35  InnoDB: Assertion failure in thread 1174985024 in file mysql-5.6.1-m5/storage/innobase/fil/fil0fil.c line 4407
InnoDB: We intentionally generate a memory trap.
...
110114  1:54:35 - mysqld got signal 6 ;
...
key_buffer_size=1048576
read_buffer_size=131072
max_used_connections=1
max_threads=151
thread_count=1
connection_count=1
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 60748 K
bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

Thread pointer: 0x1463dd0

#0  0x00002b6140e3bea3 in pthread_kill () from /lib64/libpthread.so.0
#1  0x000000000050bdee in handle_segfault (sig=6) at mysql-5.6.1-m5/sql/mysqld.cc:2511
#2  <signal handler called>
#3  0x00002b6141415bb5 in raise () from /lib64/libc.so.6
#4  0x00002b6141416fb0 in abort () from /lib64/libc.so.6
#5  0x000000000089dfd4 in fil_io (type=10, sync=<value optimized out>, space_id=0, zip_size=0, block_offset=838859648, byte_offset=0, len=16384,
    buf=0x2aaaada84000, message=0x2aaaad808100) at mysql-5.6.1-m5/storage/innobase/fil/fil0fil.c:4407
#6  0x0000000000876e6e in buf_read_page_low (err=0x46089fb0, sync=1, mode=<value optimized out>, space=0, zip_size=0, unzip=<value optimized out>,
    tablespace_version=1, offset=838860800) at mysql-5.6.1-m5/storage/innobase/buf/buf0rea.c:148
#7  0x00000000008773a7 in buf_read_page (space=0, zip_size=0, offset=838860800)
    at mysql-5.6.1-m5/storage/innobase/buf/buf0rea.c:188
#8  0x000000000086aac4 in buf_page_get_gen (space=0, zip_size=0, offset=838860800, rw_latch=1, guess=0x0, mode=10,
    file=0xa73cd8 "mysql-5.6.1-m5/storage/innobase/include/trx0undo.ic", line=176, mtr=0x4608a100)
    at mysql-5.6.1-m5/storage/innobase/buf/buf0buf.c:2974
#9  0x000000000082cc7b in trx_undo_get_undo_rec_low (roll_ptr=15536099300474885, heap=0x14e27c0)
    at mysql-5.6.1-m5/storage/innobase/include/trx0undo.ic:175
#10 0x000000000082ef3f in trx_undo_prev_version_build (index_rec=0x2aaaada6c27c "═         72", index_mtr=<value optimized out>,
    rec=0x2aaaada6c27c "═         72", index=0x146d068, offsets=0x4608adb0, heap=0x14e27c0, old_vers=0x4608a778)
    at mysql-5.6.1-m5/storage/innobase/trx/trx0rec.c:1398
#11 0x000000000081a0fb in row_vers_build_for_consistent_read (rec=0x2aaaada6c27c "═         72", mtr=0x4608a910, index=0x146d068, offsets=0x4608b120,
    view=0x1491328, offset_heap=0x4608b128, in_heap=0x14e1620, old_vers=0x4608b118)
    at mysql-5.6.1-m5/storage/innobase/row/row0vers.c:556
#12 0x00000000008126f5 in row_search_for_mysql (buf=<value optimized out>, mode=1, prebuilt=0x14bdaa8, match_mode=0, direction=<value optimized out>)
    at mysql-5.6.1-m5/storage/innobase/row/row0sel.c:4409
#13 0x00000000007e5cbc in ha_innobase::general_fetch (this=0x14dfde0, buf=0x14e00a0 "Г", direction=1, match_mode=4294967295)
    at mysql-5.6.1-m5/storage/innobase/handler/ha_innodb.cc:6326
#14 0x00000000006717e1 in handler::ha_rnd_next (this=0x14dfde0, buf=0x14e00a0 "Г")
    at mysql-5.6.1-m5/sql/handler.cc:2225
#15 0x0000000000721ec9 in rr_sequential (info=0x14e6d30) at mysql-5.6.1-m5/sql/records.cc:458
#16 0x00000000005a59e0 in sub_select (join=0x14b2fd0, join_tab=0x14e6ca8, end_of_records=<value optimized out>)
    at mysql-5.6.1-m5/sql/sql_select.cc:17372
#17 0x000000000059b81e in do_select (join=0x14b2fd0, fields=0x1465f40, table=0x0, procedure=0x0)
    at mysql-5.6.1-m5/sql/sql_select.cc:16908
#18 0x00000000005b5a1b in JOIN::exec (this=0x14b2fd0) at mysql-5.6.1-m5/sql/sql_select.cc:3331
#19 0x00000000005b7553 in mysql_select (thd=0x1463dd0, rref_pointer_array=0x1466020, tables=<value optimized out>, wild_num=0,
    fields=<value optimized out>, conds=<value optimized out>, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147748608,
    result=0x14b2fb0, unit=0x1465800, select_lex=0x1465e38) at mysql-5.6.1-m5/sql/sql_select.cc:3554
#20 0x00000000005b7f99 in handle_select (thd=0x1463dd0, lex=0x1465750, result=0x14b2fb0, setup_tables_done_option=0)
    at mysql-5.6.1-m5/sql/sql_select.cc:323
#21 0x00000000005707fc in execute_sqlcom_select (thd=0x1463dd0, all_tables=0x14b17d8)
    at mysql-5.6.1-m5/sql/sql_parse.cc:4513
#22 0x0000000000575410 in mysql_execute_command (thd=0x1463dd0) at mysql-5.6.1-m5/sql/sql_parse.cc:2096
#23 0x000000000057826a in mysql_parse (thd=0x1463dd0, rawbuf=<value optimized out>, length=<value optimized out>, parser_state=0x4608cdc0)
    at mysql-5.6.1-m5/sql/sql_parse.cc:5550
#24 0x0000000000579e07 in dispatch_command (command=COM_QUERY, thd=0x1463dd0, packet=<value optimized out>, packet_length=115)
    at mysql-5.6.1-m5/sql/sql_parse.cc:1078
#25 0x0000000000610417 in do_handle_one_connection (thd_arg=<value optimized out>)
    at mysql-5.6.1-m5/sql/sql_connect.cc:748
#26 0x0000000000610484 in handle_one_connection (arg=<value optimized out>)
    at mysql-5.6.1-m5/sql/sql_connect.cc:684
#27 0x0000000000968efe in pfs_spawn_thread (arg=<value optimized out>)
    at mysql-5.6.1-m5/storage/perfschema/pfs.cc:1360
#28 0x00002b6140e37143 in start_thread () from /lib64/libpthread.so.0
#29 0x00002b61414a68cd in clone () from /lib64/libc.so.6
#30 0x0000000000000000 in ?? ()

Trying to get some variables.
Some pointers may be invalid and cause the dump to abort.
Query (0x14b1530): SELECT t1.i2 FROM table1 AS t1 LEFT JOIN table2 AS t2 USING (i2) WHERE t1.c2 IN ('a', 4, 154730496, 'w', 2) LIMIT 6
Connection ID (thread ID): 2
Status: NOT_KILLED

How to repeat:
--disable_warnings
DROP TABLE IF EXISTS table1, table2;
--enable_warnings

CREATE TABLE table1 (
 i1 int,
 c1 char(12),
 c2 char(12),
 pk integer auto_increment primary key,
 i2 int,
 key (i2)) ENGINE=InnoDB;

INSERT INTO table1 VALUES
(4, 'if', 'that', NULL, -474021888),
(1, 'we', 'she', NULL, NULL),
(NULL, 'okay', 'xowgqqxe', NULL, -154927104),
(-2097610752, 'its', 'from', NULL, -2114322432),
(NULL, 'd', 'for', NULL, NULL),
(7, 'yxow', 'o', NULL, NULL),
(-1583284224, 'did', 'the', NULL, 183173120),
(-850395136, 'l', 'i', NULL, NULL),
(6, 'a', 'tell', NULL, 2);

CREATE TABLE table2 ( i2 int ) ENGINE=InnoDB;

SELECT * FROM table1 AS t1
 WHERE t1.i2 IN (7 , 132 , 33 , 3 , 6)
 LIMIT 8
 FOR UPDATE;
INSERT INTO table1 (i2, c1) VALUES
 (0 , 3767074816), (5 , 27);

SELECT t1.i2 FROM table1 AS t1
 LEFT JOIN table2 AS t2
 USING (i2)
 WHERE t1.c2 IN ('a', 4, 154730496, 'w', 2)
 LIMIT 6;

# Cleanup
DROP TABLE table1, table2;

--exit
[13 Jan 2011 23:18] Elena Stepanova
Assertion and stack trace for the debug version, same test case:

InnoDB: Assertion failure in thread 1174985024 in file mysql-5.6.1-m5/storage/innobase/rem/rem0rec.c line 812
InnoDB: Failing assertion: len <= col->len || col->mtype == 5

#5  0x00002b3e3fd5ffb0 in abort () from /lib64/libc.so.6
#6  0x00000000009895c0 in rec_get_converted_size_comp_prefix (index=0x156a258, fields=<value optimized out>, n_fields=7, extra=0x0)
    at mysql-5.6.1-m5/storage/innobase/rem/rem0rec.c:812
#7  0x00000000009898b7 in rec_get_converted_size_comp (index=0x156a258, status=<value optimized out>, fields=0x15e10c0, n_fields=7, extra=0x0)
    at mysql-5.6.1-m5/storage/innobase/rem/rem0rec.c:893
#8  0x00000000008b027c in rec_get_converted_size (index=0x156a258, dtuple=0x15e1088, n_ext=0)
    at mysql-5.6.1-m5/storage/innobase/include/rem0rec.ic:1566
#9  0x00000000008b0972 in btr_cur_optimistic_insert (flags=0, cursor=0x4608b190, entry=0x15e1088, rec=0x4608b188, big_rec=0x4608b180, n_ext=0,
    thr=0x15b1438, mtr=0x4608acb0) at mysql-5.6.1-m5/storage/innobase/btr/btr0cur.c:1216
#10 0x0000000000991044 in row_ins_index_entry_low (mode=2, index=0x156a258, entry=0x15e1088, n_ext=0, thr=0x15b1438)
    at mysql-5.6.1-m5/storage/innobase/row/row0ins.c:2107
#11 0x0000000000993a0c in row_ins_index_entry (index=0x156a258, entry=0x15e1088, n_ext=0, foreign=<value optimized out>, thr=0x15b1438)
    at mysql-5.6.1-m5/storage/innobase/row/row0ins.c:2188
#12 0x00000000009945f9 in row_ins_step (thr=0x15b1438)
    at mysql-5.6.1-m5/storage/innobase/row/row0ins.c:2273
#13 0x000000000084e098 in row_insert_for_mysql (mysql_rec=0x15ae5e0 "К", prebuilt=0x156d308)
    at mysql-5.6.1-m5/storage/innobase/row/row0mysql.c:1201
#14 0x000000000083430b in ha_innobase::write_row (this=0x15ae320, record=0x15ae5e0 "К")
    at mysql-5.6.1-m5/storage/innobase/handler/ha_innodb.cc:5414
#15 0x000000000069bed4 in handler::ha_write_row (this=0x15ae320, buf=0x15ae5e0 "К")
    at mysql-5.6.1-m5/sql/handler.cc:5854
#16 0x000000000056c263 in write_record (thd=0x15320d0, table=0x15b3330, info=0x4608b8b0)
    at mysql-5.6.1-m5/sql/sql_insert.cc:1734
#17 0x0000000000573d36 in mysql_insert (thd=0x15320d0, table_list=0x157fbb8, fields=@0x1534830, values_list=@0x1534878, update_fields=@0x1534860,
    update_values=@0x1534848, duplic=DUP_ERROR, ignore=false) at mysql-5.6.1-m5/sql/sql_insert.cc:928
#18 0x000000000058484b in mysql_execute_command (thd=0x15320d0) at mysql-5.6.1-m5/sql/sql_parse.cc:2845
#19 0x00000000005885c8 in mysql_parse (thd=0x15320d0, rawbuf=0x157fa90 "INSERT INTO table1 (i2, c1) VALUES\n(0 , 3767074816), (5 , 27)",
    length=<value optimized out>, parser_state=0x4608cd60) at mysql-5.6.1-m5/sql/sql_parse.cc:5550
#20 0x00000000005894f8 in dispatch_command (command=COM_QUERY, thd=0x15320d0,
    packet=0x1577a61 "INSERT INTO table1 (i2, c1) VALUES\n(0 , 3767074816), (5 , 27)", packet_length=61)
    at mysql-5.6.1-m5/sql/sql_parse.cc:1078
#21 0x000000000058a993 in do_command (thd=0x15320d0) at mysql-5.6.1-m5/sql/sql_parse.cc:815
#22 0x000000000062bd7f in do_handle_one_connection (thd_arg=<value optimized out>)
    at mysql-5.6.1-m5/sql/sql_connect.cc:748
#23 0x000000000062be4a in handle_one_connection (arg=<value optimized out>)
    at mysql-5.6.1-m5/sql/sql_connect.cc:684
#24 0x0000000000a05d1a in pfs_spawn_thread (arg=<value optimized out>)
    at mysql-5.6.1-m5/storage/perfschema/pfs.cc:1360
#25 0x00002b3e3f780143 in start_thread () from /lib64/libpthread.so.0
#26 0x00002b3e3fdef8cd in clone () from /lib64/libc.so.6
#27 0x0000000000000000 in ?? ()
[3 Aug 2011 14:21] Marko Mäkelä
Is this still repeatable?
[3 Aug 2011 15:06] Elena Stepanova
No, it's gone, not reproducible on the current trunk. Possibly it was fixed
along with bug#59483, in any case I'm closing it.