Mon serveur est tombé en panne aujourd'hui, je pense en raison d'une commande de table tronquée simultanée sur l'une de nos tables INNODB. Le serveur peut être redémarré, mais après son démarrage, chaque fois que j'essaie d'émettre une commande SQL, j'obtiens l'erreur suivante:
ERROR 2006 (HY000): MySQL server has gone away
C'est ce qui s'est passé dans les journaux:
121206 01:11:12 mysqld restarted
121206 1:11:13 InnoDB: Started; log sequence number 275 559321759
InnoDB: !!! innodb_force_recovery is set to 1 !!!
121206 1:11:13 [Note] /usr/libexec/mysqld: ready for connections.
Version: '5.0.95-log' socket: '/var/lib/mysql/mysql.sock' port: 3306 Source distribution
InnoDB: Error: trying to load index PRIMARY for table
InnoDB: but the index tree has been freed!
121206 1:11:37 - 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=134217728
read_buffer_size=1048576
max_used_connections=1
max_connections=400
threads_connected=1
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_connections = 950272 K
bytes of memory
Hope that's ok; if not, decrease some variables in the equation.
thd=0x9900950
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...
Cannot determine thread, fp=0x46353fa0, backtrace may not be correct.
Stack range sanity check OK, backtrace follows:
(nil)
New value of fp=0x9900950 failed sanity check, terminating stack trace!
Please read http://dev.mysql.com/doc/mysql/en/using-stack-trace.html and follow instructions on how to resolve the stack trace. Resolved
stack trace is much more helpful in diagnosing the problem, so please do
resolve it
Trying to get some variables.
Some pointers may be invalid and cause the dump to abort...
thd->query at 0x993e500 =
thd->thread_id=1
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.
J'ai cherché en ligne et je comprends qu'il s'agit d'un bogue MySQL, mais je ne sais pas comment le résoudre. J'utilise la version 5.0.95 de MySQL.
Il semble que je doive créer une nouvelle base de données et vider les anciennes données dans la nouvelle, mais comment puis-je le faire si je ne peux même pas émettre de commandes SQL vers la actuelle?
--- MISE À JOUR ---
Version: socket '5.0.95-log': port '/var/lib/mysql/mysql.sock': 3306 Distribution source InnoDB: Erreur: tentative de chargement de l'index PRIMARY pour la table InnoDB: mais le l'arbre d'index a été libéré! 121206 4:13:41 - mysqld a reçu le signal 11; Cela pourrait être parce que vous frappez un bug. Il est également possible que ce fichier binaire ou l'une des bibliothèques auxquelles il était lié soit corrompu, mal construit ou mal configuré. Cette erreur peut également être causée par un mauvais fonctionnement du matériel. Nous ferons de notre mieux pour récupérer des informations qui, espérons-le, aideront à diagnostiquer le problème, mais comme nous avons déjà planté, quelque chose ne va vraiment pas et cela peut échouer.
key_buffer_size=134217728
read_buffer_size=1048576
max_used_connections=1
max_connections=400
threads_connected=1
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_connections = 950272 K
bytes of memory
Hope that's ok; if not, decrease some variables in the equation.
thd=0x17fb8950
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...
Cannot determine thread, fp=0x464a3fa0, backtrace may not be correct.
Stack range sanity check OK, backtrace follows:
(nil)
New value of fp=0x17fb8950 failed sanity check, terminating stack trace!
Please read http://dev.mysql.com/doc/mysql/en/using-stack-trace.html and follow instructions on how to resolve the stack trace. Resolved
stack trace is much more helpful in diagnosing the problem, so please do
resolve it
Trying to get some variables.
Some pointers may be invalid and cause the dump to abort...
thd->query at 0x17ff6500 =
thd->thread_id=3
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.
Number of processes running now: 0
121206 04:13:41 mysqld restarted
InnoDB: The log sequence number in ibdata files does not match
InnoDB: the log sequence number in the ib_logfiles!
121206 4:13:42 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...
121206 4:13:43 InnoDB: Started; log sequence number 275 559323148
121206 4:13:43 [Note] /usr/libexec/mysqld: ready for connections.
Version: '5.0.95-log' socket: '/var/lib/mysql/mysql.sock' port: 3306 Source distribution