The database is not running

When I run mysql


Thu Apr 14 13:20:45 2022 PerconaFT recovery starting in env /var/lib/mysql/
Thu Apr 14 13:20:45 2022 PerconaFT recovery scanning backward from 12564896439
Thu Apr 14 13:20:45 2022 PerconaFT recovery bw_end_checkpoint at 12564891742 timestamp 1649903938270494 xid 12564891448 (bw_newer)
Thu Apr 14 13:20:45 2022 PerconaFT recovery bw_begin_checkpoint at 12564891448 timestamp 1649903934833060 (bw_between)
Thu Apr 14 13:20:45 2022 PerconaFT recovery turning around at begin checkpoint 12564891448 time 3437434
Thu Apr 14 13:20:45 2022 PerconaFT recovery starts scanning forward to 12564896439 from 12564891448 left 4991 (fw_between)
/home/buildbot/buildbot/build/mariadb-10.4.12/storage/tokudb/PerconaFT/ft/serialize/ - file[unknown], blocknum[733], stored_xsum[1179653659] != actual_xsum[148357199]
0x7f6987d9cf00: BB250000000100000000007D1E2C060204000000D00C3DA90000000001000000050000000024650400B10700000AE0FCCA020079000000265A08000000000002
0x7f6987d9cf40: 0000000001B93C000000000000000000000000000000000000000000000000000062455226625621FC0001000000010000004D0059008600E600E6005B3131EB
0x7f6987d9cf80: A788ECA1B45D20EC838CEB9494EC8AA4ED81AC20ED9CB4EB8C80EC9AA9207373642032ED858CEB9DBC20283234382C373430EC9B902FEC9AB0ECA3BCED8CA8EC

0x7f6987daf1c0: 0000A6AC00007FB4000058BC000031C400000ACC0000E3D30000BCDB000095E300006EEB000047F3000020FB0000F9020100D20A0100AB120100841A01000000
0x7f6987daf200: 00001B165046
/home/buildbot/buildbot/build/mariadb-10.4.12/storage/tokudb/PerconaFT/ft/serialize/ - file[unknown], blocknum[733], verify_ftnode_sub_block failed with -100015
Checksum failure while reading node partition in file ./_mqoo_sql_5d2_700890_main_22064335d_1_1d_B_0.tokudb.
220414 13:20:46 [ERROR] 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.

To report this bug, see MariaDB Community Bug Reporting - MariaDB Knowledge Base

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.

Server version: 10.4.12-MariaDB-1:10.4.12+maria~disco-log
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 684859 K bytes of memory
Hope that’s ok; if not, decrease some variables in the equation.

Thread pointer: 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 = 0x0 thread_stack 0x30000
The manual page at MySQL :: MySQL 8.0 Reference Manual :: B.3.3.3 What to Do If MySQL Keeps Crashing contains
information that should help you find out what is causing the crash.
Writing a core file…
Working directory at /var/lib/mysql
Resource Limits:
Limit Soft Limit Hard Limit Units
Max cpu time unlimited unlimited seconds
Max file size unlimited unlimited bytes
Max data size unlimited unlimited bytes
Max stack size 8388608 unlimited bytes
Max core file size 0 unlimited bytes
Max resident set unlimited unlimited bytes
Max processes 257219 257219 processes
Max open files 16364 16364 files
Max locked memory 67108864 67108864 bytes
Max address space unlimited unlimited bytes
Max file locks unlimited unlimited locks
Max pending signals 257219 257219 signals
Max msgqueue size 819200 819200 bytes
Max nice priority 0 0
Max realtime priority 0 0
Max realtime timeout unlimited unlimited us
Core pattern: |/usr/share/apport/apport %p %s %c %d %P


It comes out as above.

The data being written does not need to be (and its integrity not required to be guaranteed). I want to save past data.
What is the fastest way to recover?

I don’t need to recover data.


I moved the file to another location and ran it.

2022-04-14 13:26:04 0 [ERROR] TokuDB: Recovery log is missing (persistent environment information is present) while looking for recovery log files in [/var/lib/mysql/]

2022-04-14 13:26:04 0 [ERROR] TokuDB unknown error 2
2022-04-14 13:26:04 0 [ERROR] Plugin ‘TokuDB’ init function returned error.
2022-04-14 13:26:04 0 [ERROR] Plugin ‘TokuDB’ registration as a STORAGE ENGINE failed.
The above error occurred.

You should configure innodb_force_recovery =1, save that parameter in my.cnf AND then, you should start the service with service mysql start or systemctl mysql start

1 Like

innodb_force_recovery would not do much as the crash is TokuDB/PerconaFT Related

Do you have backups to recover from and do log forward recovery with binlogs - this is generally safest thing to do in this case

Also note TokuDB is depreciated by Percona as such I would consider migrating to different storage engine (MyRocks is good alternative if you need high compression)

1 Like