)]}'
{
  "commit": "45bc04afffc94c3754fa2c7d6cc6736f6fbfff55",
  "tree": "8755da8ffa24ba52abd1193fea0f9b777ef377dd",
  "parents": [
    "6cafd355e54cb5baf1c5c9e223072c09894e6bf6"
  ],
  "author": {
    "name": "Rishabh Jain",
    "email": "jainrish@google.com",
    "time": "Tue Jun 23 17:04:58 2026 -0700"
  },
  "committer": {
    "name": "Copybara-Service",
    "email": "copybara-worker@google.com",
    "time": "Tue Jun 23 17:05:21 2026 -0700"
  },
  "message": "Fix deadlock in RemoteCollectorStorageManager by releasing lock during callback execution\n\nBEGIN_PUBLIC\nFix deadlock in RemoteCollectorStorageManager by releasing lock during callback execution.\nEND_PUBLIC\n\nInvoking EventStorageManager::EventHandler::OnEvent callback while holding the internal mutex causes deadlocks if the callback re-enters the storage manager (e.g. calling ResetEventHandler on error paths).\n\nTo fix this, refactored RemoteCollectorStorageManager to obtain a pointer to the handler, release the lock, and invoke OnEvent safely outside the locked scope. Added active callback thread tracking in EventStorageManager to block ResetEventHandler and Reset calls until all concurrent callbacks have finished executing. Bypassed the block if the re-entrant call is made on the same thread to prevent self-deadlock.\n\nVerified by running new and existing unit tests:\n- RemoteCollectorStorageManagerTest.ReentrantResetEventHandlerDoesNotDeadlock\n- //third_party/milotic/internal/cc/proxy/sse_plugin:collector_storage_manager_test\n- //third_party/milotic/internal/cc/proxy/sse_plugin:storage_manager_test\n- //third_party/milotic/internal/cc/proxy/cper:manager_test\n\nPiperOrigin-RevId: 936976417\nChange-Id: I69e1c54e7190ae102181c7121f1cf6227df9e27b\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "3f51eb9bbc91adc49b548c500ddcc339d4d6a4a1",
      "old_mode": 33188,
      "old_path": "sse_plugin/collector_storage_manager.cc",
      "new_id": "26597aa138df18b17f5551678e7a3a680caab3f9",
      "new_mode": 33188,
      "new_path": "sse_plugin/collector_storage_manager.cc"
    },
    {
      "type": "modify",
      "old_id": "a5f8e883526e2e5b7e3aaaa2722c380911e69d0d",
      "old_mode": 33188,
      "old_path": "sse_plugin/collector_storage_manager_test.cc",
      "new_id": "af1f00e53303ec3d6dbf6465d0f52556651ec1cf",
      "new_mode": 33188,
      "new_path": "sse_plugin/collector_storage_manager_test.cc"
    },
    {
      "type": "modify",
      "old_id": "51c0f74bacd0164f7654dfbbb60120f01fdea0fd",
      "old_mode": 33188,
      "old_path": "sse_plugin/storage_manager.h",
      "new_id": "35cd5e8eef02d80b3f45ea5cb69828fe22409cb7",
      "new_mode": 33188,
      "new_path": "sse_plugin/storage_manager.h"
    }
  ]
}
