Details
-
Bug
-
Resolution: Unresolved
-
Major
-
master
-
None
-
Untriaged
-
0
-
Unknown
Description
Issue flagged from TSAN when adding new code to the DcpProducer.
In DcpProducer we have patterns like
if (backfillMgr) {
|
backfillMgr->doThing();
|
}
|
Or even just unguarded calls
backfillMgr->doThing();
|
A new change for MB-57772 (which did the first pattern) triggered a TSAN warning, because DcpProducer::closeAllStreams will call reset on the backfillMgr shared_ptr - so clearly we could on one line read and believe the backfillMgr has a pointer, but on the second line crash when dereferencing a now nullptr.
T1 | T2
|
|
|
if (backfillMgr) |
|
| backfillMgr.reset();
|
|
|
backfillMgr->doThing(); |
|
CRASHED |
|
We need a safer way of managing access to the backfillMgr (e.g. folly::sync)
Attachments
Issue Links
- relates to
-
MB-38557 Investigate destruction of DcpProducer (BackfillMgr)
- Open