{"push_id":904919520,"size":2,"distinct_size":1,"ref":"refs/heads/master","head":"b455a20d36a52ee6fba651dccab4543700599e85","before":"90a7e07df2f6d6bc5c2b9b8d6902f25d0a451de3","commits":[{"sha":"4587de828846a72837656bb1e5a6121a3faba42c","author":{"email":"a09264da4832c7ff1d3bf1608a19f4b870f93750@couchbase.com","name":"Dave Rigby"},"message":"MB-16949: BackfillManager: Fix leak due to circular reference\n\nThere is a circular reference between BackfillManager and DcpProducer,\nwhich means that BackfillManager is never deleted. This is caused by\nBackfillManager holding an (unused) SingleThreadedRCPtr to\nDcpProducer.\n\nFix this by Removing this unused smart pointer. Unfortunately exposes\na latent deadlock when destructing BackfillManager - ~BackfillManager\n(indirectly) calls ~ActiveStream, which in turn calls\nBackfillManager::bytesSent() which attempts to acquire the Backfill\nlock; however the lock is already acquired in ~BackfillManager.\n\nFix this by removing the call to bytesSent() in ~ActiveStream - as\nit's already been updated in other methods.\n\nThe now correct deletion of DcpProducer and the smart-pointer\ntriggered deletion of ActiveStream leads to a lock-inversion\nproblem in that different locks are being acquired in different\norders on the possible deletion paths.\n\nFix this by removing the lock acquisition from destructors.\nThe locks in destructors are providing no protection, no\ncode should be refering to the deleting object, they risk\naccessing freed memory with or without the locks.\n\nChange-Id: Id79fbf8bc39463d4874c2f61378b7f110345631b\nReviewed-on: http://review.couchbase.org/57417\nReviewed-by: Jim Walker <jim@couchbase.com>\nReviewed-by: abhinav dangeti <abhinav@couchbase.com>\nWell-Formed: buildbot <build@couchbase.com>\nTested-by: buildbot <build@couchbase.com>\nReviewed-by: Chiyoung Seo <chiyoung@couchbase.com>","distinct":false,"url":"https://api.github.com/repos/membase/ep-engine/commits/4587de828846a72837656bb1e5a6121a3faba42c"},{"sha":"b455a20d36a52ee6fba651dccab4543700599e85","author":{"email":"d73ef2279de6577f7bf081737ee47554bbb7dc82@couchbase.com","name":"abhinavdangeti"},"message":"Merge remote-tracking branch 'couchbase/sherlock' into 'couchbase/master'\n\ncouchbase/sherlock:\n* 4587de8 MB-16949: BackfillManager: Fix leak due to circular reference\n\nChange-Id: Id79f58332c0124670c9dd0e8d22f8769750a778b","distinct":true,"url":"https://api.github.com/repos/membase/ep-engine/commits/b455a20d36a52ee6fba651dccab4543700599e85"}]}