Re: InnoDB Crash [more info]

2003-02-21 Thread Michael T. Babcock
Michael T. Babcock wrote:


I've got a nice MySQL crash that happened during the night last night and I 
can't seem to get it to come back online for me without --skip-innodb.
 


Follow-up with mysql's bug report:

MySQL support: none
Synopsis:InnoDB Crashing on Startup
Severity:critical
Priority:medium
Category:mysql
Class:sw-bug
Release:mysql-3.23.55 (yes)

Environment:
System: Linux web.fibrespeed.net 2.2.14-10.0 #21 Fri Apr 21 00:22:11 EDT 
2000 i686 unknown
Architecture: i686

Some paths:  /usr/bin/perl /usr/bin/make /usr/bin/gmake /usr/bin/gcc 
/usr/bin/cc
GCC: Reading specs from 
/usr/lib/gcc-lib/i386-redhat-linux/egcs-2.91.66/specs
gcc version egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)

Compilation info: CC='gcc'  CFLAGS='-O2 -march=pentium'  CXX='gcc'  
CXXFLAGS='-O2 -march=pentium'  LDFLAGS='-static'

LIBC:
lrwxrwxrwx1 root root   13 Apr 10  2000 /lib/libc.so.6 
- libc-2.1.3.so
-rwxr-xr-x1 root root  4101836 Jan 15  2001 /lib/libc-2.1.3.so
-rw-r--r--1 root root 20273324 Jan 15  2001 /usr/lib/libc.a
-rw-r--r--1 root root  178 Jan 15  2001 /usr/lib/libc.so
lrwxrwxrwx1 root root   10 Jul 20  2001 
/usr/lib/libc-client.a - c-client.a

Configure command: ./configure '--sysconfdir=/etc' '--prefix=/usr' 
'--localstatedir=/var/mysql' '--enable-assembler' '--with-berkeley-db' 
'--with-innodb' '--with-comment' '--enable-thread-safe-client' 'CC=gcc' 
'CFLAGS=-O2 -march=pentium' 'CXXFLAGS=-O2 -march=pentium' 'CXX=gcc' 
'LDFLAGS=-static'

--
Michael T. Babcock
C.T.O., FibreSpeed Ltd.
http://www.fibrespeed.net/~mbabcock



-
Before posting, please check:
  http://www.mysql.com/manual.php   (the manual)
  http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



Re: InnoDB Crash [more info]

2003-02-21 Thread Heikki Tuuri
Michael,

your database is probably corrupt.

The normal procedure in this case is to use the my.cnf option

set-variable=innodb_force_recovery=4

and dump your tables and recreate the whole tablespace.

But, please do not do that yet. I will send you a new version of

/mysql/innobase/ibuf/ibuf0ibuf.c

which will print a lot of diagnostic information. I want to see what it
prints.

A general note: you are using a very old Linux kernel 2.2.14. Some
combinations of Linux + hardware seem to cause sporadic table corruption.
One user was able to resolve the problem by upgrading to a stock kernel
2.4.20.

Regards,

Heikki
Innobase Oy

sql query

- Original Message -
From: Michael T. Babcock [EMAIL PROTECTED]
Newsgroups: mailing.database.mysql
Sent: Friday, February 21, 2003 9:23 PM
Subject: Re: InnoDB Crash [more info]


 Michael T. Babcock wrote:

 I've got a nice MySQL crash that happened during the night last night and
