[SERVER-56351] OpMsgFuzzerFixture does not properly shut down the storage engine on destruction Created: 26/Apr/21  Updated: 29/Oct/23  Resolved: 10/May/21

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 5.0.0-rc0

Type: Bug Priority: Major - P3
Reporter: Tyler Seip (Inactive) Assignee: Tyler Seip (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Problem/Incident
causes SERVER-66464 use LLVMFuzzerRunDriver for OpMsgFuzz... Open
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Service Arch 2021-05-17
Participants:
Linked BF Score: 133

 Description   

Amend the destructor of OpMsgFuzzerFixture to properly shut down the storage engine and the DatabaseHolder on destruction.



 Comments   
Comment by Billy Donahue [ 13/May/22 ]

We should invoke Libfuzzer ourselves because we have special shutdown requirements.
https://llvm.org/docs/LibFuzzer.html#using-libfuzzer-as-a-library

That is, we should call this function from a main function that we control.

extern "C" int LLVMFuzzerRunDriver(int *argc, char ***argv,
                  int (*UserCb)(const uint8_t *Data, size_t Size));

We are using the technique from the intro tutorial of using a static duration fixture.
But our needs are more sophisticated.

Comment by Githook User [ 07/May/21 ]

Author:

{'name': 'Tyler Seip', 'email': 'Tyler.Seip@mongodb.com', 'username': 'tseip-mongo'}

Message: SERVER-56351: Amend OpMsgFuzzerFixture destructor to properly shutdown storage engine
Branch: master
https://github.com/mongodb/mongo/commit/1ea9c3aed50fba8356c4ccc366ce03971237e995

Generated at Thu Feb 08 05:39:02 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.