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

Invariant failure during upgrade from 3.0, with invalid partialFilterExpression index expression

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 3.1.5
    • Component/s: Index Maintenance
    • ALL
    • Hide

      Connect to running mongod 3.0

      db.coll.ensureIndex({y: 1}, {partialFilterExpression: {a: {$lt: this.undefined}}});
      db.coll.insert({y:1, a: 1});
      

      Stop mongod 3.0
      Start mongod 3.1.5

      Show
      Connect to running mongod 3.0 db.coll.ensureIndex({y: 1}, {partialFilterExpression: {a: {$lt: this .undefined}}}); db.coll.insert({y:1, a: 1}); Stop mongod 3.0 Start mongod 3.1.5

      If an index was created in 3.0 with partialFilterExpression option and there is data, the upgrade to 3.1 will fail with the follwoing:

      2015-07-10T13:41:25.390-0400 I -        [initandlisten] Invariant failure: res.getStatus() resulted in status BadValue cannot compare to undefined at src/mongo/db/catalog/index_catalog_entry.cpp 108
      2015-07-10T13:41:25.394-0400 I CONTROL  [initandlisten]
       0x10b4372b9 0x10b3ee8bc 0x10b3dc276 0x10ada1f3d 0x10ad9813a 0x10ad97d41 0x10ad7cbb1 0x10ad8cdf6 0x10ad8d79d 0x10ad92f71 0x10ac63b04 0x10ac61f13 0x10ac6760c 0x10ac61ef4 0x5
      ----- BEGIN BACKTRACE -----
      {"backtrace":[{"b":"10AC61000","o":"7D62B9"},{"b":"10AC61000","o":"78D8BC"},{"b":"10AC61000","o":"77B276"},{"b":"10AC61000","o":"140F3D"},{"b":"10AC61000","o":"13713A"},{"b":"10AC61000","o":"136D41"},{"b":"10AC61000","o":"11BBB1"},{"b":"10AC61000","o":"12BDF6"},{"b":"10AC61000","o":"12C79D"},{"b":"10AC61000","o":"131F71"},{"b":"10AC61000","o":"2B04"},{"b":"10AC61000","o":"F13"},{"b":"10AC61000","o":"660C"},{"b":"10AC61000","o":"EF4"},{"b":"0","o":"5"}],"processInfo":{ "mongodbVersion" : "3.1.5", "gitVersion" : "c57e8885dee5e7f259cef043657d4b4b3bf32645", "compiledModules" : [], "uname" : { "sysname" : "Darwin", "release" : "14.4.0", "version" : "Darwin Kernel Version 14.4.0: Thu May 28 11:35:04 PDT 2015; root:xnu-2782.30.5~1/RELEASE_X86_64", "machine" : "x86_64" }, "somap" : [ { "path" : "/usr/local/bin/mongod", "machType" : 2, "b" : "10AC61000", "buildId" : "7E8EECBC13D63C038B5075DF661CCCC2" }, { "path" : "/usr/lib/libSystem.B.dylib", "machType" : 6, "b" : "7FFF8CDEC000", "buildId" : "AD223AEB237D35A3825EEECF95916838" }, { "path" : "/usr/lib/libc++.1.dylib", "machType" : 6, "b" : "7FFF87E03000", "buildId" : "1B9530FD989B3174BB1CBDC159501710" }, { "path" : "/usr/lib/system/libcache.dylib", "machType" : 6, "b" : "7FFF87712000", "buildId" : "45E9A2E799C436B2BEE30C4E11614AD1" }, { "path" : "/usr/lib/system/libcommonCrypto.dylib", "machType" : 6, "b" : "7FFF92524000", "buildId" : "E789748DF9A73CFFB31790DF348B1E95" }, { "path" : "/usr/lib/system/libcompiler_rt.dylib", "machType" : 6, "b" : "7FFF8C9EB000", "buildId" : "BF8FC133EE103DA69B9092039E28678F" }, { "path" : "/usr/lib/system/libcopyfile.dylib", "machType" : 6, "b" : "7FFF8C9E2000", "buildId" : "0C68D3A6ACDD3EF3991ACC82C32AB836" }, { "path" : "/usr/lib/system/libcorecrypto.dylib", "machType" : 6, "b" : "7FFF8E7E8000", "buildId" : "5779FFA04D9A3AD4B7F2618227621DC8" }, { "path" : "/usr/lib/system/libdispatch.dylib", "machType" : 6, "b" : "7FFF94814000", "buildId" : "502CF32B669B3709886208188225E4F0" }, { "path" : "/usr/lib/system/libdyld.dylib", "machType" : 6, "b" : "7FFF9180F000", "buildId" : "78E8F33D0C863DB6A93DB67A25BA3522" }, { "path" : "/usr/lib/system/libkeymgr.dylib", "machType" : 6, "b" : "7FFF89906000", "buildId" : "77845842DE703CC5BD01C3D14227CED5" }, { "path" : "/usr/lib/system/liblaunch.dylib", "machType" : 6, "b" : "7FFF8C3C4000", "buildId" : "B1301610D60C3301B25411F066BD48A7" }, { "path" : "/usr/lib/system/libmacho.dylib", "machType" : 6, "b" : "7FFF88FB1000", "buildId" : "126CA2EDDE91308F8881B9DAEC3C63B6" }, { "path" : "/usr/lib/system/libquarantine.dylib", "machType" : 6, "b" : "7FFF8E8A9000", "buildId" : "7AF900412768378A925AD83161863642" }, { "path" : "/usr/lib/system/libremovefile.dylib", "machType" : 6, "b" : "7FFF96AD0000", "buildId" : "3485B5F46CE83C628DFD8736ED6E8531" }, { "path" : "/usr/lib/system/libsystem_asl.dylib", "machType" : 6, "b" : "7FFF92779000", "buildId" : "F153AC5B0542356E88C820A62CA704E2" }, { "path" : "/usr/lib/system/libsystem_blocks.dylib", "machType" : 6, "b" : "7FFF960E6000", "buildId" : "9615D10AFCA73BE4AA1A1B195DACE1A1" }, { "path" : "/usr/lib/system/libsystem_c.dylib", "machType" : 6, "b" : "7FFF94842000", "buildId" : "86FBED7AF2C83591AD6F486DD57E6B6A" }, { "path" : "/usr/lib/system/libsystem_configuration.dylib", "machType" : 6, "b" : "7FFF8CDF7000", "buildId" : "B124CC6459B9354FA693B3431ADB87AC" }, { "path" : "/usr/lib/system/libsystem_coreservices.dylib", "machType" : 6, "b" : "7FFF8D674000", "buildId" : "41B7C5785A5331C8A96FC73E030B0938" }, { "path" : "/usr/lib/system/libsystem_coretls.dylib", "machType" : 6, "b" : "7FFF8FA54000", "buildId" : "0F7BAD0CFC283E4B8D2106B426599043" }, { "path" : "/usr/lib/system/libsystem_dnssd.dylib", "machType" : 6, "b" : "7FFF90CEA000", "buildId" : "4EA2DEC377EE3941A703DE6DC2056B15" }, { "path" : "/usr/lib/system/libsystem_info.dylib", "machType" : 6, "b" : "7FFF92C6A000", "buildId" : "AEB3FE62476330508352D6F9AF961AE6" }, { "path" : "/usr/lib/system/libsystem_kernel.dylib", "machType" : 6, "b" : "7FFF91268000", "buildId" : "101D28C0AF073B8187BECA27ADED33AB" }, { "path" : "/usr/lib/system/libsystem_m.dylib", "machType" : 6, "b" : "7FFF894D0000", "buildId" : "1E12AB456D9636D0A226F24D9FB0D9D6" }, { "path" : "/usr/lib/system/libsystem_malloc.dylib", "machType" : 6, "b" : "7FFF92790000", "buildId" : "DDA8928BCC0D3255BD8A3FEA0982B890" }, { "path" : "/usr/lib/system/libsystem_network.dylib", "machType" : 6, "b" : "7FFF8941C000", "buildId" : "6105C13467223C0AA4CE5E1261E2E1CC" }, { "path" : "/usr/lib/system/libsystem_networkextension.dylib", "machType" : 6, "b" : "7FFF89457000", "buildId" : "3E99FF35DCBB3A4C8853F1F39A792D29" }, { "path" : "/usr/lib/system/libsystem_notify.dylib", "machType" : 6, "b" : "7FFF8C170000", "buildId" : "61147800F3203DAA850CBADF33855F29" }, { "path" : "/usr/lib/system/libsystem_platform.dylib", "machType" : 6, "b" : "7FFF8FDBE000", "buildId" : "64E34079D7123D669CE2418624A5C040" }, { "path" : "/usr/lib/system/libsystem_pthread.dylib", "machType" : 6, "b" : "7FFF8F7A8000", "buildId" : "3103AA7F3BAE3673964947FFD7E15C97" }, { "path" : "/usr/lib/system/libsystem_sandbox.dylib", "machType" : 6, "b" : "7FFF8E8F8000", "buildId" : "3F5E973FC70231AC97BC05F5C195683C" }, { "path" : "/usr/lib/system/libsystem_secinit.dylib", "machType" : 6, "b" : "7FFF87228000", "buildId" : "581DAD0F6B633A48B63B917AF799ABAA" }, { "path" : "/usr/lib/system/libsystem_stats.dylib", "machType" : 6, "b" : "7FFF8985F000", "buildId" : "48A9387D5C633E79979CF675552F6FC9" }, { "path" : "/usr/lib/system/libsystem_trace.dylib", "machType" : 6, "b" : "7FFF880C4000", "buildId" : "840F5301B55A307890B9FEFFD6CD741A" }, { "path" : "/usr/lib/system/libunc.dylib", "machType" : 6, "b" : "7FFF903FB000", "buildId" : "5676F7EAC1DF329FB006D2C3022B7D70" }, { "path" : "/usr/lib/system/libunwind.dylib", "machType" : 6, "b" : "7FFF8E862000", "buildId" : "BE7E51A0B6EA3A549CCA9D88F683A6D6" }, { "path" : "/usr/lib/system/libxpc.dylib", "machType" : 6, "b" : "7FFF8934C000", "buildId" : "80D6899717B932B6A5FAA218216415E5" }, { "path" : "/usr/lib/libobjc.A.dylib", "machType" : 6, "b" : "7FFF8CA9B000", "buildId" : "759E155DBC423D4E869B6F57D477177C" }, { "path" : "/usr/lib/libauto.dylib", "machType" : 6, "b" : "7FFF91532000", "buildId" : "A260789BD4D8316A9490254767B8A5F1" }, { "path" : "/usr/lib/libc++abi.dylib", "machType" : 6, "b" : "7FFF89530000", "buildId" : "88A22A0F87C63002BFBAAC0F2808B8B9" }, { "path" : "/usr/lib/libDiagnosticMessagesClient.dylib", "machType" : 6, "b" : "7FFF898B7000", "buildId" : "2EE8E4365CDC34C599595BA218D507FB" } ] }}
       mongod(_ZN5mongo15printStackTraceERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEE+0x39) [0x10b4372b9]
       mongod(_ZN5mongo10logContextEPKc+0x15C) [0x10b3ee8bc]
       mongod(_ZN5mongo17invariantOKFailedEPKcRKNS_6StatusES1_j+0x216) [0x10b3dc276]
       mongod(_ZN5mongo17IndexCatalogEntry4initEPNS_16OperationContextEPNS_17IndexAccessMethodE+0x4BD) [0x10ada1f3d]
       mongod(_ZN5mongo12IndexCatalog24_setupInMemoryStructuresEPNS_16OperationContextEPNS_15IndexDescriptorEb+0x8A) [0x10ad9813a]
       mongod(_ZN5mongo12IndexCatalog4initEPNS_16OperationContextE+0x2B1) [0x10ad97d41]
       mongod(_ZN5mongo10CollectionC2EPNS_16OperationContextENS_10StringDataEPNS_22CollectionCatalogEntryEPNS_11RecordStoreEPNS_20DatabaseCatalogEntryE+0x2D1) [0x10ad7cbb1]
       mongod(_ZN5mongo8Database30_getOrCreateCollectionInstanceEPNS_16OperationContextENS_10StringDataE+0x96) [0x10ad8cdf6]
       mongod(_ZN5mongo8DatabaseC2EPNS_16OperationContextENS_10StringDataEPNS_20DatabaseCatalogEntryE+0x6DD) [0x10ad8d79d]
       mongod(_ZN5mongo14DatabaseHolder6openDbEPNS_16OperationContextENS_10StringDataEPb+0x191) [0x10ad92f71]
       mongod(_ZN5mongoL14_initAndListenEi+0x1514) [0x10ac63b04]
       mongod(_ZN5mongo13initAndListenEi+0x13) [0x10ac61f13]
       mongod(main+0x3BC) [0x10ac6760c]
       mongod(start+0x34) [0x10ac61ef4]
       ??? [0x5]
      -----  END BACKTRACE  -----
      2015-07-10T13:41:25.395-0400 I -        [initandlisten]
      
      ***aborting after invariant() failure
      

            Assignee:
            Unassigned Unassigned
            Reporter:
            jonathan.abrahams Jonathan Abrahams
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: