This bug has been present since at least 2.6.10. It's not reproducible with 2.4.12.
Repro script:
var t = db.geo_verify_failure; t.drop(); // Create the namespace with an insert t.insert({a: 1}); // There's an assertion failure with $minDistance too t.find({a: {$maxDistance: {}}}).itcount();
Server output:
Assertion failure BSONObj::opNEAR == type src/mongo/db/matcher/expression_parser_geo.cpp 66
Backtrace:
#0 0x00007ffff6fa020b in raise (sig=5) at ../nptl/sysdeps/unix/sysv/linux/pt-raise.c:37 #1 0x000000000239a84e in mongo::breakpoint () at src/mongo/util/debugger.cpp:58 #2 0x000000000238aae5 in mongo::verifyFailed (expr=0x2e23317 "BSONObj::opNEAR == type", file=0x2e232e8 "src/mongo/db/matcher/expression_parser_geo.cpp", line=66) at src/mongo/util/assert_util.cpp:140 #3 0x0000000001dbc396 in mongo::expressionParserGeoCallbackReal (name=0x7fffb4005f89 "a", type=21, section=...) at src/mongo/db/matcher/expression_parser_geo.cpp:66 #4 0x0000000001dbb441 in std::_Function_handler<mongo::StatusWith<std::unique_ptr<mongo::MatchExpression, std::default_delete<mongo::MatchExpression> > > (char const*, int, mongo::BSONObj const&), mongo::StatusWith<std::unique_ptr<mongo::MatchExpression, std::default_delete<mongo::MatchExpression> > > (*)(char const*, int, mongo::BSONObj const&)>::_M_invoke(std::_Any_data const&, char const*, int, mongo::BSONObj const&) (__functor=..., __args#0=0x7fffb4005f89 "a", __args#1=21, __args#2=...) at /usr/include/c++/4.8/functional:2057 #5 0x0000000001db6593 in std::function<mongo::StatusWith<std::unique_ptr<mongo::MatchExpression, std::default_delete<mongo::MatchExpression> > > (char const*, int, mongo::BSONObj const&)>::operator()(char const*, int, mongo::BSONObj const&) const (this=0x3970da0 <mongo::expressionParserGeoCallback>, __args#0=0x7fffb4005f89 "a", __args#1=21, __args#2=...) at /usr/include/c++/4.8/functional:2471 #6 0x0000000001dafa5c in mongo::MatchExpressionParser::_parseSub (this=0x7ffff43f66e0, name=0x7fffb4005f89 "a", sub=..., root=0x7fffb4004400, level=2) at src/mongo/db/matcher/expression_parser.cpp:427 #7 0x0000000001daf042 in mongo::MatchExpressionParser::_parse (this=0x7ffff43f66e0, obj=..., level=1) at src/mongo/db/matcher/expression_parser.cpp:363 #8 0x0000000001b2d0fa in mongo::MatchExpressionParser::parse (obj=..., whereCallback=...) at src/mongo/db/matcher/expression_parser.h:70 #9 0x0000000001e9e711 in mongo::CanonicalQuery::canonicalize (lpq=0x7fffb40042f0, whereCallback=...) at src/mongo/db/query/canonical_query.cpp:218 #10 0x0000000001e9e63d in mongo::CanonicalQuery::canonicalize (qm=..., whereCallback=...) at src/mongo/db/query/canonical_query.cpp:208 #11 0x0000000001eae2f3 in mongo::runQuery (txn=0x7ffff43f7690, q=..., nss=..., result=...) at src/mongo/db/query/find.cpp:494 #12 0x0000000001d8b449 in mongo::receivedQuery (txn=0x7ffff43f7690, nss=..., c=..., dbResponse=..., m=...) at src/mongo/db/instance.cpp:377 #13 0x0000000001d8bd84 in mongo::assembleResponse (txn=0x7ffff43f7690, m=..., dbresponse=..., remote=...) at src/mongo/db/instance.cpp:505 #14 0x0000000001a2bc0d in mongo::MyMessageHandler::process (this=0x3a3ee20, m=..., port=0x39f6af0) at src/mongo/db/db.cpp:165 #15 0x00000000023ad2e3 in mongo::PortMessageServer::handleIncomingMsg (arg=0x39f6af0) at src/mongo/util/net/message_server_port.cpp:229 #16 0x00007ffff6f98182 in start_thread (arg=0x7ffff43f8700) at pthread_create.c:312 #17 0x00007ffff6cc547d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
Version: 928a5cf91c162ec0c56f32658454a7193de70509
- is depended on by
-
SERVER-19783 Query parser does not correctly handle geonear predicates with other predicates in the same field
- Closed