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

Starting mongod with wiredtiger storage engine when dbpath is in use causes backtrace

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 2.8.0-rc4
    • Component/s: None
    • None
    • ALL
    • Hide

      Start a single mongod with --storageEngine wiredtiger
      Start a second mongod with --storageEngine wiredtiger and the same dbpath as the first.

      Show
      Start a single mongod with --storageEngine wiredtiger Start a second mongod with --storageEngine wiredtiger and the same dbpath as the first.

      Steps to reproduce:

      Start a single mongod with --storageEngine wiredtiger
      Start a second mongod with --storageEngine wiredtiger and the same dbpath as the first.

      The second will produce the following backtrace:

      2015-01-08T15:41:04.458-0500 I CONTROL  [initandlisten] MongoDB starting : pid=16552 port=27017 dbpath=wiredtiger 64-bit host=Sam-Helman-MacBook-Pro.local
      2015-01-08T15:41:04.459-0500 I CONTROL  [initandlisten] db version v2.8.0-rc4
      2015-01-08T15:41:04.459-0500 I CONTROL  [initandlisten] git version: 3ad571742911f04b307f0071979425511c4f2570
      2015-01-08T15:41:04.459-0500 I CONTROL  [initandlisten] build info: Darwin Sam-Helman-MacBook-Pro.local 14.0.0 Darwin Kernel Version 14.0.0: Fri Sep 19 00:26:44 PDT 2014; root:xnu-2782.1.97~2/RELEASE_X86_64 x86_64 BOOST_LIB_VERSION=1_49
      2015-01-08T15:41:04.459-0500 I CONTROL  [initandlisten] allocator: system
      2015-01-08T15:41:04.459-0500 I CONTROL  [initandlisten] options: { storage: { dbPath: "wiredtiger", engine: "wiredtiger" } }
      2015-01-08T15:41:04.459-0500 E NETWORK  [initandlisten] listen(): bind() failed errno:48 Address already in use for socket: 0.0.0.0:27017
      2015-01-08T15:41:04.459-0500 E NETWORK  [initandlisten]   addr already in use
      2015-01-08T15:41:04.459-0500 I STORAGE  [initandlisten] wiredtiger_open config: create,cache_size=4G,session_max=20000,extensions=[local=(entry=index_collator_extension)],statistics=(fast),log=(enabled=true,archive=true,path=journal,compressor=snappy),checkpoint=(wait=60,log_size=2GB),statistics_log=(wait=0),
      
      2015-01-08T15:41:09.494-0500 E STORAGE  [initandlisten] WiredTiger (16) [1420749669:494821][16552:0x7fff78dec300], wiredtiger_open: WiredTiger database is already being managed by another process: Resource busy
      2015-01-08T15:41:09.494-0500 I -        [initandlisten] Invariant failure: ret resulted in status UnknownError 16: Resource busy at src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp 171
      2015-01-08T15:41:09.498-0500 I CONTROL  [initandlisten]
       0x10f7d02da 0x10f76df1b 0x10f75b4d3 0x10f5a23d3 0x10f5a1591 0x10f230dcb 0x10ef3c1fc 0x10ef3b283 0x10ef4070a 0x10ef3b264 0x5
      ----- BEGIN BACKTRACE -----
      {"backtrace":[{"b":"10EF3A000","o":"8962DA"},{"b":"10EF3A000","o":"833F1B"},{"b":"10EF3A000","o":"8214D3"},{"b":"10EF3A000","o":"6683D3"},{"b":"10EF3A000","o":"667591"},{"b":"10EF3A000","o":"2F6DCB"},{"b":"10EF3A000","o":"21FC"},{"b":"10EF3A000","o":"1283"},{"b":"10EF3A000","o":"670A"},{"b":"10EF3A000","o":"1264"},{"b":"0","o":"5"}],"processInfo":{ "mongodbVersion" : "2.8.0-rc4", "gitVersion" : "3ad571742911f04b307f0071979425511c4f2570", "uname" : { "sysname" : "Darwin", "release" : "14.0.0", "version" : "Darwin Kernel Version 14.0.0: Fri Sep 19 00:26:44 PDT 2014; root:xnu-2782.1.97~2/RELEASE_X86_64", "machine" : "x86_64" }, "somap" : [ { "path" : "/Users/sam/tengen/mongo/mongod", "machType" : 2, "b" : "10EF3A000", "buildId" : "5C78513CB4F535BBB2F144CD29414864" }, { "path" : "/usr/lib/libSystem.B.dylib", "machType" : 6, "b" : "7FFF8F0D1000", "buildId" : "DA954461EC6A3DF085516FC810627627" }, { "path" : "/usr/lib/libstdc++.6.dylib", "machType" : 6, "b" : "7FFF8AF64000", "buildId" : "803F6AC887DC3E249E80729B551F6FFF" }, { "path" : "/usr/lib/system/libcache.dylib", "machType" : 6, "b" : "7FFF8CF68000", "buildId" : "45E9A2E799C436B2BEE30C4E11614AD1" }, { "path" : "/usr/lib/system/libcommonCrypto.dylib", "machType" : 6, "b" : "7FFF8FA2C000", "buildId" : "D381EBC669D831D380845A80A32CB748" }, { "path" : "/usr/lib/system/libcompiler_rt.dylib", "machType" : 6, "b" : "7FFF8FDEB000", "buildId" : "BF8FC133EE103DA69B9092039E28678F" }, { "path" : "/usr/lib/system/libcopyfile.dylib", "machType" : 6, "b" : "7FFF93D97000", "buildId" : "0C68D3A6ACDD3EF3991ACC82C32AB836" }, { "path" : "/usr/lib/system/libcorecrypto.dylib", "machType" : 6, "b" : "7FFF94CF4000", "buildId" : "E178980139853949B7366B3378873301" }, { "path" : "/usr/lib/system/libdispatch.dylib", "machType" : 6, "b" : "7FFF91FD3000", "buildId" : "502CF32B669B3709886208188225E4F0" }, { "path" : "/usr/lib/system/libdyld.dylib", "machType" : 6, "b" : "7FFF922F4000", "buildId" : "19FAF435C16533749DEFD7BBA7D61DB6" }, { "path" : "/usr/lib/system/libkeymgr.dylib", "machType" : 6, "b" : "7FFF8F8B2000", "buildId" : "77845842DE703CC5BD01C3D14227CED5" }, { "path" : "/usr/lib/system/liblaunch.dylib", "machType" : 6, "b" : "7FFF8D806000", "buildId" : "8A9889248BE735FEBF7D322E90EFE49E" }, { "path" : "/usr/lib/system/libmacho.dylib", "machType" : 6, "b" : "7FFF974EA000", "buildId" : "126CA2EDDE91308F8881B9DAEC3C63B6" }, { "path" : "/usr/lib/system/libquarantine.dylib", "machType" : 6, "b" : "7FFF8D144000", "buildId" : "DC0416272D92361CBABFA869A5C72293" }, { "path" : "/usr/lib/system/libremovefile.dylib", "machType" : 6, "b" : "7FFF93FD4000", "buildId" : "3485B5F46CE83C628DFD8736ED6E8531" }, { "path" : "/usr/lib/system/libsystem_asl.dylib", "machType" : 6, "b" : "7FFF92DC9000", "buildId" : "F153AC5B0542356E88C820A62CA704E2" }, { "path" : "/usr/lib/system/libsystem_blocks.dylib", "machType" : 6, "b" : "7FFF94C18000", "buildId" : "9615D10AFCA73BE4AA1A1B195DACE1A1" }, { "path" : "/usr/lib/system/libsystem_c.dylib", "machType" : 6, "b" : "7FFF94C1A000", "buildId" : "C185E86274243210B5286B822577A4B8" }, { "path" : "/usr/lib/system/libsystem_configuration.dylib", "machType" : 6, "b" : "7FFF8D141000", "buildId" : "9FBA1CE497D0347EA44393ED94512E92" }, { "path" : "/usr/lib/system/libsystem_coreservices.dylib", "machType" : 6, "b" : "7FFF8DC6B000", "buildId" : "41B7C5785A5331C8A96FC73E030B0938" }, { "path" : "/usr/lib/system/libsystem_coretls.dylib", "machType" : 6, "b" : "7FFF8CF6D000", "buildId" : "EBBF7EF680D83F8F825CB412BD6D22C0" }, { "path" : "/usr/lib/system/libsystem_dnssd.dylib", "machType" : 6, "b" : "7FFF923EA000", "buildId" : "62B70ECAE40D3C63896E7F00EC386DDB" }, { "path" : "/usr/lib/system/libsystem_info.dylib", "machType" : 6, "b" : "7FFF92452000", "buildId" : "B85A85D585303A93B0C34DEC41F79478" }, { "path" : "/usr/lib/system/libsystem_kernel.dylib", "machType" : 6, "b" : "7FFF9750F000", "buildId" : "93E0E0A975B63904BB4E4BC7C05F4B6B" }, { "path" : "/usr/lib/system/libsystem_m.dylib", "machType" : 6, "b" : "7FFF93F98000", "buildId" : "1E12AB456D9636D0A226F24D9FB0D9D6" }, { "path" : "/usr/lib/system/libsystem_malloc.dylib", "machType" : 6, "b" : "7FFF974F0000", "buildId" : "19BCC25757173502A71F95D65AFA861B" }, { "path" : "/usr/lib/system/libsystem_network.dylib", "machType" : 6, "b" : "7FFF92191000", "buildId" : "C0B2313D47BE38A9BEE62634A4F5E14B" }, { "path" : "/usr/lib/system/libsystem_networkextension.dylib", "machType" : 6, "b" : "7FFF8C2DB000", "buildId" : "29AB225BD7FB30ED960065D44B9A9442" }, { "path" : "/usr/lib/system/libsystem_notify.dylib", "machType" : 6, "b" : "7FFF9125E000", "buildId" : "61147800F3203DAA850CBADF33855F29" }, { "path" : "/usr/lib/system/libsystem_platform.dylib", "machType" : 6, "b" : "7FFF95339000", "buildId" : "64E34079D7123D669CE2418624A5C040" }, { "path" : "/usr/lib/system/libsystem_pthread.dylib", "machType" : 6, "b" : "7FFF8A2BB000", "buildId" : "26B1897F0CD330F3B55A37CB45062D73" }, { "path" : "/usr/lib/system/libsystem_sandbox.dylib", "machType" : 6, "b" : "7FFF90569000", "buildId" : "DB9962EF889831CC9B87E01F8CE74C9D" }, { "path" : "/usr/lib/system/libsystem_secinit.dylib", "machType" : 6, "b" : "7FFF8C2E2000", "buildId" : "581DAD0F6B633A48B63B917AF799ABAA" }, { "path" : "/usr/lib/system/libsystem_stats.dylib", "machType" : 6, "b" : "7FFF8D801000", "buildId" : "1DB0443659743F1686CC5FF5F390339C" }, { "path" : "/usr/lib/system/libsystem_trace.dylib", "machType" : 6, "b" : "7FFF8A494000", "buildId" : "A9E6B7D8C3273742AC5486C94218B1DF" }, { "path" : "/usr/lib/system/libunc.dylib", "machType" : 6, "b" : "7FFF8A686000", "buildId" : "5676F7EAC1DF329FB006D2C3022B7D70" }, { "path" : "/usr/lib/system/libunwind.dylib", "machType" : 6, "b" : "7FFF97AFD000", "buildId" : "BE7E51A0B6EA3A549CCA9D88F683A6D6" }, { "path" : "/usr/lib/system/libxpc.dylib", "machType" : 6, "b" : "7FFF923F6000", "buildId" : "9437C02EA07B38C891CB299FAA63083D" }, { "path" : "/usr/lib/libobjc.A.dylib", "machType" : 6, "b" : "7FFF8CACD000", "buildId" : "3B60CD9074A23A5D9686B0772159792A" }, { "path" : "/usr/lib/libauto.dylib", "machType" : 6, "b" : "7FFF92F99000", "buildId" : "A260789BD4D8316A9490254767B8A5F1" }, { "path" : "/usr/lib/libc++abi.dylib", "machType" : 6, "b" : "7FFF8B1D3000", "buildId" : "88A22A0F87C63002BFBAAC0F2808B8B9" }, { "path" : "/usr/lib/libc++.1.dylib", "machType" : 6, "b" : "7FFF8A43F000", "buildId" : "1B9530FD989B3174BB1CBDC159501710" }, { "path" : "/usr/lib/libDiagnosticMessagesClient.dylib", "machType" : 6, "b" : "7FFF97AF6000", "buildId" : "2EE8E4365CDC34C599595BA218D507FB" } ] }}
       mongod(_ZN5mongo15printStackTraceERSo+0x3A) [0x10f7d02da]
       mongod(_ZN5mongo10logContextEPKc+0xDB) [0x10f76df1b]
       mongod(_ZN5mongo17invariantOKFailedEPKcRKNS_6StatusES1_j+0x1A3) [0x10f75b4d3]
       mongod(_ZN5mongo18WiredTigerKVEngineC2ERKSsS2_bb+0x973) [0x10f5a23d3]
       mongod(_ZNK5mongo12_GLOBAL__N_117WiredTigerFactory6createERKNS_19StorageGlobalParamsE+0x41) [0x10f5a1591]
       mongod(_ZN5mongo23GlobalEnvironmentMongoD22setGlobalStorageEngineERKSs+0x7B) [0x10f230dcb]
       mongod(_ZN5mongoL14_initAndListenEi+0xA6C) [0x10ef3c1fc]
       mongod(_ZN5mongo13initAndListenEi+0x13) [0x10ef3b283]
       mongod(main+0x60A) [0x10ef4070a]
       mongod(start+0x34) [0x10ef3b264]
       ??? [0x5]
      -----  END BACKTRACE  -----
      2015-01-08T15:41:09.498-0500 I -        [initandlisten]
      
      ***aborting after invariant() failure
      

            Assignee:
            Unassigned Unassigned
            Reporter:
            sam.helman@10gen.com sam.helman@10gen.com
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: