[SERVER-6956] Chunk::splitIfShould does not acquire the distributed balance lock when moving chunks Created: 06/Sep/12  Updated: 11/Jul/16  Resolved: 08/Sep/12

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: 2.2.0
Fix Version/s: 2.3.0

Type: Bug Priority: Major - P3
Reporter: Eric Milkie Assignee: Randolph Tan
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: File simultaneous_move_chunk.js    
Operating System: ALL
Participants:

 Description   

... and this can cause the buildbot to fail:

 m30001| Thu Sep  6 12:51:49 [conn6]   Assertion failure ! _active src/mongo/s/d_migrate.cpp 266
 m30001|  /home/yellow/buildslave/Linux_32bit_debug/mongo/mongod(_ZN5mongo10logContextEPKc+0x5b) [0x8801b6d]
 m30001|  /home/yellow/buildslave/Linux_32bit_debug/mongo/mongod(_ZN5mongo12verifyFailedEPKcS1_j+0xff) [0x8983dc9]
 m30001|  /home/yellow/buildslave/Linux_32bit_debug/mongo/mongod(_ZN5mongo17MigrateFromStatus5startERKSsRKNS_7BSONObjES5_S5_+0x6c) [0x868c230]
 m30001|  /home/yellow/buildslave/Linux_32bit_debug/mongo/mongod(_ZN5mongo16MoveChunkCommand3runERKSsRNS_7BSONObjEiRSsRNS_14BSONObjBuilderEb+0x261d) [0x869099f]
 m30001|  /home/yellow/buildslave/Linux_32bit_debug/mongo/mongod(_ZN5mongo12_execCommandEPNS_7CommandERKSsRNS_7BSONObjEiRNS_14BSONObjBuilderEb+0x71) [0x86b46e4]
 m30001|  /home/yellow/buildslave/Linux_32bit_debug/mongo/mongod(_ZN5mongo11execCommandEPNS_7CommandERNS_6ClientEiPKcRNS_7BSONObjERNS_14BSONObjBuilderEb+0x9ae) [0x86b5344]
 m30001|  /home/yellow/buildslave/Linux_32bit_debug/mongo/mongod(_ZN5mongo12_runCommandsEPKcRNS_7BSONObjERNS_11_BufBuilderINS_16TrivialAllocatorEEERNS_14BSONObjBuilderEbi+0x32e) [0x86b5c68]
 m30001|  /home/yellow/buildslave/Linux_32bit_debug/mongo/mongod(_ZN5mongo11runCommandsEPKcRNS_7BSONObjERNS_5CurOpERNS_11_BufBuilderINS_16TrivialAllocatorEEERNS_14BSONObjBuilderEbi+0x49) [0x864f545]
 m30001|  /home/yellow/buildslave/Linux_32bit_debug/mongo/mongod(_ZN5mongo19MigrateStatusHolderC1ERKSsRKNS_7BSONObjES5_S5_+0x3c) [0x868e012]
 m30001|  /home/yellow/buildslave/Linux_32bit_debug/mongo/mongod() [0x895bb78]
 m30001|  /home/yellow/buildslave/Linux_32bit_debug/mongo/mongod(_ZN5mongo16assembleResponseERNS_7MessageERNS_10DbResponseERKNS_11HostAndPortE+0x2e9) [0x895cb29]
 m30001|  /home/yellow/buildslave/Linux_32bit_debug/mongo/mongod(_ZN5mongo16MyMessageHandler7processERNS_7MessageEPNS_21AbstractMessagingPortEPNS_9LastErrorE+0xb2) [0x853652e]
 m30001|  /home/yellow/buildslave/Linux_32bit_debug/mongo/mongod(_ZN5mongo3pms9threadRunEPNS_13MessagingPortE+0x557) [0x89c8157]
 m30001|  /home/yellow/buildslave/Linux_32bit_debug/mongo/mongod(_ZN5mongo8runQueryERNS_7MessageERNS_12QueryMessageERNS_5CurOpES1_+0x3d1) [0x8654049]
 m30001|  /lib/libc.so.6(clone+0x5e) [0xca6d4e]
 m30001|  /lib/libpthread.so.0() [0xd5d919]
 m30001| 
 m30001| ***aborting after verify() failure as this is a debug/test build
 m30001| 
 m30001| 
 m30001| Thu Sep  6 12:51:49 Got signal: 6 (Aborted).

http://buildlogs.mongodb.org/build/5048b7bad2a60f066b000140/test/5048e16ad2a60f7823000b5f/

from http://buildbot.mongodb.org/builders/Linux%2032-bit%20debug



 Comments   
Comment by auto [ 08/Sep/12 ]

Author:

{u'date': u'2012-09-07T10:52:09-07:00', u'email': u'randolph@10gen.com', u'name': u'Randolph Tan'}

Message: SERVER-6956 Chunk::splitIfShould does not acquire the distributed balance lock when moving chunks

Convert verify into an errmsg to make it more friendly with the debug build test suite. Also fixed
MigrateStatusHolder so it will not accidentally cleanup migrateFromStatus logically owned by another
thread.
Branch: master
https://github.com/mongodb/mongo/commit/83a4d6c7581c84ef1cc642f4acf474087f94ecdf

Comment by Randolph Tan [ 07/Sep/12 ]

This is not as bad as it sounds since the moveChunk command actually takes a distributed lock on the namespace.

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