Bug #63810 Failing assertion: block->page.file_page_was_freed == FALSE
Submitted: 20 Dec 2011 17:41 Modified: 14 Jan 2012 11:22
Reporter: Davi Arnaut (OCA) Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server: InnoDB storage engine Severity:S3 (Non-critical)
Version:5.5.19 OS:Any
Assigned to: CPU Architecture:Any

[20 Dec 2011 17:41] Davi Arnaut
Description:
InnoDB assertion during a RQG run of the varchar scenario:

111220  6:21:19  InnoDB: Assertion failure in thread 1137543488 in file buf0buf.c line 2837
InnoDB: Failing assertion: block->page.file_page_was_freed == FALSE
InnoDB: We intentionally generate a memory trap.

Backtrace:

#0  0x00002b5e4de35d02 in pthread_kill () from /lib64/libpthread.so.0
#0  0x00002b5e4de35d02 in pthread_kill () from /lib64/libpthread.so.0
#1  0x00000000007a0c78 in my_write_core ()
#2  0x00000000004e9955 in handle_segfault ()
#3  <signal handler called>
#4  0x00002b5e4ed54265 in raise () from /lib64/libc.so.6
#5  0x00002b5e4ed55d10 in abort () from /lib64/libc.so.6
#6  0x000000000088ef98 in buf_page_get_known_nowait ()
#7  0x00000000008e8038 in ibuf_merge_or_delete_for_page ()
#8  0x00000000008897e9 in buf_page_io_complete ()
#9  0x00000000008c5bc6 in fil_aio_wait ()
#10 0x00000000008360ad in io_handler_thread ()
#11 0x00002b5e4de3073d in start_thread () from /lib64/libpthread.so.0
#12 0x00002b5e4edf7f6d in clone () from /lib64/libc.so.6

How to repeat:
RQG command line:

randgen-2.2-snapshot/gentest.pl \
--dsn=dbi:mysql:host=127.0.0.1:port=6400:user=root:database=test \
--logconf=/tmp/var-randgen/std_data/randgen/log.conf \
--gendata=randgen-2.2-snapshot/conf/engines/varchar.zz \ 
--grammar=randgen-2.2-snapshot/conf/engines/varchar.yy \
 --reporter=Backtrace,ErrorLog \
 --engine=InnoDB \
 --queries=1M \
 --rows=10000 \
 --seed=time \
 --duration=600 \

# 2011-12-20'T'06:10:06 Converting --seed=time to --seed=1324350606
[20 Dec 2011 18:54] Valeriy Kravchuk
With recent enough 5.5.20-debug on Mac I've got assertion failure in another place while running this test:

111217 20:35:07 [Note] /Users/openxs/dbs/5.5/bin/mysqld: ready for connections.
Version: '5.5.20-debug'  socket: '/tmp/mysql.sock'  port: 3306  Source distribution
111217 21:22:39 mysqld_safe A mysqld process already exists
Assertion failed: (min_key || max_key), function records_in_range, file /Users/openxs/bzr2/mysql-5.5-work/storage/innobase/handler/ha_innodb.cc, line 7530.
18:51:45 UTC - mysqld got signal 6 ;
...
[20 Dec 2011 18:58] Valeriy Kravchuk
Also we still have bug #58815 as verified.
[22 Dec 2011 7:50] Valeriy Kravchuk
Same assertion with 5.5.21-debug on Linux:

...
mysqld: /home/openxs/bzr/mysql-5.5-work/storage/innobase/handler/ha_innodb.cc:7529: virtual ha_rows ha_innobase::records_in_range(uint, key_range*, key_range*): Assertion `min_key || max_key' failed.
07:37:48 UTC - mysqld got signal 6 ;
...
[22 Dec 2011 16:43] Davi Arnaut
The above assertion is probably Bug#63618. You would have to comment that out to reproduce this one.
[22 Dec 2011 18:55] Valeriy Kravchuk
Now I see why assertion looks familiar... Anyway, after commenting it out that test run passed OK with 5.5.20-debug on Mac OS X.
[14 Jan 2012 11:22] Sveta Smirnova
Thank you for the feedback.

Crash is not repeatable for me on Linux too. Looks like this bug solved by same code modification which fixed bug #58815