-
Type: Bug
-
Resolution: Gone away
-
Priority: Major - P3
-
None
-
Affects Version/s: 3.5.4
-
Component/s: Build
-
None
-
ALL
Using GDB 7.12, on Solaris, I was unable to find the frame's args and local variables for the following function:
mongo::LockerImpl<false>::lockComplete(mongo::ResourceId, mongo::LockMode, unsigned int, bool) ()
The backtrace for this thread is:
#0 0x00007fffff260ed7 in __lwp_park () from /lib/64/libc.so.1 #1 0x00007fffff25a2d9 in cond_sleep_queue () from /lib/64/libc.so.1 #2 0x00007fffff25a4db in cond_wait_queue () from /lib/64/libc.so.1 #3 0x00007fffff25a981 in cond_wait_common () from /lib/64/libc.so.1 #4 0x00007fffff25ac8d in __cond_timedwait () from /lib/64/libc.so.1 #5 0x00007fffff25ad56 in cond_timedwait () from /lib/64/libc.so.1 #6 0x00007fffff25ad99 in pthread_cond_timedwait () from /lib/64/libc.so.1 #7 0x000000000115489a in __gthread_cond_timedwait (__abs_timeout=0x7ffffe41f4d0, __mutex=<optimized out>, __cond=0x34bb988) at /opt/mongodbtoolchain/v2/include/c++/5.4.0/i386-pc-solaris2.11/amd64/bits/gthr-default.h:871 #8 std::condition_variable::__wait_until_impl<std::chrono::duration<long, std::ratio<1l, 1000000000l> > > (__atime=..., __lock=..., this=0x34bb988) at /opt/mongodbtoolchain/v2/include/c++/5.4.0/condition_variable:165 #9 std::condition_variable::wait_until<std::chrono::duration<long, std::ratio<1l, 1000000000l> > > (__atime=..., __lock=..., this=0x34bb988) at /opt/mongodbtoolchain/v2/include/c++/5.4.0/condition_variable:105 #10 std::condition_variable::wait_for<long, std::ratio<1l, 1000000000l> > (__rtime=..., __lock=..., this=0x34bb988) at /opt/mongodbtoolchain/v2/include/c++/5.4.0/condition_variable:137 #11 mongo::CondVarLockGrantNotification::wait (this=0x34bb968, timeoutMs=<optimized out>) at src/mongo/db/concurrency/lock_state.cpp:227 #12 0x0000000001159084 in mongo::LockerImpl<false>::lockComplete(mongo::ResourceId, mongo::LockMode, unsigned int, bool) () #13 0x0000000001147bf9 in mongo::Lock::GlobalLock::waitForLock (this=0x7ffffe41fb10, timeoutMs=<optimized out>) at src/mongo/db/concurrency/d_concurrency.cpp:158 #14 0x0000000001148165 in mongo::Lock::GlobalLock::GlobalLock (this=0x7ffffe41fb10, locker=<optimized out>, lockMode=<optimized out>, timeoutMs=4294967295) at src/mongo/db/concurrency/d_concurrency.cpp:140 #15 0x00000000011481e7 in mongo::Lock::DBLock::DBLock (this=0x7ffffe41faf8, locker=0x34bb3c0, db=..., mode=<optimized out>) at src/mongo/db/concurrency/d_concurrency.cpp:178 #16 0x000000000116b600 in mongo::AutoGetDb::AutoGetDb (this=0x7ffffe41faf8, txn=0x34bae20, ns=..., mode=<optimized out>) at src/mongo/db/db_raii.cpp:45 #17 0x000000000116c208 in mongo::AutoGetCollection::AutoGetCollection (this=0x7ffffe41faf0, txn=0x34bae20, nss=..., modeDB=<optimized out>, modeColl=mongo::MODE_IS, viewMode=<optimized out>) at src/mongo/db/db_raii.cpp:55 #18 0x000000000116c8bb in boost::optional_detail::optional_base<mongo::AutoGetCollection>::emplace_assign<mongo::OperationContext*&, mongo::NamespaceString const&, mongo::LockMode, mongo::LockMode, mongo::AutoGetCollection::ViewMode&>(mongo::OperationContext*&, mongo::NamespaceString const&, mongo::LockMode&&, mongo::LockMode&&, mongo::AutoGetCollection::ViewMode&) (this=0x7ffffe41fae8) at src/third_party/boost-1.60.0/boost/optional/optional.hpp:494 #19 boost::optional<mongo::AutoGetCollection>::emplace<mongo::OperationContext*&, mongo::NamespaceString const&, mongo::LockMode, mongo::LockMode, mongo::AutoGetCollection::ViewMode&>(mongo::OperationContext*&, mongo::NamespaceString const&, mongo::LockMode&&, mongo::LockMode&&, mongo::AutoGetCollection::ViewMode&) (this=0x7ffffe41fae8) at src/third_party/boost-1.60.0/boost/optional/optional.hpp:981 #20 mongo::AutoGetCollectionForRead::AutoGetCollectionForRead (this=0x7ffffe41fac0, txn=0x34bae20, nss=..., viewMode=mongo::AutoGetCollection::ViewMode::kViewsForbidden) at src/mongo/db/db_raii.cpp:85 #21 0x00000000017cff63 in mongo::AutoGetCollectionForRead::AutoGetCollectionForRead (nss=..., txn=0x34bae20, this=0x7ffffe41fac0) at src/mongo/db/db_raii.h:170 #22 mongo::appendCollectionStorageStats (txn=0x34bae20, nss=..., param=..., result=0x7ffffe41fd60) at src/mongo/db/stats/storage_stats.cpp:57 #23 0x000000000107b371 in mongo::CollectionStats::run(mongo::OperationContext*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, mongo::BSONObj&, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, mongo::BSONObjBuilder&) () #24 0x000000000120eb0e in mongo::(anonymous namespace)::FTDCSimpleInternalCommandCollector::collect (this=<optimized out>, txn=<optimized out>, builder=...) at src/mongo/db/ftdc/ftdc_mongod.cpp:262 #25 0x0000000001201d2f in mongo::FTDCCollectorCollection::collect (this=this@entry=0x3386cc0, client=client@entry=0x3385870) at src/mongo/db/ftdc/collector.cpp:88 #26 0x0000000001206d9e in mongo::FTDCController::doLoop (this=0x3386c20) at src/mongo/db/ftdc/controller.cpp:215 #27 0x000000000260c341 in execute_native_thread_routine () #28 0x00007fffff260b7a in _thrp_setup () from /lib/64/libc.so.1 #29 0x00007fffff260e90 in ?? () from /lib/64/libc.so.1 #30 0x0000000000000000 in ?? ()
(gdb) frame 12 #12 0x0000000001159084 in mongo::LockerImpl<false>::lockComplete(mongo::ResourceId, mongo::LockMode, unsigned int, bool) () (gdb) info args No symbol table info available. (gdb) info locals No symbol table info available.
Note this works on RHEL 6:
0x00007f8ef130fb26 in mongo::LockerImpl<false>::lockComplete (this=0x7f8ef71bf000, resId=..., mode=<optimized out>, timeoutMs=4294967295, checkDeadlock=false)
(gdb) bt #0 0x00007f8eefacaa5e in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0 #1 0x00007f8ef130abf8 in __gthread_cond_timedwait (__abs_timeout=0x7f8ecccba1f0, __mutex=<optimized out>, __cond=0x7f8ef71bf5d8) at /opt/mongodbtoolchain/v2/include/c++/5.4.0/x86_64-mongodb-linux/bits/gthr-default.h:871 #2 std::condition_variable::__wait_until_impl<std::chrono::duration<long, std::ratio<1l, 1000000000l> > > (__atime=..., __lock=<synthetic pointer>..., this=0x7f8ef71bf5d8) at /opt/mongodbtoolchain/v2/include/c++/5.4.0/condition_variable:165 #3 std::condition_variable::wait_until<std::chrono::duration<long, std::ratio<1l, 1000000000l> > > (__atime=..., __lock=<synthetic pointer>..., this=0x7f8ef71bf5d8) at /opt/mongodbtoolchain/v2/include/c++/5.4.0/condition_variable:105 #4 std::condition_variable::wait_for<long, std::ratio<1l, 1000000000l> > (__rtime=..., __lock=<synthetic pointer>..., this=0x7f8ef71bf5d8) at /opt/mongodbtoolchain/v2/include/c++/5.4.0/condition_variable:137 #5 mongo::CondVarLockGrantNotification::wait (this=this@entry=0x7f8ef71bf5a8, timeoutMs=timeoutMs@entry=500) at src/mongo/db/concurrency/lock_state.cpp:227 #6 0x00007f8ef130fb26 in mongo::LockerImpl<false>::lockComplete (this=0x7f8ef71bf000, resId=..., mode=<optimized out>, timeoutMs=4294967295, checkDeadlock=false) at src/mongo/db/concurrency/lock_state.cpp:744 #7 0x00007f8ef12fe8a9 in mongo::Lock::ResourceLock::lock (this=this@entry=0x7f8ef71ccee0, mode=mode@entry=mongo::MODE_X) at src/mongo/db/concurrency/d_concurrency.cpp:265 #8 0x00007f8ef198bcbc in mongo::Lock::ResourceLock::ResourceLock (mode=mongo::MODE_X, rid=..., locker=0x7f8ef71bf000, this=0x7f8ef71ccee0) at src/mongo/db/concurrency/d_concurrency.h:82 #9 mongo::KVCatalog::newCollection (this=0x7f8ef5bf2220, opCtx=opCtx@entry=0x7f8ef5ed0500, ns=..., options=...) at src/mongo/db/storage/kv/kv_catalog.cpp:397 #10 0x00007f8ef1991a25 in mongo::KVDatabaseCatalogEntryBase::createCollection (this=0x7f8ef5eb6500, txn=0x7f8ef5ed0500, ns=..., options=..., allocateDefaultSpace=true) at src/mongo/db/storage/kv/kv_database_catalog_entry_base.cpp:210 #11 0x00007f8ef11c6397 in mongo::Database::createCollection (this=this@entry=0x7f8ef719fc00, txn=txn@entry=0x7f8ef5ed0500, ns=..., options=..., createIdIndex=createIdIndex@entry=true, idIndex=...) at src/mongo/db/catalog/database.cpp:543 #12 0x00007f8ef11c6a9a in mongo::Database::getOrCreateCollection (this=0x7f8ef719fc00, txn=txn@entry=0x7f8ef5ed0500, ns=...) at src/mongo/db/catalog/database.cpp:486 #13 0x00007f8ef1a8349b in mongo::DurableViewCatalogImpl::upsert (this=0x7f8ef719fca8, txn=0x7f8ef5ed0500, name=..., view=...) at src/mongo/db/views/durable_view_catalog.cpp:127 #14 0x00007f8ef1a9107b in mongo::ViewCatalog::_createOrUpdateView_inlock (this=this@entry=0x7f8ef719fcb8, txn=txn@entry=0x7f8ef5ed0500, viewName=..., viewOn=..., pipeline=..., collator=...) at src/mongo/db/views/view_catalog.cpp:144 #15 0x00007f8ef1a91bad in mongo::ViewCatalog::createView (this=this@entry=0x7f8ef719fcb8, txn=txn@entry=0x7f8ef5ed0500, viewName=..., viewOn=..., pipeline=..., collation=...) at src/mongo/db/views/view_catalog.cpp:282 #16 0x00007f8ef11c3131 in mongo::Database::createView (this=this@entry=0x7f8ef719fc00, txn=txn@entry=0x7f8ef5ed0500, ns=..., options=...) at src/mongo/db/catalog/database.cpp:527 #17 0x00007f8ef11c732c in mongo::userCreateNS (txn=txn@entry=0x7f8ef5ed0500, db=0x7f8ef719fc00, ns=..., options=..., createDefaultIndexes=true, idIndex=...) at src/mongo/db/catalog/database.cpp:706 #18 0x00007f8ef11bb0c2 in mongo::createCollection (txn=txn@entry=0x7f8ef5ed0500, dbName=..., cmdObj=..., idIndex=...) at src/mongo/db/catalog/create_collection.cpp:89 #19 0x00007f8ef1236cc0 in mongo::CmdCreate::run (this=<optimized out>, txn=0x7f8ef5ed0500, dbname=..., cmdObj=..., errmsg=..., result=...) at src/mongo/db/commands/dbcommands.cpp:685 #20 0x00007f8ef12307e3 in mongo::Command::run (this=this@entry=0x7f8ef34b3100 <mongo::cmdCreate>, txn=txn@entry=0x7f8ef5ed0500, request=..., replyBuilder=replyBuilder@entry=0x7f8ecccbc530) at src/mongo/db/commands/dbcommands.cpp:1423 #21 0x00007f8ef1231866 in mongo::execCommandDatabase (txn=0x7f8ef5ed0500, command=<optimized out>, request=..., replyBuilder=<optimized out>) at src/mongo/db/commands/dbcommands.cpp:1635 #22 0x00007f8ef11fef4c in std::function<void (mongo::OperationContext*, mongo::Command*, mongo::rpc::RequestInterface const&, mongo::rpc::ReplyBuilderInterface*)>::operator()(mongo::OperationContext*, mongo::Command*, mongo::rpc::RequestInterface const&, mongo::rpc::ReplyBuilderInterface*) const (__args#3=0x7f8ecccbc530, __args#2=..., __args#1=0x7f8ef34b3100 <mongo::cmdCreate>, __args#0=0x7f8ef5ed0500, this=0x7f8ef34b1680 <mongo::(anonymous namespace)::execCommandHandler>) at /opt/mongodbtoolchain/v2/include/c++/5.4.0/functional:2267 #23 mongo::Command::execCommand (txn=txn@entry=0x7f8ef5ed0500, command=command@entry=0x7f8ef34b3100 <mongo::cmdCreate>, request=..., replyBuilder=replyBuilder@entry=0x7f8ecccbc530) at src/mongo/db/commands.cpp:452 #24 0x00007f8ef186bb8d in mongo::runCommands (txn=txn@entry=0x7f8ef5ed0500, request=..., replyBuilder=replyBuilder@entry=0x7f8ecccbc530) at src/mongo/db/run_commands.cpp:73 #25 0x00007f8ef1124d85 in mongo::(anonymous namespace)::receivedRpc (client=..., message=..., dbResponse=..., txn=0x7f8ef5ed0500) at src/mongo/db/assemble_response.cpp:217 #26 mongo::assembleResponse (txn=0x7f8ef5ed0500, m=..., dbresponse=..., remote=...) at src/mongo/db/assemble_response.cpp:554 #27 0x00007f8ef103ec9d in mongo::ServiceEntryPointMongod::_sessionLoop (this=this@entry=0x7f8ef5cf52c0, session=...) at src/mongo/db/service_entry_point_mongod.cpp:135 #28 0x00007f8ef103f5dd in mongo::ServiceEntryPointMongod::<lambda(const SessionHandle&)>::operator() (session=..., __closure=<optimized out>) at src/mongo/db/service_entry_point_mongod.cpp:103 #29 std::_Function_handler<void(const std::shared_ptr<mongo::transport::Session>&), mongo::ServiceEntryPointMongod::startSession(mongo::transport::SessionHandle)::<lambda(const SessionHandle&)> >::_M_invoke(const std::_Any_data &, const std::shared_ptr<mongo::transport::Session> &) (__functor=..., __args#0=...) at /opt/mongodbtoolchain/v2/include/c++/5.4.0/functional:1871 #30 0x00007f8ef1cd8bb2 in std::function<void (std::shared_ptr<mongo::transport::Session> const&)>::operator()(std::shared_ptr<mongo::transport::Session> const&) const (__args#0=..., this=0x7f8ef5d21190) at /opt/mongodbtoolchain/v2/include/c++/5.4.0/functional:2267 #31 mongo::(anonymous namespace)::runFunc (ptr=0x7f8ef5d21180) at src/mongo/transport/service_entry_point_utils.cpp:78 #32 0x00007f8eefac6aa1 in start_thread () from /lib64/libpthread.so.0 #33 0x00007f8eef813aad in clone () from /lib64/libc.so.6 (gdb) frame 6 #6 0x00007f8ef130fb26 in mongo::LockerImpl<false>::lockComplete (this=0x7f8ef71bf000, resId=..., mode=<optimized out>, timeoutMs=4294967295, checkDeadlock=false) at src/mongo/db/concurrency/lock_state.cpp:744 744 result = _notify.wait(waitTimeMs); (gdb) info args this = 0x7f8ef71bf000 resId = {_fullHash = 11529215046068469761} mode = <optimized out> timeoutMs = 4294967295 checkDeadlock = false (gdb) info locals curTimeMicros = <optimized out> elapsedTimeMicros = <optimized out> totalBlockTimeMs = <optimized out> result = <optimized out> waitTimeMs = 500 startOfTotalWaitTime = 1488835600574625 startOfCurrentWaitTime = 1488910404634152
- is depended on by
-
SERVER-27874 Display locks and generate digraph for threads using LockManager locks and/or pthread_mutexes
- Closed