Merge branch 'stable-3.1' into stable-3.2

* stable-3.1:
  Implement deadlock check

Change-Id: Ie24a74cfbe04095966a1f10d981d0d6ff3038b3e