morningman commented on issue #3871:
URL: 
https://github.com/apache/incubator-doris/issues/3871#issuecomment-646920197


   > Is the OlapTableSink::_mem_tracker related to RuntimeState::_profile?
   > I think the RuntimeState::_instance_mem_tracker is relevant. Because it's 
OlapTableSink::_mem_tracker's parent.
   
   Actually, I didn't notice the relationship between 
`OlapTableSink::_mem_tracker` and `RuntimeState::_instance_mem_tracker`.
   In this problem, I found that all memtrackers are relates to 
`RuntimeState::_profile`, because it will update some `Counters` in the 
`RuntimeProfile`.
   For example, when calling `MemTracker->release()`, it will use 
`(*tracker)->_consumption`, and the `_consumption` is a kind of `Counter` in 
`RuntimeProfile`. But the `profile` has already been deconstructed, which 
results in a `use-after-free` error.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to