[SERVER-28179] inMemory: fassert when using --inMemoryEngineConfigString Created: 02/Mar/17  Updated: 23/Oct/17  Resolved: 18/Oct/17

Status: Closed
Project: Core Server
Component/s: Storage
Affects Version/s: 3.5.3
Fix Version/s: 3.6.0-rc1

Type: Bug Priority: Minor - P4
Reporter: Henrik Ingo (Inactive) Assignee: Xiangyu Yao (Inactive)
Resolution: Done Votes: 0
Labels: neweng
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to SERVER-28169 Set eviction=(threads_min=1) in Micro... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Steps To Reproduce:

[2017/03/02 13:48:21.136] numactl --physcpubind=4,5,6,7 -i 1 ./mongod --dbpath ./dbdata --storageEngine=inMemory --logpath ./mongod.log --fork --syncdelay 0 --setParameter ttlMonitorEnabled=false --setParameter diagnosticDataCollectionEnabled=false --inMemoryEngineConfigString 'eviction=(threads_min=0)' --inMemorySizeGB 60 --auth

Sprint: Storage 2017-10-23
Participants:

 Description   

I hit an fassert when trying to use --inMemoryEngineConfigString. (Which to be fair, I think is undocumented, but the error here seems clear enough to be worth reporting.)

2017-03-02T18:48:21.159+0000 I CONTROL  [initandlisten] options: { processManagement: { fork: true }, security: { authorization: "enabled" }, setParameter: { diagnosticDataCollectionEnabled: "false", ttlMonitorEnabled: "false" }, storage: { dbPath: "./dbdata", engine: "inMemory", inMemory: { engineConfig: { configString: "eviction=(threads_min=0)", inMemorySizeGB: 60.0 } }, syncPeriodSecs: 0.0 }, systemLog: { destination: "file", path: "./mongod.log" } }
2017-03-02T18:48:21.177+0000 I STORAGE  [initandlisten] wiredtiger_open config: create,cache_size=61440M,session_max=20000,eviction=(threads_min=4,threads_max=4),config_base=false,statistics=(fast),log=(enabled=true,archive=true,path=journal,compressor=snappy),file_manager=(close_idle_time=100000),checkpoint=(wait=0,log_size=2GB),statistics_log=(wait=0),verbose=(recovery_progress),eviction=(threads_min=0)in_memory=true,log=(enabled=false),file_manager=(close_idle_time=0),checkpoint=(wait=0,log_size=0),log=(enabled=false),
2017-03-02T18:48:21.177+0000 E STORAGE  [initandlisten] WiredTiger error (22) [1488480501:177866][4369:0x7fdf41630d60], wiredtiger_open: Error parsing 'create,cache_size=61440M,session_max=20000,eviction=(threads_min=4,threads_max=4),config_base=false,statistics=(fast),log=(enabled=true,archive=true,path=journal,compressor=snappy),file_manager=(close_idle_time=100000),checkpoint=(wait=0,log_size=2GB),statistics_log=(wait=0),verbose=(recovery_progress),eviction=(threads_min=0)in_memory=true,log=(enabled=false),file_manager=(close_idle_time=0),checkpoint=(wait=0,log_size=0),log=(enabled=false),' at offset 328: New value starts without a separator: Invalid argument
2017-03-02T18:48:21.177+0000 I -        [initandlisten] Fatal Assertion 28561 at src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp 268
2017-03-02T18:48:21.177+0000 I -        [initandlisten] 
 
***aborting after fassert() failure

It seems to me that in wiredTiger, the EngineConfigString is appended last, but in inMemory there are still some inMemory-specific options appended to the end, and there's a comma missing when that is done.



 Comments   
Comment by Githook User [ 18/Oct/17 ]

Author:

{'email': 'xiangyu.yao@mongodb.com', 'name': 'Xiangyu Yao', 'username': 'xy24'}

Message: SERVER-28179 Adds test for using inMemory config string
Branch: master
https://github.com/mongodb/mongo/commit/9923f2fd97aa89851102c8cabec4fa768d6284d6

Comment by Githook User [ 18/Oct/17 ]

Author:

{'email': 'xiangyu.yao@mongodb.com', 'name': 'Xiangyu Yao', 'username': 'xy24'}

Message: SERVER-28179 Fixes inMemoryEngineConfigString
Branch: master
https://github.com/10gen/mongo-enterprise-modules/commit/2bd48e0030b19d3bff573a3cc68262a92c554ed1

Comment by Xiangyu Yao (Inactive) [ 18/Oct/17 ]

Test - Code review url: https://mongodbcr.appspot.com/165810001

Comment by Xiangyu Yao (Inactive) [ 17/Oct/17 ]

Code review url: https://mongodbcr.appspot.com/165750001

Comment by Daniel Pasette (Inactive) [ 03/Mar/17 ]

Are we just missing a comma?

dan:(git)mongo-enterprise-modules[master]/$ d
diff --git a/src/inmemory/inmemory_init.cpp b/src/inmemory/inmemory_init.cpp
index 19006b7..a01f175 100644
--- a/src/inmemory/inmemory_init.cpp
+++ b/src/inmemory/inmemory_init.cpp
@@ -62,7 +62,7 @@ public:
 
         std::string engineConfig = inMemoryGlobalOptions.engineConfig;
         engineConfig +=
-            "in_memory=true,log=(enabled=false),"
+            ",in_memory=true,log=(enabled=false),"
             "file_manager=(close_idle_time=0),checkpoint=(wait=0,log_size=0)";
 
         size_t cacheMB = WiredTigerUtil::getCacheSizeMB(inMemoryGlobalOptions.inMemorySizeGB);

Generated at Thu Feb 08 04:17:22 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.