简体   繁体   English

线程转储和信号获取行号的死锁

[英]Thread dumps and signals to get deadlocks with line numbers

I would like to get a thread dump, like a "kill -3" on my Android process, so I can see deadlocks. 我想在我的Android进程中进行线程转储,例如“ kill -3”,这样我就可以看到死锁。 But, from the adb shell, I get "Operation not permitted," since my test phones are not rooted. 但是,由于我的测试电话未植根,因此从adb外壳中得到“不允许的操作”。

Are the deadlocks visible in the DDMS thread monitor? 死锁在DDMS线程监视器中可见吗? But, line numbers are not available there. 但是,行号在那里不可用。

here this article explains how to debug thread deadlock in android. 本文在这里说明了如何在android中调试线程死锁。 Also adding some self logging might help catching the deadlocks. 此外,添加一些自日志记录可能有助于捕获僵局。 Plus if you app is doing some network/disk operations you might want to read on android StrictMode . 另外,如果您的应用程序正在执行某些网络/磁盘操作,则可能需要在android StrictMode上阅读。

http://developer.android.com/reference/android/os/StrictMode.html http://developer.android.com/reference/android/os/StrictMode.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM