)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":1000966,"name":"Dave Rigby","email":"daver@couchbase.com","username":"drigby","avatars":[{"url":"https://www.gravatar.com/avatar/514e75a8d75cc1fcdb22433d445ae8f1.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d32","height":32},{"url":"https://www.gravatar.com/avatar/514e75a8d75cc1fcdb22433d445ae8f1.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d56","height":56},{"url":"https://www.gravatar.com/avatar/514e75a8d75cc1fcdb22433d445ae8f1.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d100","height":100},{"url":"https://www.gravatar.com/avatar/514e75a8d75cc1fcdb22433d445ae8f1.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d120","height":120}]},"change_message_id":"c48246cf082c0c76fa355f3848ba1f3aa1857e91","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"85c30944_a10d7acc","updated":"2019-07-12 10:51:21.000000000","message":"Suggest including the TSan report in here (maybe cut the long filename prefix /home/jenkins/...../kv_engine) for future reference / aid to reader to see it\u0027s correct\n\n(disk space is cheap, we can afford a few K in the commit message if needs be :)","commit_id":"35108702e3302e7bc7acdc35abb4b7d37604df0e"},{"author":{"_account_id":1000966,"name":"Dave Rigby","email":"daver@couchbase.com","username":"drigby","avatars":[{"url":"https://www.gravatar.com/avatar/514e75a8d75cc1fcdb22433d445ae8f1.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d32","height":32},{"url":"https://www.gravatar.com/avatar/514e75a8d75cc1fcdb22433d445ae8f1.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d56","height":56},{"url":"https://www.gravatar.com/avatar/514e75a8d75cc1fcdb22433d445ae8f1.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d100","height":100},{"url":"https://www.gravatar.com/avatar/514e75a8d75cc1fcdb22433d445ae8f1.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d120","height":120}]},"change_message_id":"8f1981649b05c0f5cbf41c562f70d394227cd3d1","unresolved":false,"context_lines":[{"line_number":35,"context_line":"     #11 NotifyNewSeqnoCB::callback(Vbid const\u0026, VBNotifyCtx const\u0026) .../kv_engine/engines/ep/src/kv_bucket.h:837 (ep.so+0x000000224dcb)"},{"line_number":36,"context_line":"     #12 VBucket::notifyNewSeqno(VBNotifyCtx const\u0026) .../kv_engine/engines/ep/src/vbucket.cc:3579 (ep.so+0x000000262f6b)"},{"line_number":37,"context_line":"     #13 VBucket::set(Item\u0026, void const*, EventuallyPersistentEngine\u0026, std::function\u003ccb::StoreIfStatus (boost::optional\u003citem_info\u003e const\u0026, cb::vbucket_info)\u003e, Collections::VB::Manifest::CachingReadHandle const\u0026) .../kv_engine/engines/ep/src/vbucket.cc:1569 (ep.so+0x00000026af3f)"},{"line_number":38,"context_line":"     #14 KVBucket::set(Item\u0026, void const*, std::function\u003ccb::StoreIfStatus (boost::optional\u003citem_info\u003e const\u0026, cb::vbucket_info)\u003e) .../kv_engine/engines/ep/src/kv_bucket.cc:692 (ep.so+0x00000021ee48)"},{"line_number":39,"context_line":"     #15 EventuallyPersistentEngine::storeIfInner(void const*, Item\u0026, unsigned long, ENGINE_STORE_OPERATION, std::function\u003ccb::StoreIfStatus (boost::optional\u003citem_info\u003e const\u0026, cb::vbucket_info)\u003e const\u0026) .../kv_engine/engines/ep/src/ep_engine.cc:2440 (ep.so+0x00000018071f)"},{"line_number":40,"context_line":"     #16 EventuallyPersistentEngine::store_if(gsl::not_null\u003cvoid const*\u003e, gsl::not_null\u003cvoid*\u003e, unsigned long, ENGINE_STORE_OPERATION, std::function\u003ccb::StoreIfStatus (boost::optional\u003citem_info\u003e const\u0026, cb::vbucket_info)\u003e const\u0026, boost::optional\u003ccb::durability::Requirements\u003e const\u0026, DocumentState) .../kv_engine/engines/ep/src/ep_engine.cc:376 (ep.so+0x000000180d02)"},{"line_number":41,"context_line":"     #17 bucket_store_if(Cookie\u0026, gsl::not_null\u003cvoid*\u003e, unsigned long, ENGINE_STORE_OPERATION, std::function\u003ccb::StoreIfStatus (boost::optional\u003citem_info\u003e const\u0026, cb::vbucket_info)\u003e, boost::optional\u003ccb::durability::Requirements\u003e, DocumentState) .../kv_engine/daemon/protocol/mcbp/engine_wrapper.cc:139 (memcached+0x00000048ab2e)"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"c28a183f_d1c9af53","line":38,"updated":"2019-07-12 11:17:50.000000000","message":"Suggest cropping this a bit to aid the reader :)\n\nFor example the stack frames are the same up to KVBucket::set (if I\u0027m reading in Gerrit correctly) - as could the outer frames (15..38) arn\u0027t really of relevance to the issue, you can remove them from this backtrace and the one below.\n\nWe also don\u0027t need the backtraces for where the threads were created.\n\nYou can also remove the arguments from the functions with long argument lists, replacing with `(...)` so it\u0027s more readable.\n\nEssentially you just want to highlight how the two locks being acquired relate to each other; giving the reader something they can follow so they can verify your fix is correct.","commit_id":"b734017a2da6bcb63ed2792ef34fc10e8da0d35e"},{"author":{"_account_id":1000966,"name":"Dave Rigby","email":"daver@couchbase.com","username":"drigby","avatars":[{"url":"https://www.gravatar.com/avatar/514e75a8d75cc1fcdb22433d445ae8f1.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d32","height":32},{"url":"https://www.gravatar.com/avatar/514e75a8d75cc1fcdb22433d445ae8f1.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d56","height":56},{"url":"https://www.gravatar.com/avatar/514e75a8d75cc1fcdb22433d445ae8f1.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d100","height":100},{"url":"https://www.gravatar.com/avatar/514e75a8d75cc1fcdb22433d445ae8f1.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d120","height":120}]},"change_message_id":"7038bee4e4f24e7af702a0db6c75cfaac33ae713","unresolved":false,"context_lines":[{"line_number":35,"context_line":"     #11 NotifyNewSeqnoCB::callback(Vbid const\u0026, VBNotifyCtx const\u0026) .../kv_engine/engines/ep/src/kv_bucket.h:837 (ep.so+0x000000224dcb)"},{"line_number":36,"context_line":"     #12 VBucket::notifyNewSeqno(VBNotifyCtx const\u0026) .../kv_engine/engines/ep/src/vbucket.cc:3579 (ep.so+0x000000262f6b)"},{"line_number":37,"context_line":"     #13 VBucket::set(...) .../kv_engine/engines/ep/src/vbucket.cc:1569 (ep.so+0x00000026af3f)"},{"line_number":38,"context_line":"     #14 KVBucket::set(...) .../kv_engine/engines/ep/src/kv_bucket.cc:692 (ep.so+0x00000021ee48)"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"   Mutex M4054 previously acquired by the same thread here:"},{"line_number":41,"context_line":"     #0 AnnotateRWLockAcquired \u003cnull\u003e (libtsan.so.0+0x00000005b63d)"},{"line_number":42,"context_line":"     #1 folly::detail::annotate_rwlock_acquired_impl(...) .../follytsan/folly/synchronization/SanitizeThread.cpp:91 (memcached+0x0000006463de)"},{"line_number":43,"context_line":"     #2 annotate_rwlock_acquired .../build/tlm/deps/folly.exploded/include/folly/synchronization/SanitizeThread.h:99 (ep.so+0x00000021e932)"},{"line_number":44,"context_line":"     #3 folly::SharedMutexImpl\u003cfalse, void, std::atomic, false, true\u003e::annotateAcquired(folly::annotate_rwlock_level) .../build/tlm/deps/folly.exploded/include/folly/SharedMutex.h:696 (ep.so+0x00000021e932)"},{"line_number":45,"context_line":"     #4 folly::SharedMutexImpl\u003cfalse, void, std::atomic, false, true\u003e::lock_shared(folly::SharedMutexToken\u0026) .../build/tlm/deps/folly.exploded/include/folly/SharedMutex.h:376 (ep.so+0x00000021e932)"},{"line_number":46,"context_line":"     #5 folly::SharedMutexImpl\u003cfalse, void, std::atomic, false, true\u003e::ReadHolder::ReadHolder(folly::SharedMutexImpl\u003cfalse, void, std::atomic, false, true\u003e const\u0026) .../build/tlm/deps/folly.exploded/include/folly/SharedMutex.h:1315 (ep.so+0x00000021e932)"},{"line_number":47,"context_line":"     #6 KVBucket::set(...) .../kv_engine/engines/ep/src/kv_bucket.cc:659 (ep.so+0x00000021e932)"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"   Mutex M4054 acquired here while holding mutex M201671426334441480 in thread T5:"},{"line_number":50,"context_line":"     #0 AnnotateRWLockAcquired \u003cnull\u003e (libtsan.so.0+0x00000005b63d)"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"61d75242_84371956","line":47,"range":{"start_line":38,"start_character":0,"end_line":47,"end_character":95},"updated":"2019-07-12 11:36:48.000000000","message":"Much better, thanks!\n\nNote I might have been off-by-one in my previous comment - note at this cropping we don\u0027t yet have a common execution point - these are in the same symbol but different line numbers (692 vs 659). Can you expand outwards so we have a common address? (That allows the reader to see exactly where one lock is acquired relative to the other).","commit_id":"3dcad8b08fd2af85605b4d9d30c80e87dd5c233f"}]}
