You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficserver.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2016/11/26 21:45:58 UTC

[jira] [Work logged] (TS-5065) Use after free clearing HostDB.

     [ https://issues.apache.org/jira/browse/TS-5065?focusedWorklogId=32451&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-32451 ]

ASF GitHub Bot logged work on TS-5065:
--------------------------------------

                Author: ASF GitHub Bot
            Created on: 26/Nov/16 21:45
            Start Date: 26/Nov/16 21:45
    Worklog Time Spent: 10m 
      Work Description: GitHub user jpeach opened a pull request:

    https://github.com/apache/trafficserver/pull/1235

    HostDB memory fixes

    [TS-5065](https://issues.apache.org/jira/browse/TS-5066) Use after free clearing HostDB.
    [TS-5066](https://issues.apache.org/jira/browse/TS-5065) HostDB serialization leaks on error path.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/jpeach/trafficserver fix/hostdb

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/trafficserver/pull/1235.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1235
    
----
commit f49eed1fac6f0e0161039d0b27d05957de828730
Author: James Peach <jp...@apache.org>
Date:   2016-11-26T07:09:47Z

    TS-5065: Fix RefCountCache iterator invalidation.
    
    Removing items from the TSHashMap invalidates the iterator because the
    linked list pointers are embedded in the hash node, so we can't do that
    while clearing. Instead, deallocate and remove each entry explicitly.

commit 223f28b58b495ee326ca5ceada7947170a7f270f
Author: James Peach <jp...@apache.org>
Date:   2016-11-26T19:47:04Z

    TS-5066: Fix HostDB memory leaks on serialization failure.
    
    If the serializer fails to write the partition, the copied entries were
    being leaked. Clean up the cache entry allocation to centralize the
    pain of it and allow both the cache and the serializer to share the same
    allocation and free helpers.

commit 966338d52896114c0d0136b6deb8f86e6d24e89d
Author: James Peach <jp...@apache.org>
Date:   2016-11-26T20:41:37Z

    Improve HostDB serialization warnings.

----


Issue Time Tracking
-------------------

            Worklog Id:     (was: 32451)
            Time Spent: 10m
    Remaining Estimate: 0h

> Use after free clearing HostDB.
> -------------------------------
>
>                 Key: TS-5065
>                 URL: https://issues.apache.org/jira/browse/TS-5065
>             Project: Traffic Server
>          Issue Type: Bug
>          Components: HostDB
>            Reporter: James Peach
>             Fix For: 7.1.0
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> ASAN points out that clearing the HostDB on startup results in a use after free since we are iterating at the same time as we are freeing hash entries (which contain the iterator links).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)