Bug#343639: mysql-server-5.0: Key file corruption during shutdown

2005-12-17 Thread Olaf van der Spek

Hi,

 Or is there any possibility to reproduce this table crash after
 repairing the table once? This would clearly indicate a bug in MySQL.

I'll try, but since it's a 'production' system I can't experiment too much.

 See http://ftp.osuosl.org/pub/mysql/doc/refman/5.0/en/system.html for 
an explanation of this option.


It says:
The only case in which you cannot use --skip-external-locking is ... if 
you run myisamchk to check (not repair) a table without telling the 
server to flush and lock the tables first.


Isn't that what's being done here?
AFAIK that script checks (not repairs) and I didn't see any code to 
flush and lock tables.


BTW, sorry for the wrong from address in the bug report.
--
Olaf van der Spek
http://xccu.sf.net/


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#343639: mysql-server-5.0: Key file corruption during shutdown

2005-12-17 Thread Christian Hammers
Hello Olaf

On 2005-12-17 Olaf van der Spek wrote:
   See http://ftp.osuosl.org/pub/mysql/doc/refman/5.0/en/system.html for 
 an explanation of this option.
 
 It says:
 The only case in which you cannot use --skip-external-locking is ... if 
 you run myisamchk to check (not repair) a table without telling the 
 server to flush and lock the tables first.
 
 Isn't that what's being done here?

myisamchk is referencing the program in /usr/bin. The check scripts that run
at server startup run /usr/bin/mysqlcheck though. This program just
issues a CHECK TABLE SQL command to the server so does not need to care
about extra locking.

The external locking is would only be necessary if the server would not know
that you are fiddling around with its database files with external programs
without letting it know about this (i.e. executing /usr/bin/myisamchk).

bye,

-christian-


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#343639: mysql-server-5.0: Key file corruption during shutdown

2005-12-16 Thread Olaf van der Spek
Package: mysql-server-5.0
Version: 5.0.16-1
Severity: important

Hi,

After a restart I got 'Incorrect key file for table' errors and 'Table '...' is 
marked as crashed and should be repaired' errors.
From syslog:
Dec 16 19:25:09 b mysqld[19851]: 051216 18:25:09 [Note] /usr/sbin/mysqld: 
Normal shutdown
Dec 16 19:25:09 b mysqld[19851]: 
Dec 16 19:25:09 b mysqld[19851]: 051216 18:25:09  InnoDB: Starting shutdown...
Dec 16 19:25:12 b mysqld[19851]: 051216 18:25:12  InnoDB: Shutdown completed; 
log sequence number 0 43741
Dec 16 19:25:12 b mysqld[19851]: 051216 18:25:12 [Note] /usr/sbin/mysqld: 
Shutdown complete
Dec 16 19:25:12 b mysqld[19851]: 
Dec 16 19:25:12 b mysqld_safe[21121]: ended
Dec 16 19:25:12 b mysqld_safe[21181]: started
Dec 16 19:25:13 b mysqld[21184]: 051216 18:25:13  InnoDB: Started; log sequence 
number 0 43741
Dec 16 19:25:13 b mysqld[21184]: 051216 18:25:13 [Note] /usr/sbin/mysqld: ready 
for connections.
Dec 16 19:25:13 b mysqld[21184]: Version: '5.0.16-Debian_1-log'  socket: 
'/var/run/mysqld/mysqld.sock'  port: 3306  Source distribution
Dec 16 19:25:13 b /etc/mysql/debian-start[21218]: Checking for crashed MySQL 
tables.
Dec 16 19:26:17 b mysqld[21184]: 051216 18:26:17 [ERROR] /usr/sbin/mysqld: 
Incorrect key file for table './st_forum/invision_posts.MYI'; try to repair it
Dec 16 19:26:17 b mysqld[21184]: 051216 18:26:17 [ERROR] /usr/sbin/mysqld: 
Incorrect key file for table './st_forum/invision_posts.MYI'; try to repair it
Dec 16 19:29:07 b mysqld[21184]: 051216 18:29:07 [ERROR] /usr/sbin/mysqld: 
Incorrect key file for table './st_forum/invision_topics.MYI'; try to repair it
Dec 16 19:29:07 b mysqld[21184]: 051216 18:29:07 [ERROR] /usr/sbin/mysqld: 
Incorrect key file for table './st_forum/invision_topics.MYI'; try to repair it
Dec 16 19:29:38 b mysqld[21184]: 051216 18:29:38 [ERROR] /usr/sbin/mysqld: 
Incorrect key file for table './st_forum/invision_topics.MYI'; try to repair it
Dec 16 19:29:38 b mysqld[21184]: 051216 18:29:38 [ERROR] /usr/sbin/mysqld: 
Incorrect key file for table './st_forum/invision_topics.MYI'; try to repair it
Dec 16 19:37:05 b mysqld[21184]: 051216 18:37:05 [ERROR] /usr/sbin/mysqld: 
Incorrect key file for table './st_forum/invision_posts.MYI'; try to repair it
Dec 16 19:37:05 b mysqld[21184]: 051216 18:37:05 [ERROR] /usr/sbin/mysqld: 
Incorrect key file for table './st_forum/invision_posts.MYI'; try to repair it
Dec 16 19:37:14 b mysqld[21184]: 051216 18:37:14 [ERROR] /usr/sbin/mysqld: 
Incorrect key file for table './st_forum/invision_posts.MYI'; try to repair it
Dec 16 19:37:14 b mysqld[21184]: 051216 18:37:14 [ERROR] /usr/sbin/mysqld: 
Incorrect key file for table './st_forum/invision_posts.MYI'; try to repair it
Dec 16 19:37:36 b mysqld[21184]: 051216 18:37:36 [ERROR] /usr/sbin/mysqld: 
Incorrect key file for table './st_forum/invision_posts.MYI'; try to repair it
Dec 16 19:37:36 b mysqld[21184]: 051216 18:37:36 [ERROR] /usr/sbin/mysqld: 
Incorrect key file for table './st_forum/invision_posts.MYI'; try to repair it
Dec 16 19:38:16 b mysqld[21184]: 051216 18:38:16 [ERROR] /usr/sbin/mysqld: 
Incorrect key file for table './st_forum/invision_posts.MYI'; try to repair it
Dec 16 19:38:16 b mysqld[21184]: 051216 18:38:16 [ERROR] /usr/sbin/mysqld: 
Incorrect key file for table './st_forum/invision_posts.MYI'; try to repair it
Dec 16 19:40:04 b snmpd[32581]: Connection from UDP: [195.13.63.187]:39403 
Dec 16 19:45:04 b snmpd[32581]: Connection from UDP: [195.13.63.187]:39405 
Dec 16 19:50:04 b snmpd[32581]: Connection from UDP: [195.13.63.187]:39407 
Dec 16 19:55:03 b snmpd[32581]: Connection from UDP: [195.13.63.187]:39409 
Dec 16 20:00:04 b snmpd[32581]: Connection from UDP: [195.13.63.187]:39411 
Dec 16 20:05:05 b snmpd[32581]: Connection from UDP: [195.13.63.187]:39413 
Dec 16 20:05:22 b mysqld[21184]: 051216 19:05:21 [ERROR] /usr/sbin/mysqld: 
Table './st_forum/invision_topics' is marked as crashed and should be repaired
Dec 16 20:05:22 b mysqld[21184]: 051216 19:05:21 [ERROR] /usr/sbin/mysqld: 
Table './st_forum/invision_topics' is marked as crashed and should be repaired
Dec 16 20:05:22 b mysqld[21184]: 051216 19:05:22 [ERROR] /usr/sbin/mysqld: 
Table './st_forum/invision_topics' is marked as crashed and should be repaired
Dec 16 20:05:22 b mysqld[21184]: 051216 19:05:22 [ERROR] /usr/sbin/mysqld: 
Table './st_forum/invision_topics' is marked as crashed and should be repaired
Dec 16 20:05:22 b mysqld[21184]: 051216 19:05:22 [ERROR] /usr/sbin/mysqld: 
Table './st_forum/invision_posts' is marked as crashed and should be repaired

I'm wondering, is the crashed table checker safe to run without external 
locking (and a busy server)?

-- System Information:
Debian Release: testing/unstable
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.12-1-686-smp
Locale: LANG=en_US.ISO-8859-15, LC_CTYPE=en_US.ISO-8859-15 (charmap=ISO-8859-15)

Versions of packages mysql-server-5.0 depends 

Bug#343639: mysql-server-5.0: Key file corruption during shutdown

2005-12-16 Thread Christian Hammers
severity 343639 normal
tag 343639 + moreinfo upstream
thanks

Hello Olaf

On 2005-12-16 Olaf van der Spek wrote:
 After a restart I got 'Incorrect key file for table' errors and 'Table '...'
 is marked as crashed and should be repaired' errors.
I've got these kind of errors a couple of times in the last few years. Mostly
a REPAIR TABLE fixed it.

Such a bug has not been reported in the last couple of months at least which
makes a general problem in this version at least not likely.

To help, you could send a copy of the data files to mysql via
http://bugs.mysql.com and ask them to investigate them to find the cause of
the corruption.

Also likely is bad memory/bad cpu, the usual suspects, but I guess you know
them..

Or is there any possibility to reproduce this table crash after repairing the
table once? This would clearly indicate a bug in MySQL.

See http://dev.mysql.com/doc/refman/5.0/en/crashing.html

 I'm wondering, is the crashed table checker safe to run without external
 locking (and a busy server)?
As long as there is only one MySQL on your server, yes.
See http://ftp.osuosl.org/pub/mysql/doc/refman/5.0/en/system.html for an
explanation of this option.

bye,

-christian-


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]