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

Server aborts when running $centerSphere query with NaN radius

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 2.6.5, 2.7.6
    • Affects Version/s: 2.6.4, 2.7.5
    • Component/s: Geo
    • Fully Compatible
    • ALL
    • Hide
      var t = db.geo_nan_radius;
      t.drop();
      
      // no index required
      t.find({geo: {$within: {$centerSphere: [[0,0], NaN]}}}).explain();
      
      Show
      var t = db.geo_nan_radius; t.drop(); // no index required t.find({geo: {$within: {$centerSphere: [[0,0], NaN]}}}).explain();

      This bug seems pretty similar to SERVER-14350, but it's reproducible in 2.6.4 and master (both of which include the patch). I can't reproduce the abort without using .explain().

      Backtrace:

      2014-08-21T00:29:25.221-0400 F          [conn1] src/third_party/s2/s2cap.cc:36:  Check failed: (angle.radians()) >= (0)
      2014-08-21T00:29:25.221-0400 I          [conn1] Fatal Assertion 0
      2014-08-21T00:29:25.228-0400 I          [conn1] 
       0xe9a9f9 0xe46951 0xe2d191 0xf41c00 0xf47bff 0x9fbdb6 0x9f8db3 0x9f4f02 0x9f51f1 0xa76239 0xa74771 0xa735dc 0xa70aca 0xa71565 0xb3637e 0xb610c0 0xa43c1e 0x7d6fdd 0xe59d51 0x7f453458b182
      ----- BEGIN BACKTRACE -----
      {"backtrace":[{"b":"400000","o":"A9A9F9"},{"b":"400000","o":"A46951"},{"b":"400000","o":"A2D191"},{"b":"400000","o":"B41C00"},{"b":"400000","o":"B47BFF"},{"b":"400000","o":"5FBDB6"},{"b":"400000","o":"5F8DB3"},{"b":"400000","o":"5F4F02"},{"b":"400000","o":"5F51F1"},{"b":"400000","o":"676239"},{"b":"400000","o":"674771"},{"b":"400000","o":"6735DC"},{"b":"400000","o":"670ACA"},{"b":"400000","o":"671565"},{"b":"400000","o":"73637E"},{"b":"400000","o":"7610C0"},{"b":"400000","o":"643C1E"},{"b":"400000","o":"3D6FDD"},{"b":"400000","o":"A59D51"},{"b":"7F4534583000","o":"8182"}],"processInfo":{ "mongodbVersion" : "2.7.6-pre-", "gitVersion" : "d35c9ee22833c2965ad5391d657dc38e96de20f4", "uname" : { "sysname" : "Linux", "release" : "3.13.0-24-generic", "version" : "#47-Ubuntu SMP Fri May 2 23:30:00 UTC 2014", "machine" : "x86_64" }, "somap" : [ { "elfType" : 2, "b" : "400000", "buildId" : "90A9737956198A8903E84976EECBE434EF4E9DD0" }, { "b" : "7FFF054FE000", "elfType" : 3, "buildId" : "6755FAD2CADACDF1667E5B57FF1EDFC28DD1C976" }, { "b" : "7F4534583000", "path" : "/lib/x86_64-linux-gnu/libpthread.so.0", "elfType" : 3, "buildId" : "FE662C4D7B14EE804E0C1902FB55218A106BC5CB" }, { "b" : "7F453437B000", "path" : "/lib/x86_64-linux-gnu/librt.so.1", "elfType" : 3, "buildId" : "92FCF41EFE012D6186E31A59AD05BDBB487769AB" }, { "b" : "7F4534177000", "path" : "/lib/x86_64-linux-gnu/libdl.so.2", "elfType" : 3, "buildId" : "C1AE4CB7195D337A77A3C689051DABAA3980CA0C" }, { "b" : "7F4533E73000", "path" : "/usr/lib/x86_64-linux-gnu/libstdc++.so.6", "elfType" : 3, "buildId" : "19EFDDAB11B3BF5C71570078C59F91CF6592CE9E" }, { "b" : "7F4533B6D000", "path" : "/lib/x86_64-linux-gnu/libm.so.6", "elfType" : 3, "buildId" : "574C6350381DA194C00FF555E0C1784618C05569" }, { "b" : "7F4533957000", "path" : "/lib/x86_64-linux-gnu/libgcc_s.so.1", "elfType" : 3, "buildId" : "CC0D578C2E0D86237CA7B0CE8913261C506A629A" }, { "b" : "7F4533591000", "path" : "/lib/x86_64-linux-gnu/libc.so.6", "elfType" : 3, "buildId" : "8BA18E4F3BB61EB5DBBF9C490B398C665DF407F9" }, { "b" : "7F45347A1000", "path" : "/lib64/ld-linux-x86-64.so.2", "elfType" : 3, "buildId" : "9F00581AB3C73E3AEA35995A0C50D24D59A01D47" } ] }}
       mongod(_ZN5mongo15printStackTraceERSo+0x29) [0xe9a9f9]
       mongod(_ZN5mongo10logContextEPKc+0xE1) [0xe46951]
       mongod(_ZN5mongo13fassertFailedEi+0x61) [0xe2d191]
       mongod(_ZN15LogMessageFatalC1EPKci+0x0) [0xf41c00]
       mongod(_ZN5S2Cap13FromAxisAngleERK7Vector3IdERK7S1Angle+0x15F) [0xf47bff]
       mongod(_ZN5mongo9GeoParser8parseCapERKNS_7BSONObjEPNS_10CapWithCRSE+0x496) [0x9fbdb6]
       mongod(_ZN5mongo17GeometryContainer9parseFromERKNS_7BSONObjE+0x353) [0x9f8db3]
       mongod(_ZN5mongo8GeoQuery16parseLegacyQueryERKNS_7BSONObjE+0x572) [0x9f4f02]
       mongod(_ZN5mongo8GeoQuery9parseFromERKNS_7BSONObjE+0x11) [0x9f51f1]
       mongod(_ZN5mongo31expressionParserGeoCallbackRealEPKciRKNS_7BSONObjE+0x229) [0xa76239]
       mongod(_ZNSt17_Function_handlerIFN5mongo10StatusWithIPNS0_15MatchExpressionEEEPKciRKNS0_7BSONObjEEPSA_E9_M_invokeERKSt9_Any_dataS6_iS9_+0x11) [0xa74771]
       mongod(_ZN5mongo21MatchExpressionParser14_parseSubFieldERKNS_7BSONObjEPKNS_18AndMatchExpressionEPKcRKNS_11BSONElementEi+0x16C) [0xa735dc]
       mongod(_ZN5mongo21MatchExpressionParser9_parseSubEPKcRKNS_7BSONObjEPNS_18AndMatchExpressionEi+0x3DA) [0xa70aca]
       mongod(_ZN5mongo21MatchExpressionParser6_parseERKNS_7BSONObjEi+0x785) [0xa71565]
       mongod(_ZN5mongo14CanonicalQuery12canonicalizeERKNS_12QueryMessageEPPS0_RKNS_21MatchExpressionParser13WhereCallbackE+0x6E) [0xb3637e]
       mongod(_ZN5mongo11newRunQueryEPNS_16OperationContextERNS_7MessageERNS_12QueryMessageERNS_5CurOpES3_+0x3E0) [0xb610c0]
       mongod(_ZN5mongo16assembleResponseEPNS_16OperationContextERNS_7MessageERNS_10DbResponseERKNS_11HostAndPortE+0x6AE) [0xa43c1e]
       mongod(_ZN5mongo16MyMessageHandler7processERNS_7MessageEPNS_21AbstractMessagingPortEPNS_9LastErrorE+0xDD) [0x7d6fdd]
       mongod(_ZN5mongo17PortMessageServer17handleIncomingMsgEPv+0x481) [0xe59d51]
       libpthread.so.0(+0x8182) [0x7f453458b182]
      -----  END BACKTRACE  -----
      2014-08-21T00:29:25.229-0400 I          [conn1] 
      
      ***aborting after fassert() failure
      
      
      2014-08-21T00:29:25.236-0400 F          [conn1] Got signal: 6 (Aborted).
      

            Assignee:
            siyuan.zhou@mongodb.com Siyuan Zhou
            Reporter:
            kamran.khan Kamran K.
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: