[SERVER-17901] Memory leak in IndexCatalog::_isSpecOk() Created: 06/Apr/15  Updated: 19/Sep/15  Resolved: 08/Apr/15

Status: Closed
Project: Core Server
Component/s: Index Maintenance
Affects Version/s: None
Fix Version/s: 3.1.2

Type: Bug Priority: Major - P3
Reporter: Spencer Jackson Assignee: J Rassi
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-17656 First pass implementation of partial ... Closed
related to SERVER-16889 Query subsystem public API should use... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Quint Iteration 3.1.2
Participants:

 Description   

It seems that since https://mci.10gen.com/task/mongodb_mongo_master_ubuntu1404_debug_asan_736faefc2822289ad0dc9be90029e76dea9615f3_15_04_02_20_22_06_jsCore_WT_ubuntu1404_debug_asan certain jsCore related suites fail on ASAN. The suites run something related to partial indexes, then hang.

An example is here: https://mci.10gen.com/task/mongodb_mongo_master_ubuntu1404_debug_asan_453c0b526ae5ed429caab2b6970d452c8d405a85_15_04_06_15_04_07_jsCore_ubuntu1404_debug_asan

 [2015/04/06 12:36:43.785] running ./mongod --port 27999 --dbpath /data/db/sconsTests/ --setParameter enableTestCommands=1 --httpinterface --nopreallocj
 [2015/04/06 12:36:43.785]  *******************************************
 [2015/04/06 12:36:43.785]          Test : index_many2.js ...
 [2015/04/06 12:36:43.785]       Command : ./mongo --port 27999 --writeMode commands /data/mci/shell/src/jstests/core/index_many2.js --eval TestData = new Object();TestData.storageEngine = "";TestData.wiredTigerEngineConfigString = "";TestData.wiredTigerCollectionConfigString = "";TestData.wiredTigerIndexConfigString = "";TestData.testPath = "/data/mci/shell/src/jstests/core/index_many2.js";TestData.testFile = "index_many2.js";TestData.testName = "index_many2";TestData.setParameters = "";TestData.setParametersMongos = "";TestData.noJournal = false;TestData.noJournalPrealloc = true;TestData.auth = false;TestData.keyFile = null;TestData.keyFileData = null;TestData.authMechanism = "SCRAM-SHA-1";TestData.useSSL = false;TestData.useX509 = false;MongoRunner.dataDir = "/data/db";MongoRunner.dataPath = MongoRunner.dataDir + "/";
 [2015/04/06 12:36:43.785]          Date : Mon Apr  6 16:36:43 2015
 [2015/04/06 12:36:43.873]                 (output suppressed; see http://buildlogs.mongodb.org/build/5522af78d2a60f51c00000b8/test/5522b61bd2a60f5936000257/)
 [2015/04/06 12:36:46.008]                  2222.7249 ms
 [2015/04/06 12:36:48.124] clean_dbroot: /data/db
 [2015/04/06 12:36:48.124] num procs:132
 [2015/04/06 12:36:48.124] Creating dir: /data/db/sconsTests/
 [2015/04/06 12:36:48.124] running ./mongod --port 27999 --dbpath /data/db/sconsTests/ --setParameter enableTestCommands=1 --httpinterface --nopreallocj
 [2015/04/06 12:36:48.124]  *******************************************
 [2015/04/06 12:36:48.124]          Test : index_partial1.js ...
 [2015/04/06 12:36:48.124]       Command : ./mongo --port 27999 --writeMode commands /data/mci/shell/src/jstests/core/index_partial1.js --eval TestData = new Object();TestData.storageEngine = "";TestData.wiredTigerEngineConfigString = "";TestData.wiredTigerCollectionConfigString = "";TestData.wiredTigerIndexConfigString = "";TestData.testPath = "/data/mci/shell/src/jstests/core/index_partial1.js";TestData.testFile = "index_partial1.js";TestData.testName = "index_partial1";TestData.setParameters = "";TestData.setParametersMongos = "";TestData.noJournal = false;TestData.noJournalPrealloc = true;TestData.auth = false;TestData.keyFile = null;TestData.keyFileData = null;TestData.authMechanism = "SCRAM-SHA-1";TestData.useSSL = false;TestData.useX509 = false;MongoRunner.dataDir = "/data/db";MongoRunner.dataPath = MongoRunner.dataDir + "/";
 [2015/04/06 12:36:48.124]          Date : Mon Apr  6 16:36:48 2015
 [2015/04/06 12:36:48.202]                 (output suppressed; see http://buildlogs.mongodb.org/build/5522af78d2a60f51c00000b8/test/5522b620d2a60f597d0000a9/)
 [2015/04/06 12:36:48.767]                   642.7491 ms
 [2015/04/06 12:36:49.964] error shutting down mongod
 [2015/04/06 12:36:49.965] [Errno 3] No such process
 [2015/04/06 12:36:49.965] [Errno 111] Connection refused
 [2015/04/06 12:36:49.978] 437 tests succeeded
 [2015/04/06 12:36:49.978] 340 tests didn't get run
 [2015/04/06 12:36:49.978] Traceback (most recent call last):
 [2015/04/06 12:36:49.978]   File "buildscripts/smoke.py", line 1458, in <module>
 [2015/04/06 12:36:49.978]     main()
 [2015/04/06 12:36:49.978]   File "buildscripts/smoke.py", line 1442, in main
 [2015/04/06 12:36:49.978]     run_tests(tests)
 [2015/04/06 12:36:49.978]   File "buildscripts/smoke.py", line 840, in run_tests
 [2015/04/06 12:36:49.979]     master.stop()
 [2015/04/06 12:36:49.979]   File "buildscripts/smoke.py", line 343, in stop
 [2015/04/06 12:36:49.979]     raise(Exception('mongod process exited with non-zero code %d' % retcode))
 [2015/04/06 12:36:49.979] Exception: mongod process exited with non-zero code 23
 [2015/04/06 12:36:49.987] Command failed: exit status 1
 [2015/04/06 12:36:49.987] Task completed - FAILURE.



 Comments   
Comment by Githook User [ 08/Apr/15 ]

Author:

{u'username': u'jrassi', u'name': u'Jason Rassi', u'email': u'rassi@10gen.com'}

Message: SERVER-17901 Fix memory leak in IndexCatalog::_isSpecOk()
Branch: master
https://github.com/mongodb/mongo/commit/655f6f61888035798519a5866dec9f9d76f7c224

Comment by Spencer Jackson [ 06/Apr/15 ]

Huh.... I read that too quickly when I went over it and thought that leaking memory would be a warning.
According to this though: https://code.google.com/p/address-sanitizer/wiki/LeakSanitizer

flag default description
exitcode   23 If non-zero, LSan will call _exit(exitcode) upon detecting leaks. This can be different from the exit code used to signal ASan errors.

So yeah, leaks are errors by default.

Comment by Eric Milkie [ 06/Apr/15 ]

I don't see any hangs. Instead, mongod is exiting with code 23. In the logs, here is the reason:

http://buildlogs.mongodb.org/MCI_ubuntu1404-debug-asan/builds/895126/test/jsCore_WT_0/index_many2.js

Comment by Spencer Jackson [ 06/Apr/15 ]

rassi@10gen.com Could you take a look at this? It also appears to be related to partial indexes.

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