[MDEV-26893] innodb assertion on startup - rem0rec:877 Created: 2021-10-24 Updated: 2022-01-20 Resolved: 2022-01-06 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Storage Engine - InnoDB |
| Affects Version/s: | 10.6.4 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Major |
| Reporter: | Nigi Uorfori | Assignee: | Marko Mäkelä |
| Resolution: | Incomplete | Votes: | 0 |
| Labels: | assertion | ||
| Issue Links: |
|
||||||||||||||||
| Description |
|
Server version: 10.6.4-MariaDB-1:10.6.4+maria~bullseye Thread pointer: 0x0 |
| Comments |
| Comment by Daniel Black [ 2021-10-24 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
nigelorfori, thanks for the bug report. There's not enough information to show what caused this as it is. Was a core dump generated? Can you install debug symbols? And then take a backtrace? Was the crash query related? Can you include the query? The SHOW CREATE TABLE tablename for the tables involved? And EXPLAIN query | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Nigi Uorfori [ 2021-10-24 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Hello, I'm not very experienced with MariaDB where can I find this? I found out 2 tables (InnoDB) are crashed. How do I fix this? It are those 2 tables they keep doing these queries: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Nigi Uorfori [ 2021-10-24 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Hello, It did run hundreds of queries I can not say exactly which query was the cause. I can not stop Mariadb service either because transactions or something :/ [Note] InnoDB: Waiting for 258 active transactions to finish | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Daniel Black [ 2021-10-24 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
SELECT COUNT I'm having trouble resolving these seemingly conflicting statuses: max_used_connections=0 No progress on "active transactions to finish" could just be a really large rollback. Can you include journalctl -n 300 -u mariadb.service to include just crash back to when the MariaDB started that time, until the next startup? What was happening on the server before the crash occured? What mariadb config have you got? How much memory do you have? | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Nigi Uorfori [ 2021-10-25 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
16GB RAM 8vCPU It runs daily like hundreds of thousands queries and the database is like 400gb in total. I currently closed everything (website/server) to slow down the queries but then I found out this. https://prnt.sc/1x9eqoq (journalctl) https://prnt.sc/1x9etfh (logs.err) I actually don't know what happend before the crash. This is my mariadb.cnf: max_connections = 10000 key_buffer_size = 2G table_open_cache = 15000 query_cache_limit = 1M max_binlog_size = 100M default_storage_engine = InnoDB innodb_log_file_size = 1G innodb_flush_log_at_trx_commit = 2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Nigi Uorfori [ 2021-10-25 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Update: 0x7f370171a700 InnoDB: Assertion failure in file ./storage/innobase/rem/rem0rec.cc line 877 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Daniel Black [ 2021-10-25 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Thanks better. It looks like maybe some index corruption similar to If you're able to include one more thing as text, can you do: install debug symbol packages per first comment. apt-get install -y gdb sudo -u mysql gdb /usr/sbin/mariadbd On (gdb) prompt set print frame-arguments all (when assertion occurs on gdb prompt) thread apply all bt full unrelated but your innodb_io_capacity looks too high, and I'm not sure you server could handle max_connections (memory usage). | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Nigi Uorfori [ 2021-10-25 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Doesn't seem to work for me :/ and what max_connections / capacity do you recommend? I got enough memory but use 16gb for this server | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Nigi Uorfori [ 2021-10-25 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Update:
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Marko Mäkelä [ 2021-10-25 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
This assertion failure is indeed equivalent to the one that was reported in Based on the available information, we know that you have a corrupted InnoDB index record in a table that does not use the ROW_FORMAT=REDUNDANT format. I wonder why this corruption was not caught by the page checksum. A possible explanation is that the record was corrupted while the page was loaded in the buffer pool, and the corrupted page with a correct checksum was later written back to the data file. I am not aware of such memory corruption bugs in our code base (other than I would suggest you to test the memory, to check if the data could have been corrupted spontaneuously in the memory. With memtester you can do that even without rebooting the operating system. |