[MDEV-20415] InnoDB: error clustered record for sec rec not found Created: 2019-08-25  Updated: 2021-04-21

Status: Open
Project: MariaDB Server
Component/s: Storage Engine - InnoDB
Affects Version/s: 10.1.38
Fix Version/s: 10.1

Type: Bug Priority: Major
Reporter: Alessandro Vesely Assignee: Marko Mäkelä
Resolution: Unresolved Votes: 0
Labels: None
Environment:

Debian stretch


Attachments: File daemon.log     HTML File general_log    

 Description   

I have an oldish version of mediawiki using database FFdb (fixforwarding.org), which apparently works, but I get lots of logs like the following:

Aug 25 12:52:50 27 north mysqld: 2019-08-25 12:52:50 7f41a5899700 InnoDB: error clustered record for sec rec not found
Aug 25 12:52:50 27 north mysqld: InnoDB: index `lc_lang_key` of table `FFdb`.`wiki_l10n_cache`
Aug 25 12:52:50 27 north mysqld: InnoDB: sec index record PHYSICAL RECORD: n_fields 3; compact format; info bits 0
Aug 25 12:52:50 27 north mysqld: 0: len 2; hex 656e; asc en;;
Aug 25 12:52:50 27 north mysqld: 1: len 17; hex 6d657373616765733a6665627275617279; asc messages:february;;
Aug 25 12:52:50 27 north mysqld: 2: len 6; hex 000000013947; asc 9G;;
Aug 25 12:52:50 27 north mysqld:
Aug 25 12:52:50 27 north mysqld: InnoDB: clust index record PHYSICAL RECORD: n_fields 1; compact format; info bits 0
Aug 25 12:52:50 27 north mysqld: 0: len 8; hex 696e66696d756d00; asc infimum ;;
Aug 25 12:52:50 27 north mysqld:
Aug 25 12:52:50 27 north mysqld: TRANSACTION 5290797, ACTIVE 0 sec starting index read
Aug 25 12:52:50 27 north mysqld: mysql tables in use 1, locked 0
Aug 25 12:52:50 27 north mysqld: MySQL thread id 29218, OS thread handle 0x7f41a5899700, query id 1223596 localhost ale Sending data
Aug 25 12:52:50 27 north mysqld: SELECT /* LCStoreDB::get 77.75.76.172 */ lc_value FROM `wiki_l10n_cache` WHERE lc_lang = 'en' AND lc_key = 'messages:february' LIMIT 1
Aug 25 12:52:50 27 north mysqld:
Aug 25 12:52:50 27 north mysqld: InnoDB: Submit a detailed bug report to https://jira.mariadb.org/
Aug 25 12:52:50 27 north mysqld: 2019-08-25 12:52:50 7f41a5899700 InnoDB: error clustered record for sec rec not found
Aug 25 12:52:50 27 north mysqld: InnoDB: index `lc_lang_key` of table `FFdb`.`wiki_l10n_cache`
Aug 25 12:52:50 27 north mysqld: InnoDB: sec index record PHYSICAL RECORD: n_fields 3; compact format; info bits 0
Aug 25 12:52:50 27 north mysqld: 0: len 2; hex 656e; asc en;;
Aug 25 12:52:50 27 north mysqld: 1: len 25; hex 6d657373616765733a74616c6b706167656c696e6b74657874; asc messages:talkpagelinktext;;
Aug 25 12:52:50 27 north mysqld: 2: len 6; hex 0000000139c5; asc 9 ;;
Aug 25 12:52:50 27 north mysqld:
Aug 25 12:52:50 27 north mysqld: InnoDB: clust index record PHYSICAL RECORD: n_fields 1; compact format; info bits 0
Aug 25 12:52:50 27 north mysqld: 0: len 8; hex 696e66696d756d00; asc infimum ;;
Aug 25 12:52:50 27 north mysqld:
Aug 25 12:52:50 27 north mysqld: TRANSACTION 5290797, ACTIVE 0 sec starting index read
Aug 25 12:52:50 27 north mysqld: mysql tables in use 1, locked 0
Aug 25 12:52:50 27 north mysqld: MySQL thread id 29218, OS thread handle 0x7f41a5899700, query id 1223599 localhost ale Sending data
Aug 25 12:52:50 27 north mysqld: SELECT /* LCStoreDB::get 77.75.76.172 */ lc_value FROM `wiki_l10n_cache` WHERE lc_lang = 'en' AND lc_key = 'messages:talkpagelinktext' LIMIT 1
Aug 25 12:52:50 27 north mysqld:
Aug 25 12:52:50 27 north mysqld: InnoDB: Submit a detailed bug report to https://jira.mariadb.org/
Aug 25 12:52:50 27 north mysqld: 2019-08-25 12:52:50 7f41a5899700 InnoDB: error clustered record for sec rec not found
Aug 25 12:52:50 27 north mysqld: InnoDB: index `lc_lang_key` of table `FFdb`.`wiki_l10n_cache`
Aug 25 12:52:50 27 north mysqld: InnoDB: sec index record PHYSICAL RECORD: n_fields 3; compact format; info bits 0
Aug 25 12:52:50 27 north mysqld: 0: len 2; hex 656e; asc en;;
Aug 25 12:52:50 27 north mysqld: 1: len 23; hex 6d657373616765733a7265642d6c696e6b2d7469746c65; asc messages:red-link-title;;
Aug 25 12:52:50 27 north mysqld: 2: len 6; hex 000000013a28; asc ;;
Aug 25 12:52:50 27 north mysqld:
Aug 25 12:52:50 27 north mysqld: InnoDB: clust index record PHYSICAL RECORD: n_fields 1; compact format; info bits 0
Aug 25 12:52:50 27 north mysqld: 0: len 8; hex 696e66696d756d00; asc infimum ;;
Aug 25 12:52:50 27 north mysqld:
Aug 25 12:52:50 27 north mysqld: TRANSACTION 5290797, ACTIVE 0 sec starting index read
Aug 25 12:52:50 27 north mysqld: mysql tables in use 1, locked 0
Aug 25 12:52:50 27 north mysqld: MySQL thread id 29218, OS thread handle 0x7f41a5899700, query id 1223600 localhost ale Sending data
Aug 25 12:52:50 27 north mysqld: SELECT /* LCStoreDB::get 77.75.76.172 */ lc_value FROM `wiki_l10n_cache` WHERE lc_lang = 'en' AND lc_key = 'messages:red-link-title' LIMIT 1
Aug 25 12:52:50 27 north mysqld:
Aug 25 12:52:50 27 north mysqld: InnoDB: Submit a detailed bug report to https://jira.mariadb.org/

