Nextcloud version: 20.0.11.1
Operating system and version: FreeBSD 13.0-STABLE (1300509)
Apache version: 2.4.48
PHP version: v7.4.22
MariaDB version: mariadb Ver 15.1 Distrib 10.5.12-MariaDB, for FreeBSD13.0 (amd64) using EditLine wrapper
Report
It would seem that my oc_filecache_extended
table has corrupted itself after a power outage. I’m only able to start mariadb with innodb_force_recovery = 2
, and even then accessing this table causes the database to crash with signal 10.
Is it possible to rebuild/repair this table? I don’t know that I have a recent backup.
Is this the first time you’ve seen this error?: Y
Steps to replicate it:
- Lose power
- Turn things back on
- It broke
"Exception": "Doctrine\\DBAL\\Exception\\DriverException",
"Message": "An exception occurred while executing 'SELECT `filecache`.`fileid`, `storage`, `path`, `path_hash`, `filecache`.`parent`, `name`, `mimetype`, `mimepart`, `size`, `mtime`, `storage_mtime`, `encrypted`, `etag`, `permissions`, `checksum`, `metadata_etag`, `creation_time`, `upload_time` FROM `oc_filecache` `filecache` LEFT JOIN `oc_filecache_extended` `fe` ON `filecache`.`fileid` = `fe`.`fileid` WHERE (`storage` = ?) AND (`path_hash` = ?)' with params [1, \"61c91a1da13a8ac1cdcc06c2e7c82585\"]:\n\nSQLSTATE[HY000]: General error: 2006 MySQL server has gone away",
Full error because it’s too big to post here: https://gist.github.com/agrajag9/1f21d858cd22722d9acd1f41c751ed54
210905 19:51:48 [ERROR] mysqld got signal 10 ;
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 https://mariadb.com/kb/en/reporting-bugs
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.5.12-MariaDB
key_buffer_size=16384
read_buffer_size=262144
max_used_connections=2
max_threads=153
thread_count=1
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 52768 K bytes of memory
Hope that's ok; if not, decrease some variables in the equation.
Thread pointer: 0x8588063d8
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 = 0x7fffdd75cf38 thread_stack 0x3c000
0x12fcbfc <my_print_stacktrace+0x3c> at /usr/local/libexec/mariadbd
0xc6330f <handle_fatal_signal+0x28f> at /usr/local/libexec/mariadbd
0x8018f7de0 <pthread_sigmask+0x530> at /lib/libthr.so.3
Trying to get some variables.
Some pointers may be invalid and cause the dump to abort.
Query (0x85884dcb0): SELECT `filecache`.`fileid`, `storage`, `path`, `path_hash`, `filecache`.`parent`, `name`, `mimetype`, `mimepart`, `size`, `mtime`, `storage_mtime`, `encrypted`, `etag`, `permissions`, `checksum`, `metadata_etag`, `creation_time`, `upload_time` FROM `oc_filecache` `filecache` LEFT JOIN `oc_filecache_extended` `fe` ON `filecache`.`fileid` = `fe`.`fileid` WHERE (`storage` = 1) AND (`path_hash` = '61c91a1da13a8ac1cdcc06c2e7c82585')
Connection ID (thread ID): 17
Status: NOT_KILLED
Optimizer switch: index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=on,table_elimination=on,extended_keys=on,exists_to_in=on,orderby_uses_equalities=on,condition_pushdown_for_derived=on,split_materialized=on,condition_pushdown_for_subquery=on,rowid_filter=on,condition_pushdown_from_having=on,not_null_range_scan=off
The manual page at https://mariadb.com/kb/en/how-to-produce-a-full-stack-trace-for-mysqld/ contains
information that should help you find out what is causing the crash.
Core pattern: %N.core