[SERVER-17509] leak in initRsOplogBackgroundThread Created: 09/Mar/15  Updated: 14/Apr/16  Resolved: 09/Mar/15

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

Type: Bug Priority: Major - P3
Reporter: Michael Cahill (Inactive) Assignee: Geert Bosch
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Operating System: ALL
Steps To Reproduce:

Build with address sanitizer. Run replicaset tests (e.g., dbtest) with storageEngine=wiredTiger

Participants:

 Description   

AddressSanitizer detects a leak of the background job to manage oplogs in replicasets

Fix:

diff --git a/src/mongo/db/storage/wiredtiger/wiredtiger_record_store_mongod.cpp b/src/mongo/db/storage/wiredtiger/wiredtiger_record_store_mongod.cpp
--- a/src/mongo/db/storage/wiredtiger/wiredtiger_record_store_mongod.cpp
+++ b/src/mongo/db/storage/wiredtiger/wiredtiger_record_store_mongod.cpp
@@ -59,7 +59,7 @@ namespace mongo {
         class WiredTigerRecordStoreThread : public BackgroundJob {
         public:
             WiredTigerRecordStoreThread(const NamespaceString& ns)
-                : _ns(ns) {
+                : BackgroundJob(true), _ns(ns) {
                 _name = std::string("WiredTigerRecordStoreThread for ") + _ns.toString();
             }



 Comments   
Comment by Daniel Pasette (Inactive) [ 09/Mar/15 ]

geert.bosch, this duplicates SERVER-17433

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