[SERVER-82781] Simulate crash test hook may leave behind part of file when copying data Created: 03/Nov/23  Updated: 16/Nov/23  Resolved: 06/Nov/23

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 7.2.0-rc0, 7.0.5, 6.0.13

Type: Bug Priority: Major - P3
Reporter: Gregory Noma Assignee: Gregory Noma
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Problem/Incident
causes WT-11821 WiredTiger data corruption detected i... Closed
is caused by SERVER-60728 Improved MDB crash recovery testing Closed
Related
is related to SERVER-80120 Add the new compaction "freeSpaceTarg... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v7.0, v6.0
Sprint: Execution Team 2023-11-13
Participants:

 Description   

The simulate crash test hook uses os.sendfile to simulate a crash by copying the data files while the process is stopped. However, if the file size of a table is large enough, it may fail to copy the entire thing. This is because we currently are ignoring the return value from os.sendfile which indicates how many bytes it sent.



 Comments   
Comment by Githook User [ 16/Nov/23 ]

Author:

{'name': 'Gregory Noma', 'email': 'gregory.noma@gmail.com', 'username': 'gregorynoma'}

Message: SERVER-82781 Ensure all bytes are copied in simulate crash hook

(cherry picked from commit 3dfd298c2f10c27d8ad9c8265067848a48beb333)
Branch: v6.0
https://github.com/mongodb/mongo/commit/2684606000634073e533fd658c023e14c0f4f931

Comment by Githook User [ 16/Nov/23 ]

Author:

{'name': 'Gregory Noma', 'email': 'gregory.noma@gmail.com', 'username': 'gregorynoma'}

Message: SERVER-82781 Ensure all bytes are copied in simulate crash hook

(cherry picked from commit 3dfd298c2f10c27d8ad9c8265067848a48beb333)
Branch: v7.0
https://github.com/mongodb/mongo/commit/f9647896878a2931d35e59870ee8922ec26e19f1

Comment by Githook User [ 06/Nov/23 ]

Author:

{'name': 'Gregory Noma', 'email': 'gregory.noma@gmail.com', 'username': 'gregorynoma'}

Message: SERVER-82781 Ensure all bytes are copied in simulate crash hook
Branch: master
https://github.com/mongodb/mongo/commit/3dfd298c2f10c27d8ad9c8265067848a48beb333

Generated at Thu Feb 08 06:50:15 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.