)]}'
{
  "commit": "5a929ef3f51b9c8c470f3e6bddbe702e68d54074",
  "tree": "ddfa4d812108edc3bfdc46e88bb9443e2fce69a5",
  "parents": [
    "70b5be47fca3bddedbd2411f40ca61a4f1775a65"
  ],
  "author": {
    "name": "Munawar Hussain",
    "email": "munawarhussain@google.com",
    "time": "Mon Sep 15 15:43:42 2025 +0000"
  },
  "committer": {
    "name": "Munawar Hussain",
    "email": "munawarhussain@google.com",
    "time": "Mon Sep 22 03:21:26 2025 -0700"
  },
  "message": "nvmed: Fix nvme worker thread deadlock\n\nThe issue was nvme worker can be destroyed on it\u0027s own thread which will\nmake a deadlock saying it is waiting for itself in the destructor of the\nNVMeMiWorker.\n\nWe have such case because we are passing sharedPtr of nvmeMi object\nwhich is the owner of worker. While the nvmeMi object is deleted from\nthe main thread (remove entry from deviceMap) but worker is still\nrunning the job where the shared ptr of nvme mi has already passed. Now\nnvme mi will try to be destroyed in the worker thread which means worker\nthread will also be destroyed there and will create deadlock since the\ndestructor is waiting for the thread to be done and the thread is\nwaiting for the destructor to be done.\n\nTo resolve this, we need to make sure the destruction is happening in\nmain thread. Created sharedPtr of worker with custom deleter which will\nmake sure the final destruction is happening in the main thread.\n\nAlso made sure this is the only way of creating NVMeMiWorker.\n\nTested: Send interface removed signal continuously and in parallel make\ndbus query to host initiated telemetry log. Detailed script can be found\nin b/438827535#comment17. Did not see any resource deadlock.\n\nGoogle-Bug-Id: 438827535\nChange-Id: I4b42e9647a1673c1da2f73b89981b50e570a9523\nSigned-off-by: Munawar Hussain \u003cmunawarhussain@google.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "1b01d89479e05e57400d74ea76c2af392290f54d",
      "old_mode": 33188,
      "old_path": "src/NVMeMi.cpp",
      "new_id": "3cb030be77b4c6d33f57a95884fa2cc7990d19f6",
      "new_mode": 33188,
      "new_path": "src/NVMeMi.cpp"
    },
    {
      "type": "modify",
      "old_id": "b648f33c55d636c609a40e4aa557728b95ffbfbf",
      "old_mode": 33188,
      "old_path": "src/NVMeMi.hpp",
      "new_id": "ecc4affb55cab5cfbbbc3336ee88c55cd371c7de",
      "new_mode": 33188,
      "new_path": "src/NVMeMi.hpp"
    },
    {
      "type": "modify",
      "old_id": "8abea9a7ea3357b9d8ed1a5ecf6fbfeae9c67d58",
      "old_mode": 33188,
      "old_path": "src/NVMeSensorMain.cpp",
      "new_id": "e04dbf46ca7ab2674ea84e5dc31e8c0ac7afc0be",
      "new_mode": 33188,
      "new_path": "src/NVMeSensorMain.cpp"
    }
  ]
}
