Details
Description
DBConfig::_dropShardedCollections and its caller DBConfig::dropDatabase do not use a lock_guard before accessing _collections.
I think this is the cause of a crash triggered by the concurrent fuzzer:
I SHARDING [conn641] distributed lock with ts: 5798f5bc8ca63ab7b5856c00' unlocked.
|
I CONTROL [conn641] *** unhandled exception (access violation) at 0x000007FEFB0CC890, terminating
|
I CONTROL [conn641] *** access violation was a read from 0x000000340031003A
|
I CONTROL [conn641] *** stack trace for unhandled exception:
|
I CONTROL [conn641] VCRUNTIME140.dll memmove+0x60
|
I CONTROL [conn641] MSVCP140.dll std::basic_streambuf<char,std::char_traits<char> >::xsputn+0x5f
|
I CONTROL [conn641] mongos.exe c:\program files (x86)\microsoft visual studio 14.0\vc\include\string(196) std::operator<<<char,std::char_traits<char>,std::allocator<char> >+0x115
|
I CONTROL [conn641] mongos.exe ...\src\mongo\s\config.cpp(666) mongo::DBConfig::_dropShardedCollections+0x46b
|
I CONTROL [conn641] mongos.exe ...\src\mongo\s\config.cpp(571) mongo::DBConfig::dropDatabase+0x59a
|
I CONTROL [conn641] mongos.exe ...\src\mongo\s\commands\cluster_drop_database_cmd.cpp(112) mongo::`anonymous namespace'::DropDatabaseCmd::run+0x220
|
I CONTROL [conn641] mongos.exe ...\src\mongo\s\s_only.cpp(156) mongo::Command::execCommandClientBasic+0x63b
|
I CONTROL [conn641] mongos.exe ...\src\mongo\s\commands\strategy.cpp(110) mongo::`anonymous namespace'::runAgainstRegistered+0x26d
|
I CONTROL [conn641] mongos.exe ...\src\mongo\s\commands\strategy.cpp(266) mongo::Strategy::clientCommandOp+0x859
|
I CONTROL [conn641] mongos.exe ...\src\mongo\s\commands\request.cpp(110) mongo::Request::process+0x3e8
|
I CONTROL [conn641] mongos.exe ...\src\mongo\s\service_entry_point_mongos.cpp(108) mongo::ServiceEntryPointMongos::_sessionLoop+0x1a5
|
I CONTROL [conn641] mongos.exe ...\src\mongo\transport\service_entry_point_utils.cpp(74) mongo::`anonymous namespace'::runFunc+0x193
|
I CONTROL [conn641] mongos.exe c:\program files (x86)\microsoft visual studio 14.0\vc\include\thr\xthread(247) std::_LaunchPad<std::unique_ptr<std::tuple<std::_Binder<std::_Unforced,void * __ptr64 (__cdecl&)(void * __ptr64),mongo::`anonymous namespace'::Context * __ptr64> >,std::default_delete<std::tuple<std::_Binder<std::_Unforced,void * __ptr64 (__cdecl&)(void * __ptr64),mongo::`anonymous namespace'::Context * __ptr64> > > > >::_Run+0x75
|
I CONTROL [conn641] mongos.exe c:\program files (x86)\microsoft visual studio 14.0\vc\include\thr\xthread(210) std::_Pad::_Call_func+0x9
|
I CONTROL [conn641] ucrtbase.DLL crt_at_quick_exit+0x7d
|
I CONTROL [conn641] kernel32.dll BaseThreadInitThunk+0xd
|
I - [conn641]
|
I CONTROL [conn641] writing minidump diagnostic file C:\data\mci\b574bba2245ed393127dcbb0d1720cf7\src\mongos.2016-07-27T17-56-15.mdmp
|
I CONTROL [conn641] *** immediate exit due to unhandled exception
|