[SERVER-5117] MongoRunner seems to hang when new mongod process is unable to start successfully Created: 27/Feb/12  Updated: 17/Sep/14  Resolved: 17/Sep/14

Status: Closed
Project: Core Server
Component/s: JavaScript, Testing Infrastructure
Affects Version/s: 2.1.0
Fix Version/s: None

Type: Bug Priority: Minor - P4
Reporter: Daniel Pasette (Inactive) Assignee: Unassigned
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Ubuntu 11.04, 64-bit


Operating System: ALL
Participants:

 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.



 Comments   
Comment by Ramon Fernandez Marina [ 17/Sep/14 ]

I'm not able to reproduce this issue in 2.4.11 or 2.6.4, so I'm going to close this ticket.

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