I'm trying to symbolicate a crash dump for an iOS app buit using Xamarin.iOS. I am seeing a lot of warning about not being able to find symbols for system binary images such a Foundation, and the output from symbolicate is ultimately missing most of the information that I need.
I'm following the process described here. I have put MyApp.app, MyApp.app.dSYM, and the crash log into a directory and run symbolicate -o crash.txt "crashreport.crash" "MyApp.app". The output crash.txt contains no symbols, and I see a lot of errors in the symbolicate console output. For example:
Finding Symbols:
.fetching symbol file for Foundation--[undef]
Searching []...-- NO MATCH
Searching in Spotlight for dsym with UUID of e596bd80bcc83f15aca36a7ef014f457
Running mdfind "com_apple_xcode_dsym_uuids == E596BD80-BCC8-3F15-ACA3-6A7EF014F457"
#dsym_paths = ( )
#exec_names = ( )
Did not find executable for dsym
## Warning: Can't find any unstripped binary that matches version of /System/Library/Frameworks/Foundation.framework/Foundation
The full output is at http://pastebin.com/W1KP1iTR
I have used dwarfdump to verify that the UUID in MyApp.pSYM is the same as the one in the crash dump.
I'm using Xamarin studio 5.7.1 on with xcode 6.1.1.
Can anyone suggest what is going wrong here?
Apple's symbolicate tool requires that you add all executables and mach-o binaries to Spotlight database prior to querying for symbols.
This of course a tedious job that is required. I could never find how to remove it from the index, or to know what the queue has been completed and the binary with its UUIDs are indexed.
Plug: I wrote this symbolicate-pro tool.
Here's a program I wrote for TestFairy (the company). It's called symbolicate-pro and it has a few key differences that Apple's symbolicate:
It does not require any indexing.
You can specify directories where your iOS symbols are located.
It's 10x faster.
And if you get otool compiled for another OS, it can run on other platforms than Mac.
TestFairy uses it for its production and is updating when iOS changes the crash reports.
You can find it on github at: https://github.com/testfairy/symbolicatecrash-pro
Hope this helps ;)
Related
I'm studying iOS crash analysis. Now, I need to import crashlog files into LLDB. As WWDC18 Session 414 said, I now have a copy of myApp, dSYM, xxx.crash. Run the following command in iTerm2.app:
$ lldb
(lldb) command script import lldb.macosx.crashlog
(lldb) crashlog /path/xxxx.crash
However, the stack trace file is not available and there is only a lot of error like:
error: unable to locate any executables from the crash log
Did I use it wrong? What is the correct method of use?
I've recently had the same issue. Unfortunately, in it's current state the crashlog script appears to expect the original binary to be around, but we can "trick" it by either:
Copying the binary from inside the .dSYM/Contents/Resources/DWARF/ into the path it is expecting it (found on the .crash file, something like /private/var/containers/Bundle/Application/SOME-UUID/MyApp.app/MyApp)
Editing the paths (not just the initial one) in the .crash file before symbolicating to the path of the binary (e.g. ~/MyFolder/MyApp.app/...).
Hope this helps! 🙏
I'm investigating how to create a server side iOS crash report symbolication server like Crashlitics or Crittercism or HokeyApp, from I can see, they only ask the user to upload the .dSYM file then they are able to symbolicate the crash report, I'm wondering how they archive it? Apple's standard symbolicatecrash command needs the app binary and the .dSYM file being provided together:
Symbolication - resolving stack trace addresses to source code methods and lines - requires the application binary that was uploaded to the App Store and the .dSYM file that was generated when that binary was built. This must be an exact match - otherwise, the report cannot be fully symbolicated. It is essential that you keep each build distributed to users (regardless of the details of that distribution) with its .dSYM file.
Any one knows the detail? Thanks.
Symbolication is the process of translating stack traces into a human-readable form by mapping hexadecimal addresses to function names using symbol file. In other words, Symbolication can be defined as the process of de-obfuscating code symbols with debug symbols removed to both reduce package size and make it harder to reverse engineer. Apteligent automatically symbolicates crashes once you have uploaded your app’s symbol file.
For Apple applications, stack traces are reported in hexidecimal characters. Symbolication allows developers to convert these hex strings into human-readable text.
For more information please refer to and http://support.crittercism.com/articles/knowledge_base/How-does-iOS-Symbolication-work and https://www.apteligent.com/developer-resources/symbolicating-an-ios-crash-report/
I'm using QuincyKit to analyse crash dumps from my iOS apps. QuincyKit's symbolication script is capable of handling both my code and system code - as long as the debug symbols for the relevant version of iOS are present on the machine.
Said symbols reside under (Home)/Library/Developer/Xcode/iOS DeviceSupport. Question - did anyone ever try to move those folders from one machine with Xcode to another?
I could use some 7.0.x symbols; chances of getting a device with that version are practically nil by now.
Just check the source of symbolicatecrash.pl that you use for symbolication.
It searches the iOS system symbols in the following paths:
/System/Library/Developer/Xcode/iOS DeviceSupport/
~/Library/Developer/Xcode/iOS DeviceSupport/
Xcode.app/Contents/Developer/Platforms/*.platform/DeviceSupport/
These paths are hardcoded and may change with every update of the script (as it is part of Xcode).
I am trying to debug some concurrency code and when I log [NSThread callStackSymbols]; the console shows most of the symbols I am interested in as <redacted>.
Is there a way to get around this during runtime? I have deleted the device symbols folder but Xcode re-symbolication didn't seem to fix the issue.
There are a few other questions on here but they all seem to be trying to solve this on crash files.
How can I see the method names for framework symbols in the debug console?
I am running Xcode 5.
You get all symbols showing up only:
while debugging
when generating a full crash report and symbolicate that.
symbolicating the addresses manually using atos with the corresponding dSYM or system symbols on disk (you need to load address for each framework and binary to do that, also due to Address space layout randomization. Only having callStackSymbols doesn't reveal those). See iOS crash reports: atos not working as expected
The <redacted> symbols are a
Memory optimization. The <redacted> symbol names are stored on disk only, which saves some physical memory and lots of virtual address space in every process.
See https://devforums.apple.com/thread/171264
To sum up: you can NOT get all system symbols showing up using any calls during runtime. Instead you need to create a full crash report by letting the app crash and analyse the stack traces from those.
I have an app on the App Store that is crashing. I have tried several of the solutions on SO to symbolicate my app, using at different times the Organizer, the Terminal, and Instruments. Nothing has worked so far - the lines in the reports from the methods in my app are never symbolicated, even when the lines for Apple methods are. After looking around for a while, it seems as though this might have something to do with the app name, which is along the lines of "Angie's List" - with both an apostrophe and a space. It is too late to change the app name now as it is live on the store. I haven't seen a solution to this anywhere and would appreciate a shove in the right direction.
Usually the app name doesn't matter, unless there is a bug in the symbolication script which I doubt. Did you check if you have the correct dSYM available?
If you scroll down your latest crash log, check the 1st line below Binary Images, it will look like this
0x1000 - 0x24cfff +YourApp armv7 <f6012c517d783486ab53e45d948b92a2> /var/mobile/Applications/A8EC3C1F-44AF-169A-BC0E-FBBC0F04CDF5/YourApp.app/YourApp
f6012c517d783486ab53e45d948b92a2 is the UUID of the executable the caused the crash.
You can find the correct dSYM using the terminal as follows:
mdfind "com_apple_xcode_dsym_uuids == F6012C51-7D78-3486-AB53-E45D948B92A2"
The string F6012C51-7D78-3486-AB53-E45D948B92A2 is the above string reformatted to uppercase and 8-4-4-4-12 groups. I guess this command will not return anything.
If you have a dSYM (e.g. in an .xcarchive), you can check its UUID in the terminal as follows:
dwarfdump --uuid YourApp.app.dSYM
If symbolication doesn't work automatically, you can try to do it manually by following the instructions posted here: iOS crash reports: atos not working as expected
If the application has special characters like spaces or apostrophe's in it, the default Apple toolchain will not be able to symbolicate it. The reason is that the tool otool, which being used in the toolchain, can't handle that. No matter how you pass the filename. So to fix this, you have to do the following:
Rename the dSYM package and remove all special chars, e.g. from My App's.app.dSYM to MyApps.app.dSYM
Open the content inside the package and navigate down to Contents/Resources/DWARF
Rename the file in there as you did above
Now try again. Best way to avoid all this: NEVER use special chars in your apps name. If you want the adjust the name that appears on the screen, use CFBundleDisplayName or the corresponding plist entries.