断言10320 BSONElement:查询配置文件集时的错误类型113,db.system.profile.find()

时间:2013-03-08 14:20:39

标签: mongodb

我在ec2中运行Mongo 2.2.1,我启用了性能分析,并且我每180秒向石墨发送一个慢速操作摘要。脚本一次又一次地报告错误(BSONElement:错误类型113),如果我登录到Mongo shell并运行db.system.profile.find(),我会得到更详细的报告:

Mon Feb 18 09:12:48 Assertion: 10320:BSONElement: bad type 113
0x6073f1 0x5d1aa9 0x4b0d98 0x5c17a6 0x6b3f35 0x6b6a2c 0x69be0a 0x6aa13f 0x668e46 0x668ec2 0x66a2ce 0x5cbcc4 0x4a4a14 0x4a67e6 0x7f1519bb776d 0x49f669 
 mongo(_ZN5mongo15printStackTraceERSo+0x21) [0x6073f1]
 mongo(_ZN5mongo11msgassertedEiPKc+0x99) [0x5d1aa9]
 mongo(_ZNK5mongo11BSONElement4sizeEv+0x1d8) [0x4b0d98]
 mongo(_ZN5mongo16resolveBSONFieldEP9JSContextP8JSObjectljPS3_+0x146) [0x5c17a6]
 mongo(js_LookupPropertyWithFlags+0x3f5) [0x6b3f35]
 mongo(js_GetProperty+0x7c) [0x6b6a2c]
 mongo(js_Interpret+0x10ea) [0x69be0a]
 mongo(js_Execute+0x36f) [0x6aa13f]
 mongo(JS_EvaluateUCScriptForPrincipals+0x66) [0x668e46]
 mongo(JS_EvaluateUCScript+0x22) [0x668ec2]
 mongo(JS_EvaluateScript+0x6e) [0x66a2ce]
 mongo(_ZN5mongo7SMScope4execERKNS_10StringDataERKSsbbbi+0x144) [0x5cbcc4]
 mongo(_Z5_mainiPPc+0x26c4) [0x4a4a14]
 mongo(main+0x26) [0x4a67e6]
 /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xed) [0x7f1519bb776d]
 mongo(__gxx_personality_v0+0x2a1) [0x49f669]
Error: BSONElement: bad type 113

在日志中,我可以看到脚本运行并报告错误:

Mon Feb 18 09:26:21 [conn577444] Assertion: 10320:BSONElement: bad type 113
0xaf8c41 0xabedb9 0x570aab 0x7fc84c 0x7fe2ca 0x8057a7 0x806268 0x651171 0x82c71e 0x82c7d4 0x8318f6 0x8345f3 0x7b0b0d 0x7b20e2 0x56fe42 0xae6ed1 0x7f0eb2526e9a 0x7f0eb183c4bd 
 /opt/mongodb/bin/mongod(_ZN5mongo15printStackTraceERSo+0x21) [0xaf8c41]
 /opt/mongodb/bin/mongod(_ZN5mongo11msgassertedEiPKc+0x99) [0xabedb9]
 /opt/mongodb/bin/mongod(_ZNK5mongo11BSONElement4sizeEv+0x1cb) [0x570aab]
 /opt/mongodb/bin/mongod(_ZNK5mongo7Matcher13matchesDottedEPKcRKNS_11BSONElementERKNS_7BSONObjEiRKNS_14ElementMatcherEbPNS_12MatchDetailsE+0x153c) [0x7fc84c]
 /opt/mongodb/bin/mongod(_ZNK5mongo7Matcher7matchesERKNS_7BSONObjEPNS_12MatchDetailsE+0xfa) [0x7fe2ca]
 /opt/mongodb/bin/mongod(_ZNK5mongo19CoveredIndexMatcher7matchesERKNS_7BSONObjERKNS_7DiskLocEPNS_12MatchDetailsEb+0xc7) [0x8057a7]
 /opt/mongodb/bin/mongod(_ZNK5mongo19CoveredIndexMatcher14matchesCurrentEPNS_6CursorEPNS_12MatchDetailsE+0xa8) [0x806268]
 /opt/mongodb/bin/mongod(_ZN5mongo6Cursor14currentMatchesEPNS_12MatchDetailsE+0x41) [0x651171]
 /opt/mongodb/bin/mongod(_ZN5mongo20QueryResponseBuilder14currentMatchesERNS_12MatchDetailsE+0x1e) [0x82c71e]
 /opt/mongodb/bin/mongod(_ZN5mongo20QueryResponseBuilder8addMatchEv+0x44) [0x82c7d4]
 /opt/mongodb/bin/mongod(_ZN5mongo23queryWithQueryOptimizerEiRKSsRKNS_7BSONObjERNS_5CurOpES4_S4_RKN5boost10shared_ptrINS_11ParsedQueryEEES4_RKNS_17ShardChunkVersionERNS7_10scoped_ptrINS_25PageFaultRetryableSectionEEERNSG_INS_19NoPageFaultsAllowedEEERNS_7MessageE+0x376) [0x8318f6]
 /opt/mongodb/bin/mongod(_ZN5mongo8runQueryERNS_7MessageERNS_12QueryMessageERNS_5CurOpES1_+0x1a93) [0x8345f3]
 /opt/mongodb/bin/mongod() [0x7b0b0d]
 /opt/mongodb/bin/mongod(_ZN5mongo16assembleResponseERNS_7MessageERNS_10DbResponseERKNS_11HostAndPortE+0x3a2) [0x7b20e2]
 /opt/mongodb/bin/mongod(_ZN5mongo16MyMessageHandler7processERNS_7MessageEPNS_21AbstractMessagingPortEPNS_9LastErrorE+0x82) [0x56fe42]
 /opt/mongodb/bin/mongod(_ZN5mongo3pms9threadRunEPNS_13MessagingPortE+0x411) [0xae6ed1]
 /lib/x86_64-linux-gnu/libpthread.so.0(+0x7e9a) [0x7f0eb2526e9a]
 /lib/x86_64-linux-gnu/libc.so.6(clone+0x6d) [0x7f0eb183c4bd]
Mon Feb 18 09:26:21 [conn577444] assertion 10320 BSONElement: bad type 113 ns:mydb.system.profile query:{ ts: { $gte: new Date(1361179280953), $lte: new Date(1361179580953) } }
Mon Feb 18 09:26:21 [conn577444] problem detected during query over mydb.system.profile : { $err: "BSONElement: bad type 113", code: 10320 }

自上次运行以来,脚本将查询配置文件集合的慢速操作(ts:{$ gte:new Date(1361179280953),$ lte:new Date(1361179580953)})

我是MongoDB的新手,感谢任何帮助。

谢谢,

西蒙

1 个答案:

答案 0 :(得分:3)

这通常意味着您可能因不正常的关机而导致数据损坏。如果您没有太多数据,则可以在数据库上运行repair - 或者,如果您在某处有备份,则最好从备份中恢复数据。

(始终建议您使用replication部分运行,以便在遇到损坏时进行数据备份。)