MacOS – What are “stackshots” for mac

consolehigh sierrakeynotemacos

Ive recently noticed that from one of my keynote presentations it creates a ".spin" log whenever i close the presentations without saving or view previous versions of the presentation with the 'Revert to' option. I believe this is due to two things: the spinning wheel showing up before it closes(as it is a large presentation and could take about 3-4 seconds to revert changes) and/or when i go to view previous versions of the presentation sometimes the spinning beachball could briefly appear.

While looking in the Console app i saw the "Keynote. . .Macbook-Air.spin" logs and under 'Data Source' it displayed "Stackshots". Ive tried researching on what a stackshot is but came up short.

I am using MacOS 10.13.4 High Sierra.

What exactly is a stackshot? What are ".spin" logs and are they correlated to the spinning beachball?

Best Answer

You're pretty close. A "stackshot" is a recording of the call stack trace of processes on the system (including kernel threads), which is useful for debugging purposes as it provides insight into what the application is doing at the time that the stackshot was taken. macOS captures these automatically when the system detects certain types of hangs using a utility called spindump(8) (recently, it seems the original data source is tailspin(8)). Depending on your privacy settings, these get uploaded periodically for Apple to aggregate and analyze hangs across the system.