Todd Lipcon created KUDU-1992:
---------------------------------

             Summary: heap-use-after-free when running threadlocal cache 
destructor
                 Key: KUDU-1992
                 URL: https://issues.apache.org/jira/browse/KUDU-1992
             Project: Kudu
          Issue Type: Bug
          Components: cfile, util
    Affects Versions: 1.4.0
            Reporter: Todd Lipcon
            Assignee: Todd Lipcon
            Priority: Blocker


After KUDU-680, we started to see the occasional heap-use-after-free when 
destructing the new thread-local cache. The issue seems to be:

- the thread uses LongAdder somewhere, which allocates a threadlocal 'struct 
HashCode'
- the thread also uses the threadlocal block cache

On thread destruction, we are running the LongAdder HashCode destructor first, 
and then running the threadlocal cache destructor. The threadlocal cache runs 
'Release()' on the cached blocks, which tries to update the cache's 
LongAdder-based metrics. This then accesses the hashcode threadlocal which has 
already been destructed.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to