mysqld service falha ao reiniciar, depois de importar mysqldump #innodb

1

Eu tenho 2 servidores mysql. Vamos chamá-los de server01 & server02 . Ambos possuem a mesma configuração: mysqladmin Ver 8.42 Distrib 5.1.61, para redhat-linux-gnu em x86_64

[client]
default-character-set=utf8

[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0
max_allowed_packet = 16M
default-character-set=utf8
default-collation=utf8_unicode_ci
character-set-server=utf8
collation-server=utf8_unicode_ci
default-storage-engine = InnoDB
innodb_data_home_dir = /var/lib/mysql 
innodb_log_group_home_dir = /var/lib/mysql
innodb_data_file_path = ibdata1:10M:autoextend
innodb_additional_mem_pool_size = 2M
innodb_log_file_size = 5M 
innodb_log_buffer_size = 8M
innodb_lock_wait_timeout = 50
innodb_flush_log_at_trx_commit = 1

innodb_buffer_pool_size = 700M
table_cache = 300
thread_cache_size = 4
query_cache_size = 200m
query_cache_limit = 10m

[mysqld_safe] 
log-error=/var/log/mysqld.log 
pid-file=/var/run/mysqld/mysqld.pid

Eu faço um mysqldump no server01: mysqldump -uuser -ppassword --all-databases > testservers.sql
(a maioria das tabelas nestas bases de dados são innodb, algumas das tabelas mysql. * são Innodb também)

Em seguida, importo o servidor de testes.sql no server02: mysql -uuser < testservers.sql
(o mysqld foi iniciado com o --skip-network).

Até aí tudo bem, eu posso entrar no mysql & tudo parece estar bem. MAS quando eu sair para o shell e executar service mysqld restart , o serviço falha ao iniciar.

stack-trace em /var/log/mysqld.log:

121022 14:53:19 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
121022 14:53:19 [Warning] '--default-character-set' is deprecated and will be removed in a future release. Please use '--character-set-server' instead.
121022 14:53:19 [Warning] '--default-collation' is deprecated and will be removed in a future release. Please use '--collation-server' instead.
12:53:19 UTC - 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=8384512
read_buffer_size=131072
max_used_connections=0
max_threads=151
thread_count=0
connection_count=0
It is possible that mysqld could use up to 
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 338324 K  bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

Thread pointer: 0x267e630
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 = 7fff3efe0be0 thread_stack 0x40000
/usr/libexec/mysqld(my_print_stacktrace+0x29) [0x84bd89]
/usr/libexec/mysqld(handle_fatal_signal+0x483) [0x6a0be3]
/lib64/libpthread.so.0() [0x338d60f500]
/usr/libexec/mysqld(ha_resolve_by_name(THD*, st_mysql_lex_string const*)+0x81) [0x6956e1]
/usr/libexec/mysqld(open_table_def(THD*, st_table_share*, unsigned int)+0xe0a) [0x60e5ba]
/usr/libexec/mysqld(get_table_share(THD*, TABLE_LIST*, char*, unsigned int, unsigned int, int*)+0x20b) [0x602b0b]
/usr/libexec/mysqld() [0x603597]
/usr/libexec/mysqld(open_table(THD*, TABLE_LIST*, st_mem_root*, bool*, unsigned int)+0x7a1) [0x6079a1]
/usr/libexec/mysqld(open_tables(THD*, TABLE_LIST**, unsigned int*, unsigned int)+0x5d0) [0x608570]
/usr/libexec/mysqld(open_and_lock_tables_derived(THD*, TABLE_LIST*, bool)+0x6a) [0x60877a]
/usr/libexec/mysqld(plugin_init(int*, char**, int)+0x622) [0x715af2]
/usr/libexec/mysqld() [0x5bd3b2]
/usr/libexec/mysqld(main+0x1b3) [0x5bfc93]
/lib64/libc.so.6(__libc_start_main+0xfd) [0x338d21ecdd]
/usr/libexec/mysqld() [0x5087b9]

Trying to get some variables.
Some pointers may be invalid and cause the dump to abort.
Query (0): is an invalid pointer
Connection ID (thread ID): 0
Status: 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.
121022 14:53:19 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended

Uma entrada típica do mysqdump é assim:

DROP TABLE IF EXISTS 'adodb_logsql';
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE 'adodb_logsql' (
  'id' bigint(10) unsigned NOT NULL AUTO_INCREMENT,
  'created' datetime NOT NULL,
  'sql0' varchar(250) NOT NULL DEFAULT '',
  'sql1' text,
  'params' text,
  'tracer' text,
  'timer' decimal(16,6) NOT NULL DEFAULT '0.000000',
  PRIMARY KEY ('id')
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='to save some logs from ADOdb';
/*!40101 SET character_set_client = @saved_cs_client */;

SE eu alterar todas as ocorrências de "ENGINE = InnoDB" para "ENGINE = MyISAM" antes da importação, o serviço não terá problemas para reiniciar . Estou bastante intrigado com o que está acontecendo, talvez eu seja apenas um idiota, então, por todos os meios, me diga isso.

Qualquer ajuda seria muito apreciada!

    
por ubunut 24.10.2012 / 08:44

0 respostas