)]}'
{
  "commit": "f56345bcd10e20c4d0735486368cbc157b4e05ca",
  "tree": "71384e2f54d7f3e53cbb6bb4736c60cbbf923675",
  "parents": [
    "ad418a3f70f33f6b50cd008b565360ef95446063"
  ],
  "author": {
    "name": "Daniele Di Proietto",
    "email": "ddiproietto@google.com",
    "time": "Wed Nov 02 10:16:11 2022 +0000"
  },
  "committer": {
    "name": "Lalit Maganti",
    "email": "lalitm@google.com",
    "time": "Wed Mar 29 15:03:56 2023 +0100"
  },
  "message": "heapprofd: Fix crash when tracing service disconnects\n\nWhen the tracing service (traced) disconnects (because it crashes or\nother reasons), if heapprofd has an active client, it will crash,\nbecause:\n\n* HeapprofdProducer::Restart() is executed.\n* HeapprofdProducer destructor destroys its unwinding_workers_\n* UnwindingWorker destroys its members. In order:\n  * thread_task_runner_ is destroyed, so that the thread is stopped.\n  * (If there\u0027s one connected client) client_data_ is destroyed.\n  * ClientData includes a UnixSocket, which calls PostTask on\n    thread_task_runner_.\n  * thread_task_runner_ was destroyed earlier.\n\nThis patch makes fixes the problem by destroying client_data_ (on\nthread_task_runner_) before destroying the thread_task_runner_ itself.\n\n(this is a cherry-pick of just the test part of ag/20347035 since the\nactual fix landed through a merge from tm-dev)\n\nBug: 233338564\nBug: 155759761\nChange-Id: Id1874abbff8f7a7b702542a943a8de3f3a52277a\nMerged-In: Id1874abbff8f7a7b702542a943a8de3f3a52277a\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "3886500741c53b6ff536a398ffb7f65801a9d6e9",
      "old_mode": 33188,
      "old_path": "Android.bp",
      "new_id": "6ce03ca2aac5710ee207999755e10cb31de08f95",
      "new_mode": 33188,
      "new_path": "Android.bp"
    },
    {
      "type": "modify",
      "old_id": "51deba3d97b718fcea459e7be00a3d7aa6544937",
      "old_mode": 33188,
      "old_path": "src/profiling/memory/BUILD.gn",
      "new_id": "817c5b89969beae26d6a84e06d83c99c804e8eaf",
      "new_mode": 33188,
      "new_path": "src/profiling/memory/BUILD.gn"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "077a539efb7a203c334159eac72bc5bc929ca178",
      "new_mode": 33188,
      "new_path": "src/profiling/memory/heapprofd_producer_integrationtest.cc"
    },
    {
      "type": "modify",
      "old_id": "dc44b315a2909990de134d50c348d346b9ebc1bc",
      "old_mode": 33188,
      "old_path": "src/tracing/test/mock_consumer.cc",
      "new_id": "e24ffcc8fe76db7cf94d3e1dbf5d6cdc9cf8982f",
      "new_mode": 33188,
      "new_path": "src/tracing/test/mock_consumer.cc"
    },
    {
      "type": "modify",
      "old_id": "a8403491d9d603991b18fbef3a1121a4179ddb14",
      "old_mode": 33188,
      "old_path": "src/tracing/test/mock_consumer.h",
      "new_id": "f18671e7dee027d3d1bf293f77023176b213c20e",
      "new_mode": 33188,
      "new_path": "src/tracing/test/mock_consumer.h"
    }
  ]
}
