Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-20629

Use-after-free in CatalogManagerReplicaSet::_runReadCommand

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 3.1.9
    • Affects Version/s: 3.1.8
    • Component/s: Sharding
    • None
    • Fully Compatible
    • ALL
    • TIG A (10/09/15)

      Observed incidentally in an unrelated patch build. The test was jstests/noPassthroughWithMongod/sharding_balance3.js, but apparently in the initial instantiation of ShardingTest.

      [js_test:sharding_balance3] 2015-09-24T00:31:20.588+0000 s20015| 2015-09-24T00:31:20.589+0000 D EXECUTOR [ShardWork-0] Executing a task on behalf of pool ShardWork
      [js_test:sharding_balance3] 2015-09-24T00:31:20.588+0000 s20015| 2015-09-24T00:31:20.589+0000 D EXECUTOR [ShardWork-0] waiting for work; I am one of 1 thread(s); the minimum number of threads is 1
      [js_test:sharding_balance3] 2015-09-24T00:31:20.855+0000 2015-09-24T00:31:20.855+0000 W NETWORK  [thread1] Failed to connect to 127.0.0.1:20015, reason: errno:10061 No connection could be made because the target machine actively refused it.
      [js_test:sharding_balance3] 2015-09-24T00:31:21.285+0000 s20015| 2015-09-24T00:31:21.285+0000 I CONTROL  [mongosMain] mongos.exe    ...\src\mongo\s\catalog\replset\catalog_manager_replica_set.cpp(1258)  mongo::CatalogManagerReplicaSet::_runReadCommand+0x197
      [js_test:sharding_balance3] 2015-09-24T00:31:21.286+0000 s20015| 2015-09-24T00:31:21.285+0000 I CONTROL  [mongosMain] mongos.exe    ...\src\mongo\s\catalog\replset\catalog_manager_replica_set.cpp(923)   mongo::CatalogManagerReplicaSet::runUserManagementReadCommand+0x1f
      [js_test:sharding_balance3] 2015-09-24T00:31:21.286+0000 s20015| 2015-09-24T00:31:21.285+0000 I CONTROL  [mongosMain] mongos.exe    ...\src\mongo\s\catalog\forwarding_catalog_manager.cpp(522)            <lambda_f245f6e009477acf374ef766d282129d>::operator()+0x56
      [js_test:sharding_balance3] 2015-09-24T00:31:21.286+0000 s20015| 2015-09-24T00:31:21.285+0000 I CONTROL  [mongosMain] mongos.exe    ...\src\mongo\s\catalog\forwarding_catalog_manager.cpp(316)            mongo::ForwardingCatalogManager::retry<<lambda_f245f6e009477acf374ef766d282129d> >+0x4a
      [js_test:sharding_balance3] 2015-09-24T00:31:21.286+0000 s20015| 2015-09-24T00:31:21.285+0000 I CONTROL  [mongosMain] mongos.exe    ...\src\mongo\s\catalog\forwarding_catalog_manager.cpp(526)            mongo::ForwardingCatalogManager::runUserManagementReadCommand+0x30
      [js_test:sharding_balance3] 2015-09-24T00:31:21.286+0000 s20015| 2015-09-24T00:31:21.286+0000 I CONTROL  [mongosMain] mongos.exe    ...\src\mongo\db\auth\user_cache_invalidator_job.cpp(96)               mongo::`anonymous namespace'::getCurrentCacheGeneration+0x1a9
      [js_test:sharding_balance3] 2015-09-24T00:31:21.286+0000 s20015| 2015-09-24T00:31:21.286+0000 I CONTROL  [mongosMain] mongos.exe    ...\src\mongo\db\auth\user_cache_invalidator_job.cpp(114)              mongo::UserCacheInvalidator::initialize+0x39
      [js_test:sharding_balance3] 2015-09-24T00:31:21.286+0000 s20015| 2015-09-24T00:31:21.286+0000 I CONTROL  [mongosMain] mongos.exe    ...\src\mongo\s\server.cpp(255)                                        runMongosServer+0x4c2
      [js_test:sharding_balance3] 2015-09-24T00:31:21.286+0000 s20015| 2015-09-24T00:31:21.286+0000 I CONTROL  [mongosMain] mongos.exe    ...\src\mongo\s\server.cpp(328)                                        _main+0x794
      [js_test:sharding_balance3] 2015-09-24T00:31:21.286+0000 s20015| 2015-09-24T00:31:21.286+0000 I CONTROL  [mongosMain] mongos.exe    ...\src\mongo\s\server.cpp(388)                                        mongoSMain+0x272
      [js_test:sharding_balance3] 2015-09-24T00:31:21.286+0000 s20015| 2015-09-24T00:31:21.286+0000 I CONTROL  [mongosMain] mongos.exe    ...\src\mongo\s\server.cpp(412)                                        wmain+0x35
      [js_test:sharding_balance3] 2015-09-24T00:31:21.286+0000 s20015| 2015-09-24T00:31:21.286+0000 I CONTROL  [mongosMain] mongos.exe    f:\dd\vctools\crt\crtw32\startup\crt0.c(255)                           __tmainCRTStartup+0xec
      [js_test:sharding_balance3] 2015-09-24T00:31:21.286+0000 s20015| 2015-09-24T00:31:21.286+0000 I CONTROL  [mongosMain] mongos.exe    f:\dd\vctools\crt\crtw32\startup\crt0.c(165)                           wmainCRTStartup+0xe
      [js_test:sharding_balance3] 2015-09-24T00:31:21.286+0000 s20015| 2015-09-24T00:31:21.286+0000 I CONTROL  [mongosMain] kernel32.dll                                                                         BaseThreadInitThunk+0xd
      [js_test:sharding_balance3] 2015-09-24T00:31:21.286+0000 s20015| 2015-09-24T00:31:21.286+0000 I -        [mongosMain]
      [js_test:sharding_balance3] 2015-09-24T00:31:21.286+0000 s20015| 2015-09-24T00:31:21.286+0000 I CONTROL  [mongosMain] writing minidump diagnostic file C:\data\mci\src\mongos.2015-09-24T00-31-21.mdmp
      [js_test:sharding_balance3] 2015-09-24T00:31:22.055+0000 2015-09-24T00:31:22.055+0000 W NETWORK  [thread1] Failed to connect to 127.0.0.1:20015, reason: errno:10061 No connection could be made because the target machine actively refused it.
      [MongoDFixture:job0] 2015-09-24T00:31:23.261+0000 I NETWORK  [conn9] end connection 127.0.0.1:56163 (0 connections now open)
      [MongoDFixture:job0] 2015-09-24T00:31:23.452+0000 I NETWORK  [initandlisten] connection accepted from 127.0.0.1:56207 #10 (1 connection now open)
      [js_test:sharding_balance3] 2015-09-24T00:31:23.098+0000 s20015| 2015-09-24T00:31:23.099+0000 I CONTROL  [mongosMain] *** immediate exit due to unhandled exception
      

            Assignee:
            esha.maharishi@mongodb.com Esha Maharishi (Inactive)
            Reporter:
            kevin.pulo@mongodb.com Kevin Pulo
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: