Description:
I crashed a somewhat idle 5.5.8 server rather than wait for a clean shutdown. Users were not connected but it was doing insert buffer merges and some dirty pages. I then tried to run crash recovery using 5.1.52 innodb plugin and that crashed.
Is this expected to work?
Version: '5.1.52' socket: '/data/5152fastfree/var/mysql.sock' port: 3306 Source distribution
101229 18:49:31 InnoDB: Assertion failure in thread 1189869888 in file ibuf/ibuf0ibuf.c line 1398
InnoDB: Failing assertion: comp <= 1
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.1/en/forcing-recovery.html
InnoDB: about forcing recovery.
101229 18:49:31 - 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=8384512
read_buffer_size=131072
max_used_connections=1
max_threads=2000
threads_connected=0
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 4381531 K
bytes of memory
Hope that's ok; if not, decrease some variables in the equation.
thd: 0x0
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 = (nil) thread_stack 0x40000
/data/5152fastfree/libexec/mysqld(my_print_stacktrace+0x2e) [0x84091e]
/data/5152fastfree/libexec/mysqld(handle_segfault+0x31d) [0x59523d]
/lib64/libpthread.so.0 [0x316640de70]
/lib64/libc.so.6(gsignal+0x35) [0x3165c30155]
/lib64/libc.so.6(abort+0x110) [0x3165c31bf0]
/data/5152fastfree/libexec/mysqld [0x7180d6]
/data/5152fastfree/libexec/mysqld [0x71c960]
/data/5152fastfree/libexec/mysqld [0x71d0d1]
/data/5152fastfree/libexec/mysqld [0x71d25e]
/data/5152fastfree/libexec/mysqld [0x77120b]
/lib64/libpthread.so.0 [0x31664062f7]
/lib64/libc.so.6(clone+0x6d) [0x3165cd1e3d]
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.
101229 18:49:32 mysqld_safe Number of processes running now: 0
101229 18:49:32 mysqld_safe mysqld restarted
101229 18:49:32 mysqld_safe Number of processes running now: 0
101229 18:49:32 mysqld_safe mysqld restarted
101229 18:49:32 [Note] Flashcache bypass: disabled
101229 18:49:32 [Note] Flashcache setup error is : ioctl failed
-----
Using resolve_stack_dump
0x3165c30155 _end + 1693276445
0x3165c31bf0 _end + 1693283256
0x7180d6 ibuf_rec_get_volume + 1398
0x71c960 ibuf_get_merge_page_nos + 1040
0x71d0d1 ibuf_contract_ext + 641
0x71d25e ibuf_contract_for_n_pages + 62
0x77120b srv_master_thread + 2411
0x31664062f7 _end + 1701493439
static
ulint
ibuf_rec_get_volume(
/*================*/
const rec_t* ibuf_rec)/*!< in: ibuf record */
{
dtype_t dtype;
ibool new_format = FALSE;
ulint data_size = 0;
ulint n_fields;
const byte* types;
const byte* data;
ulint len;
ulint i;
ulint comp;
ut_ad(ibuf_inside());
ut_ad(rec_get_n_fields_old(ibuf_rec) > 2);
data = rec_get_nth_field_old(ibuf_rec, 1, &len);
if (len > 1) {
/* < 4.1.x format record */
ut_a(trx_doublewrite_must_reset_space_ids);
ut_a(!trx_sys_multiple_tablespace_format);
n_fields = rec_get_n_fields_old(ibuf_rec) - 2;
types = rec_get_nth_field_old(ibuf_rec, 1, &len);
ut_ad(len == n_fields * DATA_ORDER_NULL_TYPE_BUF_SIZE);
comp = 0;
} else {
/* >= 4.1.x format record */
ut_a(trx_sys_multiple_tablespace_format);
ut_a(*data == 0);
types = rec_get_nth_field_old(ibuf_rec, 3, &len);
comp = len % DATA_NEW_ORDER_NULL_TYPE_BUF_SIZE;
ut_a(comp <= 1); <------ the crash is here
How to repeat:
1) run the insert benchmark using mysql 5.5.8
2) after it finishes but before all ibuf entries are merged, kill mysqld
3) copy files to 5.1.52 innodb plugin database and try to run crash recovery