I
 can't seem to get it to come back online for me without --skip-innodb.
 
 

 Follow-up with mysql's bug report:

 MySQL support: none
 Synopsis:InnoDB Crashing on Startup
 Severity:critical
 Priority:medium
 Category:mysql
 Class:sw-bug
 Release:mysql-3.23.55 (yes)

 Environment:
 System: Linux web.fibrespeed.net 2.2.14-10.0 #21 Fri Apr 21 00:22:11 EDT
 2000 i686 unknown
 Architecture: i686

 Some paths:  /usr/bin/perl /usr/bin/make /usr/bin/gmake /usr/bin/gcc
 /usr/bin/cc
 GCC: Reading specs from
 /usr/lib/gcc-lib/i386-redhat-linux/egcs-2.91.66/specs
 gcc version egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)

 Compilation info: CC='gcc'  CFLAGS='-O2 -march=pentium'  CXX='gcc'
 CXXFLAGS='-O2 -march=pentium'  LDFLAGS='-static'

 LIBC:
 lrwxrwxrwx1 root root   13 Apr 10  2000 /lib/libc.so.6
 - libc-2.1.3.so
 -rwxr-xr-x1 root root  4101836 Jan 15  2001 /lib/libc-2.1.3.so
 -rw-r--r--1 root root 20273324 Jan 15  2001 /usr/lib/libc.a
 -rw-r--r--1 root root  178 Jan 15  2001 /usr/lib/libc.so
 lrwxrwxrwx1 root root   10 Jul 20  2001
 /usr/lib/libc-client.a - c-client.a

 Configure command: ./configure '--sysconfdir=/etc' '--prefix=/usr'
 '--localstatedir=/var/mysql' '--enable-assembler' '--with-berkeley-db'
 '--with-innodb' '--with-comment' '--enable-thread-safe-client' 'CC=gcc'
 'CFLAGS=-O2 -march=pentium' 'CXXFLAGS=-O2 -march=pentium' 'CXX=gcc'
 'LDFLAGS=-static'

 --
 Michael T. Babcock
 C.T.O., FibreSpeed Ltd.
 http://www.fibrespeed.net/~mbabcock



 -
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list archive)

 To request this thread, e-mail [EMAIL PROTECTED]
 To unsubscribe, e-mail
[EMAIL PROTECTED]
 Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: InnoDB Crash [more info]

2003-02-21 Thread Heikki Tuuri
Michael,

how do I send you email? A 'Spamcop' seems to block email to you.

Regards,

Heikki

- Original Message -
From: Heikki Tuuri [EMAIL PROTECTED]
To: Michael T. Babcock [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Friday, February 21, 2003 10:33 PM
Subject: Re: InnoDB Crash [more info]


 Michael,

 your database is probably corrupt.

 The normal procedure in this case is to use the my.cnf option

 set-variable=innodb_force_recovery=4

 and dump your tables and recreate the whole tablespace.

 But, please do not do that yet. I will send you a new version of

 /mysql/innobase/ibuf/ibuf0ibuf.c

 which will print a lot of diagnostic information. I want to see what it
 prints.

 A general note: you are using a very old Linux kernel 2.2.14. Some
 combinations of Linux + hardware seem to cause sporadic table corruption.
 One user was able to resolve the problem by upgrading to a stock kernel
 2.4.20.

 Regards,

 Heikki
 Innobase Oy

 sql query

 - Original Message -
 From: Michael T. Babcock [EMAIL PROTECTED]
 Newsgroups: mailing.database.mysql
 Sent: Friday, February 21, 2003 9:23 PM
 Subject: Re: InnoDB Crash [more info]


  Michael T. Babcock wrote:
 
  I've got a nice MySQL crash that happened during the night last night
and
 I
  can't seem to get it to come back online for me without --skip-innodb.
  
  
 
  Follow-up with mysql's bug report:
 
  MySQL support: none
  Synopsis:InnoDB Crashing on Startup
  Severity:critical
  Priority:medium
  Category:mysql
  Class:sw-bug
  Release:mysql-3.23.55 (yes)
 
  Environment:
  System: Linux web.fibrespeed.net 2.2.14-10.0 #21 Fri Apr 21 00:22:11 EDT
  2000 i686 unknown
  Architecture: i686
 
  Some paths:  /usr/bin/perl /usr/bin/make /usr/bin/gmake /usr/bin/gcc
  /usr/bin/cc
  GCC: Reading specs from
  /usr/lib/gcc-lib/i386-redhat-linux/egcs-2.91.66/specs
  gcc version egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)
 
  Compilation info: CC='gcc'  CFLAGS='-O2 -march=pentium'  CXX='gcc'
  CXXFLAGS='-O2 -march=pentium'  LDFLAGS='-static'
 
  LIBC:
  lrwxrwxrwx1 root root   13 Apr 10  2000 /lib/libc.so.6
  - libc-2.1.3.so
  -rwxr-xr-x1 root root  4101836 Jan 15  2001
