[SERVER-16807] Update on invalid loc fails in concurrent circumstances Created: 12/Jan/15  Updated: 23/Jan/15  Resolved: 15/Jan/15

Status: Closed
Project: Core Server
Component/s: Querying
Affects Version/s: 2.8.0-rc4
Fix Version/s: 3.0.0-rc6

Type: Bug Priority: Major - P3
Reporter: Jonathan Balsano Assignee: David Storch
Resolution: Done Votes: 0
Labels: 28qa
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: HTML File Build Logs - 2015-01-09 23 12 MCI_windows-64-2k8 - #546647.html     File fsm_test.js    
Backwards Compatibility: Fully Compatible
Operating System: ALL
Steps To Reproduce:
  1. Start mongod with storage engine as MMapV1
  2. Turn on recordNeedsFetchFail failpoint
  3. Save attached 'fsm_test.js' to jstests/concurrency
  4. Run `./mongo jstests/concurrency/fsm_tests.js' against the mongod
Participants:

 Description   

If you're trying to update the same document from multiple threads and looking it up by indexed _id, a yield to load the document from disk will result in an invalid document location in the UpdateStage. First turned up on MCI windows build in fsm_all.js, log is attached.

2015-01-12T15:46:53.716-0500 I QUERY    Error: 48 threads threw
 
        Error: [1] != [0] are not equal : {
        	"nMatched" : 0,
        	"nUpserted" : 0,
        	"nModified" : 0,
        	"writeError" : {
        		"code" : 96,
        		"errmsg" : "Exec error: InternalError update stage failed to read member w/ loc from child"
        	}
        }
            at quietlyDoAssert (jstests/concurrency/fsm_libs/assert.js:53:15)
            at Function.assert.eq (src/mongo/shell/assert.js:38:5)
            at wrapAssertFn (jstests/concurrency/fsm_libs/assert.js:60:16)
            at Function.assertWithLevel.(anonymous function) [as eq] (jstests/concurrency/fsm_libs/assert.js:99:13)
            at Object.data.assertResult (jstests/concurrency/fsm_workloads/update_multifield.js:84:35)
            at Object.update (jstests/concurrency/fsm_workloads/update_multifield.js:53:18)
            at Object.runFSM [as run] (jstests/concurrency/fsm_libs/fsm.js:19:16)
            at <anonymous>:8:13
            at Object.main (jstests/concurrency/fsm_libs/worker_thread.js:68:17)
            at ____MongoToV8_newFunction_temp (<anonymous>:5:25)
 
    at throwError (jstests/concurrency/fsm_libs/runner.js:261:23)
    at jstests/concurrency/fsm_libs/runner.js:390:17
    at Array.forEach (native)
    at runWorkloads (jstests/concurrency/fsm_libs/runner.js:345:22)
    at serial (jstests/concurrency/fsm_libs/runner.js:406:13)
    at jstests/concurrency/fsm_test.js:27:1 at jstests/concurrency/fsm_libs/runner.js:273



 Comments   
Comment by Githook User [ 15/Jan/15 ]

Author:

{u'username': u'jrbalsano', u'name': u'Jonathan Balsano', u'email': u'jonathan.balsano@10gen.com'}

Message: SERVER-16807 Update on invalid loc fails in concurrent circumstances

Necessary changes to concurrency testing framework to support the fix
for SERVER-16807

Closes #909

Signed-off-by: Benety Goh <benety@mongodb.com>
Branch: master
https://github.com/mongodb/mongo/commit/2e547413832ebd20bf25f1af4827d315867ee71c

Comment by Githook User [ 15/Jan/15 ]

Author:

{u'username': u'jrbalsano', u'name': u'Jonathan Balsano', u'email': u'jonathan.balsano@10gen.com'}

Message: SERVER-16807 Update on invalid loc fails in concurrent circumstances

Necessary changes to concurrency testing framework to support the fix
for SERVER-16807

Closes #909

Signed-off-by: Benety Goh <benety@mongodb.com>
Branch: master
https://github.com/mongodb/mongo/commit/2e547413832ebd20bf25f1af4827d315867ee71c

Comment by Githook User [ 15/Jan/15 ]

Author:

{u'username': u'dstorch', u'name': u'David Storch', u'email': u'david.storch@10gen.com'}

Message: SERVER-16807 update and delete stages should skip over invalidated documents (MMAP v1)
Branch: master
https://github.com/mongodb/mongo/commit/ea2209e6399ef285efc31700ac67388885d614b0

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