[MDEV-13432] Assertion failure in buf0rea.cc line 577 Created: 2017-08-03  Updated: 2020-08-25  Resolved: 2017-08-17

Status: Closed
Project: MariaDB Server
Component/s: Storage Engine - InnoDB, Storage Engine - XtraDB
Affects Version/s: 10.1.23
Fix Version/s: 10.1.27, 10.2.9, 10.3.2

Type: Bug Priority: Major
Reporter: Jan Lindström (Inactive) Assignee: Jan Lindström (Inactive)
Resolution: Fixed Votes: 0
Labels: None


 Description   

2017-05-31 12:14:51 7f5cfdff6700 InnoDB: Loading buffer pool(s) from .//ib_buffer_pool
2017-05-31 12:16:44 7f5cfdff6700  InnoDB: Assertion failure in thread 140037375092480 in file buf0rea.cc line 577



 Comments   
Comment by Jan Lindström (Inactive) [ 2017-08-08 ]

In 10.0 there is not similar assertion. From error log in this case we can see:

2017-05-31 10:46:51 140227134180096 [Note] InnoDB: Space id 4667992 trying to reserve 3 extents actually reserved 256  reserve 258 free 260 size 1641472 rounds 66 total_reserved 16896
2017-05-31 12:14:51 7f5cfdff6700 InnoDB: Loading buffer pool(s) from .//ib_buffer_pool
2017-05-31 12:16:44 7f5cfdff6700  InnoDB: Assertion failure in thread 140037375092480 in file buf0rea.cc line 577

Not sure but are we trying to load buffer pool pages out of the tablespace current reserved size ?
Notable is also the fact that on assertion there is again buffer overflow message and stack but no symbols.

Comment by Jan Lindström (Inactive) [ 2017-08-11 ]

Based on code review it is possible that return value is DB_PAGE_CORRUPTED i.e. page read is corrupted. In that case we should not crash here as tablespace is marked as corrupted and that error is handled elsewhere. To prevent unknown error code assertions with no info, added logging of incorrect error code.

Comment by Jan Lindström (Inactive) [ 2017-08-11 ]

https://github.com/MariaDB/server/commit/13e7f74097ded0ab014d8a694d0f674e2cbe5419

Comment by Marko Mäkelä [ 2017-08-11 ]

Please write a simpler patch. My suggestion would be to replace the occurrences of

default:
	ut_error;

with

default:
	ib_logf(IB_LOG_LEVEL_FATAL, "Error %u in linear readahead", err);

and revert any other changes. This would also greatly simplify the merge, because it would avoid refactoring a lot of code that calls ib_logf(), which has been replaced in 10.2.

Comment by Jan Lindström (Inactive) [ 2017-08-17 ]

commit 109b8582583296c4bb4ee41bc7649f6cd2254124
Author: Jan Lindström <jan.lindstrom@mariadb.com>
Date: Thu Aug 17 07:19:12 2017 +0300

MDEV-13432: Assertion failure in buf0rea.cc line 577

Page read could return DB_PAGE_CORRUPTED error that should
be reported and passed to upper layer. In case of unknown
error code we should print both number and string.

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