/lib/libc-2.1.3.so
  -rw-r--r--1 root root 20273324 Jan 15  2001 /usr/lib/libc.a
  -rw-r--r--1 root root  178 Jan 15  2001 /usr/lib/libc.so
  lrwxrwxrwx1 root root   10 Jul 20  2001
  /usr/lib/libc-client.a - c-client.a
 
  Configure command: ./configure '--sysconfdir=/etc' '--prefix=/usr'
  '--localstatedir=/var/mysql' '--enable-assembler' '--with-berkeley-db'
  '--with-innodb' '--with-comment' '--enable-thread-safe-client' 'CC=gcc'
  'CFLAGS=-O2 -march=pentium' 'CXXFLAGS=-O2 -march=pentium' 'CXX=gcc'
  'LDFLAGS=-static'
 
  --
  Michael T. Babcock
  C.T.O., FibreSpeed Ltd.
  http://www.fibrespeed.net/~mbabcock
 
 
 
  -
  Before posting, please check:
 http://www.mysql.com/manual.php   (the manual)
 http://lists.mysql.com/   (the list archive)
 
  To request this thread, e-mail [EMAIL PROTECTED]
  To unsubscribe, e-mail
 [EMAIL PROTECTED]
  Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
 




-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: InnoDB Crash [more info]

2003-02-21 Thread Heikki Tuuri
Michael,

since the 'Spamcop':


  Recipient: [EMAIL PROTECTED]
  Reason:Blocked - see http://spamcop.net/bl.shtml?194.251.242.203


has blocked email to you, I post the patch here. This patch makes InnoDB to
print a lot of diagnostic info if it notices the failure you have. It also
tries to recover from the failure by discarding possible insert buffer
records for that page.

Best regards,

Heikki
Innobase Oy
sql query

--- 1.11/innobase/ibuf/ibuf0ibuf.c Mon Jul  8 19:27:47 2002
+++ 1.12/innobase/ibuf/ibuf0ibuf.c Fri Feb 21 23:11:10 2003
 -2483,7 +2483,9 
  ulint old_bits;
  ulint new_bits;
  dulint max_trx_id;
+ ibool corruption_noticed = FALSE;
  mtr_t mtr;
+ char err_buf[500];

  if (srv_force_recovery = SRV_FORCE_NO_IBUF_MERGE) {

 -2535,7 +2537,38 
  block = buf_block_align(page);
  rw_lock_x_lock_move_ownership((block-lock));

- ut_a(fil_page_get_type(page) == FIL_PAGE_INDEX);
+ if (fil_page_get_type(page) != FIL_PAGE_INDEX) {
+
+ corruption_noticed = TRUE;
+
+ ut_print_timestamp(stderr);
+
+ mtr_start(mtr);
+
+ fprintf(stderr,
+  InnoDB: Dump of the ibuf bitmap page:\n);
+
+ bitmap_page = ibuf_bitmap_get_map_page(space, page_no,
+ mtr);
+ buf_page_print(bitmap_page);
+
+ mtr_commit(mtr);
+
+ fprintf(stderr, \nInnoDB: Dump of the page:\n);
+
+ buf_page_print(page);
+
+ fprintf(stderr,
+InnoDB: Error: corruption in the tablespace. Bitmap shows insert\n
+InnoDB: buffer records to page n:o %lu though the page\n
+InnoDB: type is %lu, which is not an index page!\n
+InnoDB: We try to resolve the problem by skipping the insert buffer\n
+InnoDB: merge for this page. Please run CHECK TABLE on your tables\n
+InnoDB: to determine if they are corrupt after this.\n\n
+InnoDB: Please make a detailed bug report and send it to\n
+InnoDB: [EMAIL PROTECTED],
+ page_no, fil_page_get_type(page));
+ }
  }

  n_inserts = 0;
 -2578,8 +2611,14 

  goto reset_bit;
  }
