?
Solved

mysql crash

Posted on 2011-05-01
2
Medium Priority
?
1,019 Views
Last Modified: 2012-05-11
Hi,

Mysql crash and now I can not start because mysql can not recover ibdata1

This is the output of mysqld

110502  0:56:06 [Note] Plugin 'FEDERATED' is disabled.
InnoDB: Log scan progressed past the checkpoint lsn 13 1823546518
110502  0:56:06  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: Doing recovery: scanned up to log sequence number 13 1823634000
InnoDB: Error: trying to access page number 7882624 in space 0,
InnoDB: space name ./ibdata1,
InnoDB: which is outside the tablespace bounds.
InnoDB: Byte offset 0, len 16384, i/o type 10.
InnoDB: If you get this error at mysqld startup, please check that
InnoDB: your my.cnf matches the ibdata files that you have in the
InnoDB: MySQL server.
110502  0:56:06  InnoDB: Assertion failure in thread 3066525392 in file ../../../storage/innobase/fil/fil0fil.c line 4073
InnoDB: We intentionally generate a memory trap.
InnoDB: Submit a detailed bug report to http://bugs.mysql.com.
InnoDB: If you get repeated assertion failures or crashes, even
InnoDB: immediately after the mysqld startup, there may be
InnoDB: corruption in the InnoDB tablespace. Please refer to
InnoDB: http://dev.mysql.com/doc/refman/5.1/en/forcing-recovery.html
InnoDB: about forcing recovery.
110502  0:56:06 - mysqld got signal 6 ;
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=2147483648
read_buffer_size=1048576
max_used_connections=0
max_threads=151
threads_connected=0
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 3489728 K
bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

thd: 0x0
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 = (nil) thread_stack 0x30000
mysqld(my_print_stacktrace+0x2d) [0xb7559cbd]
mysqld(handle_segfault+0x494) [0xb7225854]
[0xb6fa0400]
/lib/tls/i686/cmov/libc.so.6(abort+0x182) [0xb6ca6a82]
mysqld(fil_io+0x484) [0xb743a444]
mysqld(+0x463c3a) [0xb7421c3a]
mysqld(buf_read_page+0x279) [0xb7422819]
mysqld(buf_page_get_gen+0x331) [0xb741bb91]
mysqld(trx_undo_lists_init+0x524) [0xb74cc3c4]
mysqld(+0x502918) [0xb74c0918]
mysqld(trx_rseg_list_and_array_init+0xc5) [0xb74c0bb5]
mysqld(trx_sys_init_at_db_start+0x175) [0xb74c1b95]
mysqld(innobase_start_or_create_for_mysql+0x129e) [0xb74b045e]
mysqld(+0x43e7e6) [0xb73fc7e6]
mysqld(ha_initialize_handlerton(st_plugin_int*)+0x3f) [0xb733111f]
mysqld(+0x411f2a) [0xb73cff2a]
mysqld(plugin_init(int*, char**, int)+0x8a7) [0xb73d3827]
mysqld(+0x2698d2) [0xb72278d2]
mysqld(main+0x1fa) [0xb722af9a]
/lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe6) [0xb6c8fbd6]
mysqld(+0x182d81) [0xb7140d81]
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.

Can you help me to fix this.

Best regards

André Bolinhas
0
Comment
Question by:abolinhas
  • 2
2 Comments
 
LVL 9

Accepted Solution

by:
abolinhas earned 0 total points
ID: 35506588
Hi,

I'm able to fix the problem, the cause of the problem was i'm trying restore the mysql by copy & paste all content (MYI, MYD and FRM), and when every time that I tryed start the mysql, the mysql crashed when try restore the ibdata1

ERROR:
This is the output of mysqld

