简体   繁体   English

“__workq_kernreturn”在iOS崩溃日志中或暂停执行应用程序时的含义是什么?

[英]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.

相关问题 此IOS应用程序崩溃报告是什么意思? - What does this IOS app crash report mean? 崩溃日志中我的应用名称旁边的“放弃”是什么意思? - What does “jettisoned” next to my app name in a crash log signify? iOS:当我问Siri“您能做什么?”时,Siri没有列出我的iOS付款应用程序 - iOS: Siri does not list my iOS payments app when I ask Siri “What can you do?” iOS 文件路径上的 /private 前缀表示什么? - What does the /private prefix on an iOS file path indicate? iPhone:此崩溃日志是什么意思? - iPhone: what does this Crash Log mean? 进入前台(在后台运行一会后),iOS 7应用程序崩溃(包括崩溃日志) - iOS 7 App Crashes (crash log included) when entering foreground (after being in background for a while) iOS 应用程序在设备上自行运行时崩溃,在使用调试器或在模拟器中通过 Xcode 运行时不会崩溃 - iOS App Crashes when running by itself on device, does not crash when running through Xcode using debugger, or in simulator 跟踪应用日志(FLOW)的最佳方法是什么,该应用完全崩溃 - What is the best way to track App log (FLOW), That app exactly Crash 我无法跟踪的iOS App中的崩溃日志 - Crash log in iOS App which I can't trace 收到警告内存时,iOS App崩溃 - iOS App Crash when receiving warning memory
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM