[SERVER-14332] Incorrect parameter to db.serverStatus crashes mongo shell Created: 21/Jun/14  Updated: 10/Dec/14  Resolved: 23/Jun/14

Status: Closed
Project: Core Server
Component/s: Internal Code
Affects Version/s: 2.6.1
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Ashley D'Souza Assignee: Ramon Fernandez Marina
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
duplicates SERVER-12337 mongoshell client crashes in windows ... Closed
Operating System: Windows
Participants:

 Description   

While trying out the various ways to see locks, I specified a wrong parameter to db.ServerStatus causing mongo to terminate.

Command: db.ServerStatus("locks") brings up a small window titled "mongo.exe", with the message:

mongo.exe has stopped working
A problem caused the program to stop working correctly.
Windows will close the program and notify you if a solution is available.

Debug / Close program buttons

I am running Mongo 2.6.4 on Windows 7

Problem is reproducible.



 Comments   
Comment by Ramon Fernandez Marina [ 23/Jun/14 ]

Duplicate of SERVER-12337

Comment by Ashley D'Souza [ 22/Jun/14 ]

"mongo --version" shows 2.6.1, as does db.serverStatus()

(Not sure how I got 2.6.4. Apologies for that!)

Here's the output of db.serverBuildInfo() in case you need it:

> db.serverBuildInfo()
{
"version" : "2.6.1",
"gitVersion" : "4b95b086d2374bdcfcdf2249272fb552c9c726e8",
"targetMinOS" : "Windows 7/Windows Server 2008 R2",
"OpenSSLVersion" : "",
"sysInfo" : "windows sys.getwindowsversion(major=6, minor=1, build=7601, platform=2, service_pack='Service Pack 1') BOOST_
LIB_VERSION=1_49",
"loaderFlags" : "/nologo /DEBUG /INCREMENTAL:NO /LARGEADDRESSAWARE",
"compilerFlags" : "/TP /nologo /EHsc /W3 /wd4355 /wd4800 /wd4267 /wd4244 /wd4290 /we4099 /Z7 /errorReport:none /MT /O2 /Oy
-",
"allocator" : "system",
"versionArray" : [
2,
6,
1,
0
],
"javascriptEngine" : "V8",
"bits" : 64,
"debug" : false,
"maxBsonObjectSize" : 16777216,
"ok" : 1
}

Comment by Ramon Fernandez Marina [ 21/Jun/14 ]

Note also that the way to get the information you need is to run

db.serverStatus({"locks" : 1})

Comment by Ramon Fernandez Marina [ 21/Jun/14 ]

Can you please check your version again? 2.6.4 has not been released yet. You can find the version you're using by running the following in the shell:

db.serverBuildInfo()

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