110502 0:56:06 [Note] Plugin 'FEDERATED' is disabled.
InnoDB: Log scan progressed past the checkpoint lsn 13 1823546518
110502 0:56:06 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: Doing recovery: scanned up to log sequence number 13 1823634000
InnoDB: Error: trying to access page number 7882624 in space 0,
InnoDB: space name ./ibdata1,
InnoDB: which is outside the tablespace bounds.
InnoDB: Byte offset 0, len 16384, i/o type 10.
InnoDB: If you get this error at mysqld startup, please check that
InnoDB: your my.cnf matches the ibdata files that you have in the
InnoDB: MySQL server.
110502 0:56:06 InnoDB: Assertion failure in thread 3066525392 in file ../../../storage/innobase/fil/fil0fil.c line 4073
InnoDB: We intentionally generate a memory trap.
InnoDB: Submit a detailed bug report to http://bugs.mysql.com.
InnoDB: If you get repeated assertion failures or crashes, even
InnoDB: immediately after the mysqld startup, there may be
InnoDB: corruption in the InnoDB tablespace. Please refer to
InnoDB: http://dev.mysql.com/doc/refman/5.1/en/ ... overy.html
InnoDB: about forcing recovery.
110502 0:56:06 - mysqld got signal 6 ;
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=2147483648
read_buffer_size=1048576
max_used_connections=0
max_threads=151
threads_connected=0
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 3489728 K
bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

thd: 0x0
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 = (nil) thread_stack 0x30000
mysqld(my_print_stacktrace+0x2d) [0xb7559cbd]
mysqld(handle_segfault+0x494) [0xb7225854]
[0xb6fa0400]
/lib/tls/i686/cmov/libc.so.6(abort+0x182) [0xb6ca6a82]
mysqld(fil_io+0x484) [0xb743a444]
mysqld(+0x463c3a) [0xb7421c3a]
mysqld(buf_read_page+0x279) [0xb7422819]
mysqld(buf_page_get_gen+0x331) [0xb741bb91]
mysqld(trx_undo_lists_init+0x524) [0xb74cc3c4]
mysqld(+0x502918) [0xb74c0918]
mysqld(trx_rseg_list_and_array_init+0xc5) [0xb74c0bb5]
mysqld(trx_sys_init_at_db_start+0x175) [0xb74c1b95]
mysqld(innobase_start_or_create_for_mysql+0x129e) [0xb74b045e]
mysqld(+0x43e7e6) [0xb73fc7e6]
mysqld(ha_initialize_handlerton(st_plugin_int*)+0x3f) [0xb733111f]
mysqld(+0x411f2a) [0xb73cff2a]
mysqld(plugin_init(int*, char**, int)+0x8a7) [0xb73d3827]
mysqld(+0x2698d2) [0xb72278d2]
mysqld(main+0x1fa) [0xb722af9a]
/lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe6) [0xb6c8fbd6]
mysqld(+0x182d81) [0xb7140d81]
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.

After two days around this problem, only sleeping 4 hours in weekend, I read (honestly I do not remember where) that sometime ibdata1 and other's database may become corrupted during copying or may not inherit the necessary permissions to be able to start mysql process (heven i set the
chown -R mysql:mysql /var/lib/mysql and 0700 to db and 0660 to tables)

So, to solve the problem I did this.
# killall mysqld (stop all mysql processs)
# rm -Rf /var/lib/mysql/* (delete all mysql content)
# mysql -uuser -ppwd < backup.sql (restore msqyl through dump file) or #mysql -uuser -ppwd -f < backup.sql (restore msqyl through dump file in force mode).
After restore
# mysql_upgrade

After this mysql started work correctly.

THANK YOU
0
 
LVL 9

Author Closing Comment

by:abolinhas
ID: 35506609
I  was able to solve the problem alone.
I post the fix in attach #35506588
0

Featured Post

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this blog, we’ll look at how improvements to Percona XtraDB Cluster improved IST performance.
Recursive SQL is one of the most fascinating and powerful and yet dangerous feature offered in many modern databases today using a Common Table Expression (CTE) first introduced in the ANSI SQL 99 standard. The first implementations of CTE began ap…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses
Course of the Month16 days, 23 hours left to enroll

864 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question