Details
-
Bug
-
Resolution: Done
-
Minor - P4
-
None
-
2.1.0
-
None
-
Ubuntu 11.04, 64-bit
-
ALL
Description
In attempting to test that mongod handles invalid --logpath arguments, I discovered that MongoRunner seems to hang when the child process exits prematurely (i.e., when it detects that the arguments provided are incorrect).
For instance, try running the following from a shell:
brandon@ubuntu:~$ mkdir /tmp/fakedata
|
brandon@ubuntu:~$ mkdir /tmp/fakelog
|
brandon@ubuntu:~$ mongo --nodb
|
MongoDB shell version: 2.1.0-pre-
|
> MongoRunner.runMongod({ port: 12345, dbpath: "/tmp/fakedata", logpath: "/tmp/fakelog" })
|
Resetting db path '/tmp/fakedata'
|
shell: started program mongod --port 12345 --dbpath /tmp/fakedata --logpath /tmp/fakelog
|
m12345| all output going to: /tmp/fakelog
|
m12345| logpath [/tmp/fakelog] should be a file name not a directory
|
m12345| Mon Feb 27 17:47:27 dbexit:
|
m12345| Mon Feb 27 17:47:27 shutdown: going to close listening sockets...
|
m12345| Mon Feb 27 17:47:27 shutdown: going to flush diaglog...
|
m12345| Mon Feb 27 17:47:27 shutdown: going to close sockets...
|
m12345| Mon Feb 27 17:47:27 shutdown: waiting for fs preallocator...
|
m12345| Mon Feb 27 17:47:27 shutdown: lock for final commit...
|
m12345| Mon Feb 27 17:47:27 shutdown: final commit...
|
m12345| Mon Feb 27 17:47:27 shutdown: closing all files...
|
m12345| Mon Feb 27 17:47:27 closeAllFiles() finished
|
m12345| Mon Feb 27 17:47:27 dbexit: really exiting now
|
MongoRunner doesn't seem to return – and the child process appears as <defunct> in ps listings.