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

attempt to record query plan for a dropped cursor triggers bad file number assertion

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 2.0.3, 2.1.0
    • Affects Version/s: None
    • Component/s: Querying
    • Labels:
      None
    • ALL
    • 0

      This can occur if an attempt is made to record a query plan after a client cursor is dropped and we try to return the scanned results for the scanned cursor rather than assert.

      Wed Nov 30 21:46:26 [conn6] CMD: drop test.jstests_queryoptimizer3
      Wed Nov 30 21:46:26 [conn5] getFile(): n=-2
      Wed Nov 30 21:46:26 [conn5] Assertion: 10295:getFile(): bad file number value (corrupt db?): run repair
      0x102ac6365 0x102ad12fb 0x102f67cd4 0x102f98106 0x102e23e18 0x10303c29b 0x102f0d98f 0x102fa20d3 0x102fa2169 0x102fad9a0 0x102fae033 0x102fb32fd 0x102fb4a9f 0x102fb65eb 0x103056396 0x103041705 0x103087b25 0x10307cf2d 0x10307e987 0x10307f3d0
      0 mongod 0x0000000102ac6365 _ZN5mongo15printStackTraceERSo + 37
      1 mongod 0x0000000102ad12fb _ZN5mongo11msgassertedEiPKc + 363
      2 mongod 0x0000000102f67cd4 _ZN5mongo8Database7getFileEiib + 296
      3 mongod 0x0000000102f98106 _ZN5mongo11DataFileMgr9getRecordERKNS_7DiskLocE + 166
      4 mongod 0x0000000102e23e18 _ZNK5mongo7DiskLoc3recEv + 24
      5 mongod 0x000000010303c29b _ZNK5mongo7DiskLoc3objEv + 43
      6 mongod 0x0000000102f0d98f _ZNK5mongo12IndexDetails10keyPatternEv + 63
      7 mongod 0x0000000102fa20d3 _ZNK5mongo9QueryPlan8indexKeyEv + 243
      8 mongod 0x0000000102fa2169 _ZNK5mongo9QueryPlan12registerSelfEx + 87
      9 mongod 0x0000000102fad9a0 _ZN5mongo12QueryPlanSet6Runner4nextEv + 376
      10 mongod 0x0000000102fae033 _ZN5mongo12QueryPlanSet6Runner22runUntilFirstCompletesEv + 135
      11 mongod 0x0000000102fb32fd _ZN5mongo12QueryPlanSet5runOpERNS_7QueryOpE + 595
      12 mongod 0x0000000102fb4a9f _ZN5mongo16MultiPlanScanner9runOpOnceERNS_7QueryOpE + 147
      13 mongod 0x0000000102fb65eb _ZN5mongo16MultiPlanScanner5runOpERNS_7QueryOpE + 61
      14 mongod 0x0000000103056396 ZN5mongo16MultiPlanScanner5runOpINS_7CountOpEEEN5boost10shared_ptrIT_EERS5 + 52
      15 mongod 0x0000000103041705 _ZN5mongo8runCountEPKcRKNS_7BSONObjERSs + 1397
      16 mongod 0x0000000103087b25 _ZN5mongo8CmdCount3runERKSsRNS_7BSONObjEiRSsRNS_14BSONObjBuilderEb + 321
      17 mongod 0x000000010307cf2d _ZN5mongo12_execCommandEPNS_7CommandERKSsRNS_7BSONObjEiRNS_14BSONObjBuilderEb + 141
      18 mongod 0x000000010307e987 _ZN5mongo11execCommandEPNS_7CommandERNS_6ClientEiPKcRNS_7BSONObjERNS_14BSONObjBuilderEb + 3687
      19 mongod 0x000000010307f3d0 _ZN5mongo12_runCommandsEPKcRNS_7BSONObjERNS_11_BufBuilderINS_16TrivialAllocatorEEERNS_14BSONObjBuilderEbi + 1472

            Assignee:
            aaron Aaron Staple
            Reporter:
            aaron Aaron Staple
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: