[SERVER-384] Crash mongod --auth when execute db.currentOp() without database set Created: 24/Oct/09  Updated: 12/Jul/16  Resolved: 25/Oct/09

Status: Closed
Project: Core Server
Component/s: Stability
Affects Version/s: 1.0.0
Fix Version/s: 1.1.3

Type: Bug Priority: Major - P3
Reporter: Eder Sosa Assignee: Eliot Horowitz (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

mongod start with --auth parameter set and connect with mongo shell without database set and execute function db.currentOp() crash service mongod


Participants:

 Description   

Service mongod:
#./bin/mongod --dbpath=data/ --auth
Sat Oct 24 21:19:41 Mongo DB : starting : pid = 8699 port = 27017 dbpath = data/ master = 0 slave = 0 64-bit
Sat Oct 24 21:19:41 db version v1.0.0, pdfile version 4.4
Sat Oct 24 21:19:41 git version: dabf2ce54614c6de9d728af445eec47f39dde19f
Sat Oct 24 21:19:41 sys info: Linux ofc-n1.10gen.com 2.6.23.17-88.fc7 #1 SMP Thu May 15 00:02:29 EDT 2008 x86_64
Sat Oct 24 21:19:41 waiting for connections on port 27017
Sat Oct 24 21:19:41 web admin interface listening on port 28017
Sat Oct 24 21:19:54 connection accepted from 127.0.0.1:10948 #1
mongod: db/db.h:134: bool mongo::setClient(const char*, const std::string&): Assertion `dbMutexInfo.isLocked()' failed.
Sat Oct 24 21:19:57 Got signal: 6 (Aborted).
Sat Oct 24 21:19:57 Last op: { opid: 1, active: 0, op: "query", ns: "local.system.namespaces", query: "

{ name: /^local.temp./ }

", inLock: 0, client: "0.0.0.0:0" }
Sat Oct 24 21:19:57 Backtrace:
0x546876 0x7fb055677040 0x7fb055676fb5 0x7fb055678bc3 0x7fb05566ff09 0x493721 0x4b8d4f 0x50a2af 0x50b58f 0x54528a 0x556db7 0x5569bf 0x7fb0561673ba 0x7fb055729fcd
./bin/mongod(_ZN5mongo10abruptQuitEi+0x576) [0x546876]
/lib/libc.so.6 [0x7fb055677040]
/lib/libc.so.6(gsignal+0x35) [0x7fb055676fb5]
/lib/libc.so.6(abort+0x183) [0x7fb055678bc3]
/lib/libc.so.6(__assert_fail+0xe9) [0x7fb05566ff09]
./bin/mongod [0x493721]
./bin/mongod [0x4b8d4f]
./bin/mongod [0x50a2af]
./bin/mongod [0x50b58f]
./bin/mongod(_ZN5mongo10connThreadEv+0x1fa) [0x54528a]
./bin/mongod [0x556db7]
./bin/mongod [0x5569bf]
/lib/libpthread.so.0 [0x7fb0561673ba]
/lib/libc.so.6(clone+0x6d) [0x7fb055729fcd]
Sat Oct 24 21:19:57 dbexit:
Sat Oct 24 21:19:57 closeAllFiles() finished
Sat Oct 24 21:19:57 dbexit: really exiting now

Client mongo shell:
#./bin/mongo
MongoDB shell version: 1.0.0
url: test
connecting to: test
type "help" for help
> db.currentOp()
Sat Oct 24 21:19:57 JS Error: Error: error doing query: failed (anon):681
Sat Oct 24 21:19:57 trying reconnect to 127.0.0.1
Sat Oct 24 21:19:57 reconnect 127.0.0.1 failed couldn't connect to server 127.0.0.1 127.0.0.1:27017
Sat Oct 24 21:19:57 MessagingPort say send() error 9 127.0.0.1:35177
Sat Oct 24 21:19:57 JS Error: Error: error doing query: unknown (anon):681



 Comments   
Comment by auto [ 07/Dec/09 ]

Author:

{'name': 'Eliot Horowitz', 'email': 'eliot@10gen.com'}

Message: security cleanup / segault fix in currentOp SERVER-384
http://github.com/mongodb/mongo/commit/ebf50d623ed3583181b68a8f825d9647ee0b4148

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