[SERVER-8908] Better error log explanation if server notices data file corruption Created: 08/Mar/13  Updated: 06/Dec/22  Resolved: 04/Mar/19

Status: Closed
Project: Core Server
Component/s: Storage
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Trivial - P5
Reporter: Juho Mäkinen Assignee: Backlog - Storage Execution Team
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-8518 Recovering slave with journal causes ... Closed
Assigned Teams:
Storage Execution
Participants:

 Description   

Mongod will print Assertion errors to the logs if it encounters invalid or corrupted data within the data files. These log messages should be enhanced so that they will clearly explain that the engine found corrupted data from the data files. Also, if possible, the engine should also tell the name of the data file where the corrupted data was found.

Examples, current log entry:
Tue Feb 12 06:57:53 [repl prefetch worker] Assertion: 10334:Invalid BSONObj size: -286331154 (0xEEEEEEEE) first element: _id:

{ date: new Date(1360648800000), appid: "181", ab: "12" }

0xb07561 0xacd449 0xacd5cc 0x5721e8 0x719605 0x8c6e4b 0x8c7805 0x9aaf6a 0xadab5d 0xb4d3d9 0x2abbb6e1577d 0x2abbb7a98c1d
/usr/bin/mongod(_ZN5mongo15printStackTraceERSo+0x21) [0xb07561]
/usr/bin/mongod(_ZN5mongo11msgassertedEiPKc+0x99) [0xacd449]
/usr/bin/mongod [0xacd5cc]
/usr/bin/mongod(_ZNK5mongo7BSONObj14_assertInvalidEv+0x468) [0x5721e8]
/usr/bin/mongod(ZN5mongo7Helpers8findByIdERNS_6ClientEPKcNS_7BSONObjERS5_PbS7+0xe05) [0x719605]
/usr/bin/mongod(_ZN5mongo19prefetchRecordPagesEPKcRKNS_7BSONObjE+0x2fb) [0x8c6e4b]
/usr/bin/mongod(_ZN5mongo28prefetchPagesForReplicatedOpERKNS_7BSONObjE+0x415) [0x8c7805]
/usr/bin/mongod(_ZN5mongo7replset8SyncTail10prefetchOpERKNS_7BSONObjE+0x13a) [0x9aaf6a]
/usr/bin/mongod(_ZN5mongo10threadpool6Worker4loopEv+0x26d) [0xadab5d]
/usr/bin/mongod [0xb4d3d9]
/lib64/libpthread.so.0 [0x2abbb6e1577d]
/lib64/libc.so.6(clone+0x6d) [0x2abbb7a98c1d]

Example what the message could look to give more information:
Tue Feb 12 06:57:53 [repl prefetch worker] Assertion, engine found invalid data from data file 'dbname.06', related to collection 'mycollectionname'. Possible data file corruption: 10334:Invalid BSONObj size: -286331154 (0xEEEEEEEE) first element: _id:

{ date: new Date(1360648800000), appid: "181", ab: "12" }



 Comments   
Comment by Sara Williamson [ 04/Mar/19 ]

This is gone away with the removal of MMAP; with WiredTiger this works.

Generated at Thu Feb 08 03:18:47 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.