[SERVER-4400] attempt to record query plan for a dropped cursor triggers bad file number assertion Created: 01/Dec/11  Updated: 05/Jan/18  Resolved: 24/Dec/11

Status: Closed
Project: Core Server
Component/s: Querying
Affects Version/s: None
Fix Version/s: 2.0.3, 2.1.0

Type: Bug Priority: Major - P3
Reporter: Aaron Staple Assignee: Aaron Staple
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-32567 Replace queryoptimizer3.js with FSM test Closed
Operating System: ALL
Participants:
Linked BF Score: 0

 Description   

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



 Comments   
Comment by auto [ 24/Dec/11 ]

Author:

{u'login': u'astaple', u'name': u'Aaron', u'email': u'aaron@10gen.com'}

Message: SERVER-4400 don't record query plan if a client cursor yield recovery fails; this patch violates the QueryOp abstraction a bit, but we are replacing that code soon anyway
Branch: v2.0
https://github.com/mongodb/mongo/commit/b8447afd0e907e9d9df7f94a98dbbe159fcf9df6

Comment by auto [ 01/Dec/11 ]

Author:

{u'login': u'astaple', u'name': u'Aaron', u'email': u'aaron@10gen.com'}

Message: SERVER-4400 don't record query plan if a client cursor yield recovery fails; this patch violates the QueryOp abstraction a bit, but we are replacing that code soon anyway
Branch: master
https://github.com/mongodb/mongo/commit/a68d83f02bac5374590fa667926a89fe48090273

Generated at Thu Feb 08 03:05:53 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.