[Lldb-commits] [PATCH] D53412: [lldb] Fixed deadlock when SBProcess is Kill()ed and inspected

Cameron via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Mar 28 12:26:07 PDT 2019


cameron314 added a comment.

There's dozens of places that take the API mutex without taking the process mutex. Take `Kill` for example: It needs to take the API mutex, but cannot take the run lock since it will be taken by the private state thread. Another example is `HandleCommand`, which takes the API mutex but has no process that it could ask to lock the API mutex for it.

On the flip side, all the `SBFrame` methods lock the process run lock but not the API mutex. And so on.

I just really don't think this can be refactored in a useful way without rewriting the way all SB locks are taken, which is almost impossible to do at this point.


Repository:
  rLLDB LLDB

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D53412/new/

https://reviews.llvm.org/D53412





More information about the lldb-commits mailing list