Description:
MYSQL server crashes every two hours, comes straight back up but I am worried about data corruptions. I have checked and repaired all tables (some ISAM some innodb) but it continues to crash, below is the output of the error.log. as a point this server is also producing binary logs and acts as a mster with one slave, the slave reports no issues at all other than loosing connectivity briefly with the master.
I need help in finding why this is crashing. I have around 50 DB's on this system but they are all all quite small.
111101 20:52:16 - mysqld got signal 11 ;
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=16777216
read_buffer_size=131072
max_used_connections=3
max_threads=151
threads_connected=3
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 346495 K
bytes of memory
Hope that's ok; if not, decrease some variables in the equation.
thd: 0x7fc820502ec0
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 = 0x7fc81e3aae58 thread_stack 0x30000
/usr/sbin/mysqld(my_print_stacktrace+0x29) [0x7fc81eaa01a9]
/usr/sbin/mysqld(handle_segfault+0x404) [0x7fc81e7ad884]
/lib/libpthread.so.0(+0xf8f0) [0x7fc81e01d8f0]
/usr/sbin/mysqld(get_field(st_mem_root*, Field*, String*)+0x65) [0x7fc81e803aa5]
/usr/sbin/mysqld(store_schema_proc(THD*, st_table*, st_table*, char const*, bool, char const*)+0x707) [0x7fc81e8d0eb7]
/usr/sbin/mysqld(fill_schema_proc(THD*, TABLE_LIST*, Item*)+0x220) [0x7fc81e8d1180]
/usr/sbin/mysqld(get_schema_tables_result(JOIN*, enum_schema_table_state)+0x207) [0x7fc81e8cfa17]
/usr/sbin/mysqld(JOIN::exec()+0x4e5) [0x7fc81e82df25]
/usr/sbin/mysqld(mysql_select(THD*, Item***, TABLE_LIST*, unsigned int, List<Item>&, Item*, unsigned int, st_order*, st_order*, Item*, st_order*, unsigned lon
g long, select_result*, st_select_lex_unit*, st_select_lex*)+0x142) [0x7fc81e82a302]
/usr/sbin/mysqld(handle_select(THD*, st_lex*, select_result*, unsigned long)+0x174) [0x7fc81e82fc04]
/usr/sbin/mysqld(+0x36d9fa) [0x7fc81e7bb9fa]
/usr/sbin/mysqld(mysql_execute_command(THD*)+0x526) [0x7fc81e7bf806]
/usr/sbin/mysqld(mysql_parse(THD*, char const*, unsigned int, char const**)+0x35f) [0x7fc81e7c4cbf]
/usr/sbin/mysqld(dispatch_command(enum_server_command, THD*, char*, unsigned int)+0xd69) [0x7fc81e7c5a39]
/usr/sbin/mysqld(do_command(THD*)+0xea) [0x7fc81e7c661a]
/usr/sbin/mysqld(handle_one_connection+0x23d) [0x7fc81e7b864d]
/lib/libpthread.so.0(+0x69ca) [0x7fc81e0149ca]
/lib/libc.so.6(clone+0x6d) [0x7fc81cb4b6cd]
Trying to get some variables.
Some pointers may be invalid and cause the dump to abort...
thd->query at 0x7fc82050d7b0 = SELECT SPECIFIC_NAME,ROUTINE_NAME,ROUTINE_TYPE,DTD_IDENTIFIER FROM information_schema.ROUTINES WHERE ROUTINE_SCHEMA= 'wealdosc'
thd->thread_id=16
thd->killed=NOT_KILLED
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.
111101 20:52:16 [Note] Plugin 'FEDERATED' is disabled.
InnoDB: The log sequence number in ibdata files does not match
InnoDB: the log sequence number in the ib_logfiles!
111101 20:52:16 InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files...
InnoDB: Restoring possible half-written data pages from the doublewrite
InnoDB: buffer...
InnoDB: Last MySQL binlog file position 0 170407, file name /var/log/mysql/mysql-bin.000033
111101 20:52:17 InnoDB: Started; log sequence number 0 41918446
111101 20:52:17 [Note] Recovering after a crash using /var/log/mysql/mysql-bin
111101 20:52:17 [Note] Starting crash recovery...
111101 20:52:17 [Note] Crash recovery finished.
111101 20:52:17 [Note] Event Scheduler: Loaded 0 events
111101 20:52:17 [Note] /usr/sbin/mysqld: ready for connections.
Version: '5.1.41-3ubuntu12.10-log' socket: '/var/run/mysqld/mysqld.sock' port: 3306 (Ubuntu)
111101 20:53:26 [ERROR] /usr/sbin/mysqld: Table './bookingdb29/players' is marked as crashed and should be repaired
111101 20:53:26 [Warning] Checking table: './bookingdb29/players'
root@ebookingonline:/var/log/mysql#
How to repeat:
Looking at the binary logs the last statement recorded was an update which when repeated in phpmyadmin causes the server to crash again.
update sessions set expiry = '1320096632', value = 'sessiontoken|s:32:\"d04a5d06f081f10a2d082e40072238d1\";cart|O:12:\"shoppingCart\":4:{s:8:\"contents\";a:0:{}s:5:\"total\";i:0;s:6:\"weight\";i:0;s:12:\"content_type\";b:0;}language|s:7:\"english\";languages_id|s:1:\"1\";currency|s:3:\"GBP\";navigation|O:17:\"navigationHistory\":2:{s:4:\"path\";a:1:{i:0;a:4:{s:4:\"page\";s:9:\"index.php\";s:4:\"mode\";s:6:\"NONSSL\";s:3:\"get\";a:4:{s:4:\"page\";s:1:\"1\";s:4:\"sort\";s:2:\"2a\";s:6:\"osCsid\";s:26:\"nr4rjdq97fkkt0j7vi7fflj5g0\";s:5:\"cPath\";s:5:\"24_47\";}s:4:\"post\";a:0:{}}}s:8:\"snapshot\";a:0:{}}sess_discount_code|N;' where sesskey = 'nr4rjdq97fkkt0j7vi7fflj5g0'
Structure of table is:
--
-- Table structure for table `sessions`
--
CREATE TABLE IF NOT EXISTS `sessions` (
`sesskey` varchar(32) NOT NULL,
`expiry` int(11) unsigned NOT NULL,
`value` text NOT NULL,
PRIMARY KEY (`sesskey`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;