[英]what does “__workq_kernreturn” indicate in an iOS crash log or when you pause execution of an app?
When debugging on iOS, if I pause execution I often see multiple references to "__workq_kernreturn". 在iOS上调试时,如果我暂停执行,我经常会看到多个对“__workq_kernreturn”的引用。
If my app happens to crash, I often see multiple threads identified as below: 如果我的应用程序碰巧崩溃,我经常看到多个线程被识别如下:
Thread 19:
0 libsystem_kernel.dylib 0x332d0cd4 __workq_kernreturn + 8
Thread 20:
0 libsystem_kernel.dylib 0x332d0cd4 __workq_kernreturn + 8
Thread 21:
0 libsystem_kernel.dylib 0x332d0cd4 __workq_kernreturn + 8
Does "__workq_kernreturn" indicate a thread that is waiting to exit, or a thread that is deadlocked? “__workq_kernreturn”是否表示正在等待退出的线程,或者是一个死锁的线程? Is this something to be worried about?
这有什么值得担心的吗?
It's nothing to worry about unless there are lots of them. 除非有很多,否则没什么好担心的。 If there are lots, that suggests you may be spawning more threads than you probably should, but the
workq_kernreturn
is still not a problem itself. 如果有很多,这表明你可能会产生比你应该更多的线程,但是
workq_kernreturn
本身仍然不是问题。 It usually means that the thread is finishing. 它通常意味着线程正在完成。 The source for it is available at opensource.apple.com if you want to take a look at what it does.
如果您想了解它的作用,可以在opensource.apple.com上找到它的来源。
The most common stack you're probably looking at is this one: 你可能正在看的最常见的堆栈就是这个:
_workq_kernreturn
_pthread_wqthread
start_wqthread
Because of optimizations, you don't see the call to _pthread_workq_return() in there, but that's what's actually happening. 由于优化,你在那里看不到对_pthread_workq_return()的调用,但这就是实际发生的事情。
_workq_kernreturn
is just waiting for for the spinlock to finish so it can run the next thing on its queue (or exit). _workq_kernreturn
只是等待自旋锁完成,所以它可以在其队列(或退出)上运行下一个东西。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.