+
+ if (corruption_noticed) {
+ rec_sprintf(err_buf, 450, ibuf_rec);
+
+ fprintf(stderr,
+InnoDB: Discarding record\n %s\n from the insert buffer!\n\n, err_buf);

-if (page) {
+} else if (page) {
  /* Now we have at pcur a record which should be
  inserted to the index page; NOTE that the call below
  copies pointers to fields in ibuf_rec, and we must

- Original Message -
From: Heikki Tuuri [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Friday, February 21, 2003 10:35 PM
Subject: Re: InnoDB Crash [more info]


 Michael,

 how do I send you email? A 'Spamcop' seems to block email to you.

 Regards,

 Heikki

 - Original Message -
 From: Heikki Tuuri [EMAIL PROTECTED]
 To: Michael T. Babcock [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]
 Sent: Friday, February 21, 2003 10:33 PM
 Subject: Re: InnoDB Crash [more info]


  Michael,
 
  your database is probably corrupt.
 
  The normal procedure in this case is to use the my.cnf option
 
  set-variable=innodb_force_recovery=4
 
  and dump your tables and recreate the whole tablespace.
 
  But, please do not do that yet. I will send you a new version of
 
  /mysql/innobase/ibuf/ibuf0ibuf.c
 
  which will print a lot of diagnostic information. I want to see what it
  prints.
 
  A general note: you are using a very old Linux kernel 2.2.14. Some
  combinations of Linux + hardware seem to cause sporadic table
corruption.
  One user was able to resolve the problem by upgrading to a stock kernel
  2.4.20.
 
  Regards,
 
  Heikki
  Innobase Oy
 
  sql query
 
  - Original Message -
  From: Michael T. Babcock [EMAIL PROTECTED]
  Newsgroups: mailing.database.mysql
  Sent: Friday, February 21, 2003 9:23 PM
  Subject: Re: InnoDB Crash [more info]
 
 
   Michael T. Babcock wrote:
  
   I've got a nice MySQL crash that happened during the night last night
 and
  I
   can't seem to get it to come back online for me
without --skip-innodb.
   
   
  
   Follow-up with mysql's bug report:
  
   MySQL support: none
   Synopsis:InnoDB Crashing on Startup
   Severity:critical
   Priority:medium
   Category:mysql
   Class:sw-bug
   Release:mysql-3.23.55 (yes)
  
   Environment:
   System: Linux web.fibrespeed.net 2.2.14-10.0 #21 Fri Apr 21 00:22:11
EDT
   2000 i686 unknown
   Architecture: i686
  
   Some paths:  /usr/bin/perl /usr/bin/make /usr/bin/gmake /usr/bin/gcc
   /usr/bin/cc
   GCC: Reading specs from
   /usr/lib/gcc-lib/i386-redhat-linux/egcs-2.91.66/specs
   gcc version egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)
  
   Compilation info: CC='gcc'  CFLAGS='-O2 -march=pentium'  CXX='gcc'
   CXXFLAGS='-O2 -march=pentium'  LDFLAGS='-static'
  
   LIBC:
   lrwxrwxrwx1 root root   13 Apr 10  2000 /lib/libc.so.6
   - libc-2.1.3.so
   -rwxr-xr-x1 root root  4101836 Jan 15  2001
 /lib/libc-2.1.3.so
   -rw-r--r--1 root root 20273324 Jan 15  2001
/usr/lib/libc.a
   -rw-r--r--1 root root  178 Jan 15  2001
/usr/lib/libc.so
   lrwxrwxrwx1 root root   10 Jul 20  2001
   /usr/lib/libc