[SERVER-12716] removec.js failing in sharding passthrough Created: 13/Feb/14  Updated: 11/Jul/16  Resolved: 15/Feb/14

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 2.6.0-rc0

Type: Bug Priority: Major - P3
Reporter: Andy Schwerin Assignee: Greg Studer
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to SERVER-12728 Remove invalid gle call in removec.js... Closed
Operating System: ALL
Participants:
Linked BF Score: 0

 Description   

Earliest confirmed failure is https://github.com/mongodb/mongo/commit/228c5a2e27cdaf35e1ac7e0a097d8172f7f4a387

But there's a long stretch of red before it, so it may have begun earlier.

Sample output at http://buildlogs.mongodb.org/mci_0.9_linux_64/builds/69321/test/slow_nightly_tests_0/sharding_passthrough.js

Relevant output:

	
 *******************************************
         Test : jstests/removec.js ...
 m30999| 2014-02-13T01:00:18.930-0500 [conn1] DROP: test.jstests_removec
 m30999| 2014-02-13T01:00:18.930-0500 [conn1] 	drop going to do passthrough
 m30001| 2014-02-13T01:00:18.930-0500 [conn153] CMD: drop test.jstests_removec
 m30001| 2014-02-13T01:00:18.932-0500 [conn153] build index on: test.jstests_removec properties: { v: 1, key: { _id: 1 }, name: "_id_", ns: "test.jstests_removec" }
 m30001| 2014-02-13T01:00:18.932-0500 [conn153] 	 added index to empty collection
 m30001| 2014-02-13T01:00:18.933-0500 [conn153] build index on: test.jstests_removec properties: { v: 1, key: { a: 1.0 }, name: "a_1", ns: "test.jstests_removec" }
 m30001| 2014-02-13T01:00:18.933-0500 [conn153] 	 added index to empty collection
2014-02-13T01:00:18.961-0500 shell: started program /data/mci/git@github.commongodb/mongo.git/master/mongo --useLegacyWriteOps --eval TestData = {
	"testPath" : "/data/mci/git@github.commongodb/mongo.git/master/jstests/slowNightly/sharding_passthrough.js",
	"testFile" : "sharding_passthrough.js",
	"testName" : "sharding_passthrough",
	"setParameters" : "",
	"setParametersMongos" : "",
	"noJournal" : false,
	"noJournalPrealloc" : false,
	"auth" : false,
	"keyFile" : null,
	"keyFileData" : null,
	"authMechanism" : "MONGODB-CR",
	"useSSL" : false,
	"useX509" : false,
	"useWriteCommands" : false
};db = db.getSiblingDB('test');t = db.jstests_removec;for( j = 0; j < 1000; ++j ) {    o = t.findOne( { a:Random.randInt( 1100 ) } );    t.remove( { _id:o._id } );    t.insert( o );} --host localhost --port 30999
sh26550| MongoDB shell version: 2.5.6-pre-
 m30999| 2014-02-13T01:00:19.026-0500 [mongosMain] connection accepted from 127.0.0.1:51639 #6 (2 connections now open)
sh26550| connecting to: localhost:30999/test
 m30001| 2014-02-13T01:00:19.034-0500 [initandlisten] connection accepted from 127.0.0.1:50238 #154 (6 connections now open)
 m30999| 2014-02-13T01:00:19.593-0500 [conn1] warning: chunk manager not found for test.jstests_removec :: caused by :: 10181 not sharded:test.jstests_removec
assert failed
Error: Printing Stack Trace
    at printStackTrace (src/mongo/shell/utils.js:49:15)
    at doassert (src/mongo/shell/assert.js:6:5)
    at assert (src/mongo/shell/assert.js:14:5)
    at jstests/removec.js:35:5
    at /data/mci/git@github.commongodb/mongo.git/master/jstests/slowNightly/sharding_passthrough.js:148:13
    at Function.Date.timeFunc (src/mongo/shell/types.js:27:17)
    at /data/mci/git@github.commongodb/mongo.git/master/jstests/slowNightly/sharding_passthrough.js:147:14
    at Array.forEach (native)
    at /data/mci/git@github.commongodb/mongo.git/master/jstests/slowNightly/sharding_passthrough.js:9:7
2014-02-13T01:00:19.595-0500 assert failed at src/mongo/shell/assert.js:7
2014-02-13T01:00:19.596-0500 Error: error loading js file: jstests/removec.js at /data/mci/git@github.commongodb/mongo.git/master/jstests/slowNightly/sharding_passthrough.js:148



 Comments   
Comment by Githook User [ 14/Feb/14 ]

Author:

{u'username': u'gregstuder', u'name': u'gregs', u'email': u'greg@10gen.com'}

Message: SERVER-12716 disable lastError for getChunkManager() exception caught-by-design
Branch: master
https://github.com/mongodb/mongo/commit/4c6907848726d815d6444bd8ac4bf770daaa0df0

Comment by Greg Studer [ 14/Feb/14 ]

Confirmed.

Comment by Greg Studer [ 13/Feb/14 ]

Issue to be confirmed by patch above is twofold:

1) It is never sane or valid to check the result of find() via getLastError - though it does appear that internally v8_db.cpp::internalCursorNext() uses DBClientCursor::next() instead of nextSafe(). This would prevent some/all errors from being correctly thrown in the shell and may be why this test is written this way.

2) Every DBException thrown sets the last error value - versioning sometimes handles exceptions which should not be reported but are. Not a regression, but unpredictable and subject to timing issues.

Once confirmed, fix should be to the shell and the test.

Comment by Githook User [ 13/Feb/14 ]

Author:

{u'username': u'andy10gen', u'name': u'Andy Schwerin', u'email': u'schwerin@10gen.com'}

Message: SERVER-12716 Get more details out of the failing assertion in removec.js.
Branch: master
https://github.com/mongodb/mongo/commit/61b71b0c7b0c4f2a7dbe72d7cf773a5ce1fbf44a

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