Is there anything I can/should do?

TIA
Ale



 Comments   
Comment by Marko Mäkelä [ 2019-08-26 ]

If there are FOREIGN KEY constraints involved with the involved columns, this could have been caused by the following:
MDEV-18272 InnoDB fails to rollback after exceeding FOREIGN KEY recursion depth

If not, this is yet another duplicate of the MDEV-9663 family of bugs.

I have a gut feeling that innodb_adaptive_hash_index=ON (the default) in MySQL 5.6+ and MariaDB 10.0+ could cause corruption (we have debug builds crashing in MDEV-20203), but I am not sure if it could cause a secondary index to get out of sync with the clustered index.

Comment by Alessandro Vesely [ 2019-08-26 ]

Mediawiki use a complicated database, which I don't know well. I have tried to reproduce the logs by executing the same HTTP queries found in the access.log at the time when mysqld log started, to no avail.

BTW, no mysqld logs today. The latest was yesterday at midday.

Now I have set general_log. I'll see if I can catch it by tomorrow.

Comment by Alessandro Vesely [ 2019-08-26 ]

Got a log. It is somewhat longish and contains binary stuff from mediumblob fields. The corresponding daemon.log is similar to the one posted above, but not identical. I attach it too. daemon.log general_log

Meanwhile, I found a query to list FOREIGN KEY constraints, and it found none. So it should be similar to MDEV-9663? However, the daemon doesn't crash.

Comment by Alessandro Vesely [ 2021-04-21 ]

I just found now this old stuff. A few MariaDB and Mediawiki versions after, I see no more logs reported. Dunno what changed, but everything looks fine.

I think this bug can be closed.

Comment by Alessandro Vesely [ 2021-04-21 ]

I just found now this old stuff. A few MariaDB and Mediawiki versions after, I see no more logs reported. Dunno what changed, but everything looks fine.

I think this bug can be closed.

Generated at Thu Feb 08 08:59:18 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.