MongoDB执行'mongorestore'时死锁,没有别的

时间:2015-04-30 13:28:13

标签: mongodb

我试图从bson文件恢复大小为182.5GB的mongo转储。我有一个mongod实例,在OSX Yosemite上运行v3.0.2。我很确定这是与mongod交互的唯一操作。

mongod在中止前输出以下信息:

2015-04-30T10:04:30.020+0200 W - [durability] Deadlock found: Locker 2 waits
for resource {4611686018427387906: MMAPV1Journal, 2} held by [6, ] Locker 6
waits for resource {9489459795846101286: Collection, 266087758991325478} held
by [113, ] Locker 113 waits for resource {4611686018427387906: MMAPV1Journal,
2} held by [2, ] 2015-04-30T10:04:31.160+0200 I - [durability] Invariant
failure LOCK_OK == _locker->lock(resourceIdMMAPV1Flush, MODE_X, UINT_MAX, true)
src/mongo/db/concurrency/lock_state.cpp 851 2015-04-30T10:04:34.482+0200 I
CONTROL [durability] 0x107239379 0x1071ecba0 0x1071d9d73 0x106c9f74b
0x107003e1c 0x10726cda1 0x7fff8edd1268 0x7fff8edd11e5 0x7fff8edcf41d 
-----BEGIN BACKTRACE -----
{"backtrace":[{"b":"106AC5000","o":"774379"},{"b":"106AC5000","o":"727BA0"},{"b"
:"106AC5000","o":"714D73"},{"b":"106AC5000","o":"1DA74B"},{"b":"106AC5000","o":"
53EE1C"},{"b":"106AC5000","o":"7A7DA1"},{"b":"7FFF8EDCE000","o":"3268"},{"b":"7F
FF8EDCE000","o":"31E5"},{"b":"7FFF8EDCE000","o":"141D"}],"processInfo":{
"mongodbVersion" : "3.0.2", "gitVersion" :
"6201872043ecbbc0a4cc169b5482dcf385fc464f", "uname" : { "sysname" : "Darwin",
"release" : "14.3.0", "version" : "Darwin Kernel Version 14.3.0: Mon Mar 23
11:59:05 PDT 2015; root:xnu-2782.20.48~5/RELEASE_X86_64", "machine" : "x86_64"
}, "somap" : [ { "path" : "/usr/bin/mongodb-osx-x86_64-3.0.2/bin/mongod",
"machType" : 2, "b" : "106AC5000", "buildId" :
"8E598755AF9132CC9EFCB21310EE588B" }, { "path" : "/usr/lib/libSystem.B.dylib",
"machType" : 6, "b" : "7FFF981C2000", "buildId" :
"CCEC13A5D0D931C5B0B01C564B4A20A6" }, { "path" : "/usr/lib/libc++.1.dylib",
"machType" : 6, "b" : "7FFF9A08A000", "buildId" :
"1B9530FD989B3174BB1CBDC159501710" }, { "path" :
"/usr/lib/system/libcache.dylib", "machType" : 6, "b" : "7FFF91E2F000",
"buildId" : "45E9A2E799C436B2BEE30C4E11614AD1" }, { "path" :
"/usr/lib/system/libcommonCrypto.dylib", "machType" : 6, "b" : "7FFF91E03000",
"buildId" : "D381EBC669D831D380845A80A32CB748" }, { "path" :
"/usr/lib/system/libcompiler_rt.dylib", "machType" : 6, "b" : "7FFF99C7C000",
"buildId" : "BF8FC133EE103DA69B9092039E28678F" }, { "path" :
"/usr/lib/system/libcopyfile.dylib", "machType" : 6, "b" : "7FFF96F9B000",
"buildId" : "0C68D3A6ACDD3EF3991ACC82C32AB836" }, { "path" :
"/usr/lib/system/libcorecrypto.dylib", "machType" : 6, "b" : "7FFF99EC7000",
"buildId" : "E178980139853949B7366B3378873301" }, { "path" :
"/usr/lib/system/libdispatch.dylib", "machType" : 6, "b" : "7FFF94F9C000",
"buildId" : "502CF32B669B3709886208188225E4F0" }, { "path" :
"/usr/lib/system/libdyld.dylib", "machType" : 6, "b" : "7FFF961F0000",
"buildId" : "9EACCA38291D38CC811F7E9D1451E2D3" }, { "path" :
"/usr/lib/system/libkeymgr.dylib", "machType" : 6, "b" : "7FFF9885A000",
"buildId" : "77845842DE703CC5BD01C3D14227CED5" }, { "path" :
"/usr/lib/system/liblaunch.dylib", "machType" : 6, "b" : "7FFF8C8DD000",
"buildId" : "FA89A113696E32718FE1A0D7324E8481" }, { "path" :
"/usr/lib/system/libmacho.dylib", "machType" : 6, "b" : "7FFF976ED000",
"buildId" : "126CA2EDDE91308F8881B9DAEC3C63B6" }, { "path" :
"/usr/lib/system/libquarantine.dylib", "machType" : 6, "b" : "7FFF8E301000",
"buildId" : "7AF900412768378A925AD83161863642" }, { "path" :
"/usr/lib/system/libremovefile.dylib", "machType" : 6, "b" : "7FFF9A36C000",
"buildId" : "3485B5F46CE83C628DFD8736ED6E8531" }, { "path" :
"/usr/lib/system/libsystem_asl.dylib", "machType" : 6, "b" : "7FFF9C415000",
"buildId" : "F153AC5B0542356E88C820A62CA704E2" }, { "path" :
"/usr/lib/system/libsystem_blocks.dylib", "machType" : 6, "b" : "7FFF8E304000",
"buildId" : "9615D10AFCA73BE4AA1A1B195DACE1A1" }, { "path" :
"/usr/lib/system/libsystem_c.dylib", "machType" : 6, "b" : "7FFF9C259000",
"buildId" : "86FBED7AF2C83591AD6F486DD57E6B6A" }, { "path" :
"/usr/lib/system/libsystem_configuration.dylib", "machType" : 6, "b" :
"7FFF8ECF6000", "buildId" : "20F3B077179D3CB0A3C1C8602D53B4DB" }, { "path" :
"/usr/lib/system/libsystem_coreservices.dylib", "machType" : 6, "b" :
"7FFF9632B000", "buildId" : "41B7C5785A5331C8A96FC73E030B0938" }, { "path" :
"/usr/lib/system/libsystem_coretls.dylib", "machType" : 6, "b" :
"7FFF95E71000", "buildId" : "6084A531252339F8B030811FA1A32FB5" }, { "path" :
"/usr/lib/system/libsystem_dnssd.dylib", "machType" : 6, "b" : "7FFF9A457000",
"buildId" : "62B70ECAE40D3C63896E7F00EC386DDB" }, { "path" :
"/usr/lib/system/libsystem_info.dylib", "machType" : 6, "b" : "7FFF93D48000",
"buildId" : "AEB3FE62476330508352D6F9AF961AE6" }, { "path" :
"/usr/lib/system/libsystem_kernel.dylib", "machType" : 6, "b" : "7FFF98A48000",
"buildId" : "EAFD7BD00C303E7D9528F9916BA0167C" }, { "path" :
"/usr/lib/system/libsystem_m.dylib", "machType" : 6, "b" : "7FFF90035000",
"buildId" : "1E12AB456D9636D0A226F24D9FB0D9D6" }, { "path" :
"/usr/lib/system/libsystem_malloc.dylib", "machType" : 6, "b" : "7FFF8D282000",
"buildId" : "19BCC25757173502A71F95D65AFA861B" }, { "path" :
"/usr/lib/system/libsystem_network.dylib", "machType" : 6, "b" :
"7FFF93B5A000", "buildId" : "589A5F67BE2A3245A1810ECC9B53EB00" }, { "path" :
"/usr/lib/system/libsystem_networkextension.dylib", "machType" : 6, "b" :
"7FFF90076000", "buildId" : "29AB225BD7FB30ED960065D44B9A9442" }, { "path" :
"/usr/lib/system/libsystem_notify.dylib", "machType" : 6, "b" : "7FFF96E49000",
"buildId" : "61147800F3203DAA850CBADF33855F29" }, { "path" :
"/usr/lib/system/libsystem_platform.dylib", "machType" : 6, "b" :
"7FFF91E0F000", "buildId" : "64E34079D7123D669CE2418624A5C040" }, { "path" :
"/usr/lib/system/libsystem_pthread.dylib", "machType" : 6, "b" :
"7FFF8EDCE000", "buildId" : "3103AA7F3BAE3673964947FFD7E15C97" }, { "path" :
"/usr/lib/system/libsystem_sandbox.dylib", "machType" : 6, "b" :
"7FFF929BB000", "buildId" : "4CF771286BE03958B646707FA9CE61B2" }, { "path" :
"/usr/lib/system/libsystem_secinit.dylib", "machType" : 6, "b" :
"7FFF9C413000", "buildId" : "581DAD0F6B633A48B63B917AF799ABAA" }, { "path" :
"/usr/lib/system/libsystem_stats.dylib", "machType" : 6, "b" : "7FFF9C4DD000",
"buildId" : "FBC3F80FA0FB3BD69A7E800DE45F092E" }, { "path" :
"/usr/lib/system/libsystem_trace.dylib", "machType" : 6, "b" : "7FFF9A36E000",
"buildId" : "840F5301B55A307890B9FEFFD6CD741A" }, { "path" :
"/usr/lib/system/libunc.dylib", "machType" : 6, "b" : "7FFF9224A000", "buildId"
: "5676F7EAC1DF329FB006D2C3022B7D70" }, { "path" :
"/usr/lib/system/libunwind.dylib", "machType" : 6, "b" : "7FFF9BD8D000",
"buildId" : "BE7E51A0B6EA3A549CCA9D88F683A6D6" }, { "path" :
"/usr/lib/system/libxpc.dylib", "machType" : 6, "b" : "7FFF9C4E3000", "buildId"
: "D35D0DB2D7BD3BE48378062BFE545E1D" }, { "path" : "/usr/lib/libobjc.A.dylib",
"machType" : 6, "b" : "7FFF9634E000", "buildId" :
"759E155DBC423D4E869B6F57D477177C" }, { "path" : "/usr/lib/libauto.dylib",
"machType" : 6, "b" : "7FFF8DB73000", "buildId" :
"A260789BD4D8316A9490254767B8A5F1" }, { "path" : "/usr/lib/libc++abi.dylib",
"machType" : 6, "b" : "7FFF9B8D8000", "buildId" :
"88A22A0F87C63002BFBAAC0F2808B8B9" }, { "path" :
"/usr/lib/libDiagnosticMessagesClient.dylib", "machType" : 6, "b" :
"7FFF981ED000", "buildId" : "2EE8E4365CDC34C599595BA218D507FB" } ] }}
mongod(_ZN5mongo15printStackTraceERNSt3__113basic_ostreamIcNS0_11char_traitsIcEE
EE+0x39) [0x107239379] mongod(_ZN5mongo10logContextEPKc+0x100) [0x1071ecba0]
mongod(_ZN5mongo15invariantFailedEPKcS1_j+0x183) [0x1071d9d73]
mongod(_ZN5mongo35AutoAcquireFlushLockForMMAPV1Commit27upgradeFlushLockToExclusi
veEv+0x7B) [0x106c9f74b] mongod(_ZN5mongo3durL9durThreadEv+0x7CC) [0x107003e1c]
mongod(_ZN5boost12_GLOBAL__N_112thread_proxyEPv+0xB1) [0x10726cda1]
libsystem_pthread.dylib(_pthread_body+0x83) [0x7fff8edd1268]
libsystem_pthread.dylib(_pthread_body+0x0) [0x7fff8edd11e5]
libsystem_pthread.dylib(thread_start+0xD) [0x7fff8edcf41d] 
----- END BACKTRACE----- 
2015-04-30T10:04:34.565+0200 I - [durability]

***aborting after invariant() failure

即使没有并发操作正在运行,我也很奇怪存在死锁。在这种情况下会出现什么问题?

1 个答案:

答案 0 :(得分:0)

显然这是核心mongo服务器中的死锁检测算法中的一个错误。它现在已在3.0.3及更高版本中修复。