[SERVER-7040] small oplog suite and manual execution of js tests that call startParallelShell do not work (small oplog / count8 buildbot failures) Created: 14/Sep/12  Updated: 11/Jul/16  Resolved: 14/Sep/12

Status: Closed
Project: Core Server
Component/s: Testing Infrastructure
Affects Version/s: None
Fix Version/s: 2.3.0

Type: Bug Priority: Critical - P2
Reporter: Aaron Staple Assignee: Spencer Brody (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Operating System: ALL
Participants:

 Description   

A recent change to servers_misc.js seems to have caused manual execution of jstests calling startParallelShell to stop working properly. Here is a run of currentop.js tree 4ba934d3459b4ef7384ff55b5f2f0d20380930a1:

Aaron-Staples-MacBook-Pro:mongo8 aaron$ ./mongo jstests/currentop.js && echo success
MongoDB shell version: 2.3.0-pre-
connecting to: test
BEGIN currentop.js
count:100
start shell
Thu Sep 13 20:25:57 shell: started program /Users/aaron/src/mongo8/mongo --eval db.jstests_currentop.count( { '$where': function() { sleep(1000); } } ) 127.0.0.1/admin
sleep
sh15244| MongoDB shell version: 2.3.0-pre-
sh15244| connecting to: 127.0.0.1/admin
sh15244| 0
inprog:
[ ]
 
inprog:
[ ]
 
wait have some ops
[ ]
[ ]
[ ]
[ ]
[ ]
[ ]
[ ]
[ ]
[ ]
[ ]
[ ]
[ ]
[ ]
[ ]
[ ]
[ ]
[ ]
[ ]
[ ]
[ ]
[ ]
[ ]
[ ]
[ ]
[ ]
[ ]
[ ]
[ ]
[ ]
 
...
 
assert.soon failed: function () {
    return ops({'locks.^test':"r", ns:"test.jstests_currentop"}).length + ops({'locks.^test':"R", ns:"test.jstests_currentop"}).length >= 1;
}, msg:have_some_ops
Error("Printing Stack Trace")@:0
()@src/mongo/shell/utils.js:37
("assert.soon failed: function () {\n    return ops({'locks.^test':\"r\", ns:\"test.jstests_currentop\"}).length + ops({'locks.^test':\"R\", ns:\"test.jstests_currentop\"}).length >= 1;\n}, msg:have_some_ops")@src/mongo/shell/utils.js:58
((function () {return ops({'locks.^test':"r", ns:"test.jstests_currentop"}).length + ops({'locks.^test':"R", ns:"test.jstests_currentop"}).length >= 1;}),"have_some_ops")@src/mongo/shell/utils.js:167
@jstests/currentop.js:41
 
Thu Sep 13 20:26:28 uncaught exception: assert.soon failed: function () {
    return ops({'locks.^test':"r", ns:"test.jstests_currentop"}).length + ops({'locks.^test':"R", ns:"test.jstests_currentop"}).length >= 1;
}, msg:have_some_ops
failed to load: jstests/currentop.js

This patch seems to make it work again (though it may have some other adverse consequences):

diff --git a/src/mongo/shell/servers_misc.js b/src/mongo/shell/servers_misc.js
index 99a94b9..0d094b4 100644
--- a/src/mongo/shell/servers_misc.js
+++ b/src/mongo/shell/servers_misc.js
@@ -269,7 +269,7 @@ function startParallelShell( jsCode, port ){
 
     if (typeof db == "object") {
         // Must start connected to admin DB so auth works when running tests with auth.
-        args.push(db.getMongo().host + "/admin");
+        args.push(db.getMongo().host);
     }
 
     x = startMongoProgramNoConnect.apply(null, args);



 Comments   
Comment by auto [ 14/Sep/12 ]

Author:

{u'date': u'2012-09-14T12:52:13-07:00', u'email': u'spencer@10gen.com', u'name': u'Spencer T Brody'}

Message: SERVER-7040 Fix startParallelShell to work when not being run in smoke.py
Branch: master
https://github.com/mongodb/mongo/commit/eb4fe5bec728325dc05d41c8d26e2cce08c74fdd

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