• erikchen's avatar
    Fix 2 bugs in out of process heap profiling implementation. · a6f3feb7
    erikchen authored
    Bug 1: When an AllocationTracker is destroyed from a client disconnecting,
    queued barrier callbacks would not be run. This would cause the heap dump to
    never be emitted.
    
    Bug 2: The implementation of MemlogConnectionManager::OnNewConnection called
    mojo::SharedBufferHandle::Create, which uses synchronous IPC with the browser
    process. This can cause deadlock/timeouts, since the browser process
    synchronously waits for the memlog pipe to free up and eventually gives up after
    10 seconds, tearing down the allocator shim. The solution is to create a
    dedicated thread for calling mojo::SharedBufferHandle::Create, thus avoiding the
    deadlock.
    
    Change-Id: Ib3f4143381ce03c353ffe93d45794070e3b007d5
    Bug: 811711
    Reviewed-on: https://chromium-review.googlesource.com/917243
    Commit-Queue: Erik Chen <erikchen@chromium.org>
    Reviewed-by: default avatarPrimiano Tucci <primiano@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#536729}
    a6f3feb7
memlog_connection_manager.cc 14 KB