iOS9: duplicated lines in crash reports are causing symbolicatecrash to get stuck
Asked Answered
D

1

17

This is not a question because I have already found a workaround. I am publishing it so that others can take advantage on the hours I was spending on it, and use my suggested workaround.

I have got some strange crash reports - a single line was duplicated many times:

...
0x190e08000 -        0x190e49fff  Notes arm64  <f45c09ce977b3282ab0e879252dfebee> /System/Library/PrivateFrameworks/Notes.framework/Notes
0x190f9c000 -        0x190fa6fff  NotificationsUI arm64  <73dcb247ed183ce7bb330d7bb55f93bd> /System/Library/PrivateFrameworks/NotificationsUI.framework/NotificationsUI
0x190fa8000 -        0x190faafff  OAuth arm64  <c2658cb3208b342dbe1e91cea30ebdd5> /System/Library/PrivateFrameworks/OAuth.framework/OAuth
0x191900000 -        0x191903fff  ParsecSubscriptionServiceSupport arm64  <c70467637c9332c7b0be897200c9ccb1> /System/Library/PrivateFrameworks/ParsecSubscriptionServiceSupport.framework/ParsecSubscriptionServiceSupport
0x191900000 -        0x191903fff  ParsecSubscriptionServiceSupport arm64  <c70467637c9332c7b0be897200c9ccb1> /System/Library/PrivateFrameworks/ParsecSubscriptionServiceSupport.framework/ParsecSubscriptionServiceSupport
0x191900000 -        0x191903fff  ParsecSubscriptionServiceSupport arm64  <c70467637c9332c7b0be897200c9ccb1> /System/Library/PrivateFrameworks/ParsecSubscriptionServiceSupport.framework/ParsecSubscriptionServiceSupport
0x191900000 -        0x191903fff  ParsecSubscriptionServiceSupport arm64  <c70467637c9332c7b0be897200c9ccb1> /System/Library/PrivateFrameworks/ParsecSubscriptionServiceSupport.framework/ParsecSubscriptionServiceSupport
0x191900000 -        0x191903fff  ParsecSubscriptionServiceSupport arm64  <c70467637c9332c7b0be897200c9ccb1> /System/Library/PrivateFrameworks/ParsecSubscriptionServiceSupport.framework/ParsecSubscriptionServiceSupport
0x191900000 -        0x191903fff  ParsecSubscriptionServiceSupport arm64  <c70467637c9332c7b0be897200c9ccb1> /System/Library/PrivateFrameworks/ParsecSubscriptionServiceSupport.framework/ParsecSubscriptionServiceSupport
0x191900000 -        0x191903fff  ParsecSubscriptionServiceSupport arm64  <c70467637c9332c7b0be897200c9ccb1> /System/Library/PrivateFrameworks/ParsecSubscriptionServiceSupport.framework/ParsecSubscriptionServiceSupport
0x191900000 -        0x191903fff  ParsecSubscriptionServiceSupport arm64  <c70467637c9332c7b0be897200c9ccb1> /System/Library/PrivateFrameworks/ParsecSubscriptionServiceSupport.framework/ParsecSubscriptionServiceSupport
0x191900000 -        0x191903fff  ParsecSubscriptionServiceSupport arm64  <c70467637c9332c7b0be897200c9ccb1> /System/Library/PrivateFrameworks/ParsecSubscriptionServiceSupport.framework/ParsecSubscriptionServiceSupport
0x191900000 -        0x191903fff  ParsecSubscriptionServiceSupport arm64  <c70467637c9332c7b0be897200c9ccb1> /System/Library/PrivateFrameworks/ParsecSubscriptionServiceSupport.framework/ParsecSubscriptionServiceSupport
0x191900000 -        0x191903fff  ParsecSubscriptionServiceSupport arm64  <c70467637c9332c7b0be897200c9ccb1> /System/Library/PrivateFrameworks/ParsecSubscriptionServiceSupport.framework/ParsecSubscriptionServiceSupport
0x191900000 -        0x191903fff  ParsecSubscriptionServiceSupport arm64  <c70467637c9332c7b0be897200c9ccb1> /System/Library/PrivateFrameworks/ParsecSubscriptionServiceSupport.framework/ParsecSubscriptionServiceSupport
0x191900000 -        0x191903fff  ParsecSubscriptionServiceSupport arm64  <c70467637c9332c7b0be897200c9ccb1> /System/Library/PrivateFrameworks/ParsecSubscriptionServiceSupport.framework/ParsecSubscriptionServiceSupport
0x191900000 -        0x191903fff  ParsecSubscriptionServiceSupport arm64  <c70467637c9332c7b0be897200c9ccb1> /System/Library/PrivateFrameworks/ParsecSubscriptionServiceSupport.framework/ParsecSubscriptionServiceSupport
0x191900000 -        0x191903fff  ParsecSubscriptionServiceSupport arm64  <c70467637c9332c7b0be897200c9ccb1> /System/Library/PrivateFrameworks/ParsecSubscriptionServiceSupport.framework/ParsecSubscriptionServiceSupport
0x191900000 -        0x191903fff  ParsecSubscriptionServiceSupport arm64  <c70467637c9332c7b0be897200c9ccb1> /System/Library/PrivateFrameworks/ParsecSubscriptionServiceSupport.framework/ParsecSubscriptionServiceSupport
0x191900000 -        0x191903fff  ParsecSubscriptionServiceSupport arm64  <c70467637c9332c7b0be897200c9ccb1> /System/Library/PrivateFrameworks/ParsecSubscriptionServiceSupport.framework/ParsecSubscriptionServiceSupport
0x191900000 -        0x191903fff  ParsecSubscriptionServiceSupport arm64  <c70467637c9332c7b0be897200c9ccb1> /System/Library/PrivateFrameworks/ParsecSubscriptionServiceSupport.framework/ParsecSubscriptionServiceSupport
0x191900000 -        0x191903fff  ParsecSubscriptionServiceSupport arm64  <c70467637c9332c7b0be897200c9ccb1> /System/Library/PrivateFrameworks/ParsecSubscriptionServiceSupport.framework/ParsecSubscriptionServiceSupport
0x1919c8000 -        0x1919ebfff  Pegasus arm64  <82f60f2d5ad73b5fa89d283a4e992e88> /System/Library/PrivateFrameworks/Pegasus.framework/Pegasus
0x191a30000 -        0x191a57fff  PersistentConnection arm64  <8d0b7602daee3aa588c37704a6e3a206> /System/Library/PrivateFrameworks/PersistentConnection.framework/PersistentConnection
...

it caused the symbolicatecrash (perl) script to get stuck. The reason is that the script was originally intended to chain similar entries, assuming they have a different base address. However that code was never working because it has a bug:

# add ourselves to that chain
$images{$nextIDKey}{nextID} = $image{base};

# and store under the key we just recorded
$bundlename = $bundlename . $image{base};

The bug is that the first line should actually be:

$images{$nextIDKey}{nextID} = $bundlename . $image{base};

However I'm suggesting a workaround that will ignore these duplicated lines by adding a next command a bit above this code, i.e.

# frameworks and apps (and whatever) may share the same name, so disambiguate
if ( defined($images{$bundlename}) ) {
    next;

this is not a clean solution because we are missing some protection here, but a least it will work for most of the cases.

Anyway hoping for Apple to remove these duplications soon.

Devonna answered 10/8, 2015 at 13:7 Comment(5)
I'm voting to close this question as off-topic because it is a bug report, not a question.Monophysite
Hi @Kreiri, I know. I could ask the question of why it is stuck, then come back with a solution. Or I could simply not share the result of a 2 days work that could save others a big headache...Devonna
Thank you for sharing this, it was truly useful to me. However, I concur with Kreiri that is an answer, not a question. It would be better structured to ask the question, and then submit a separate answer (and that way I could give you a vote for a good question and a good answer!)Travesty
thanks for posting this, solved my problem exactly!Blackandwhite
This bug is still present in the symbolicatecrash script in xcode 8.Travesty
M
4

You can use the following shell script which will patch symbolicatecrash to fix it:

curl -o /tmp/t.patch https://raw.githubusercontent.com/zqxiaojin/OptSymbolicatecrash/master/fix_dead_loop.patch && cd `xcode-select -p`/../SharedFrameworks/DTDeviceKitBase.framework/Versions/A/Resources/ && sudo patch symbolicatecrash  /tmp/t.patch && cd -

Or copy the symbolicatecrash from my github https://github.com/zqxiaojin/OptSymbolicatecrash

Machuca answered 29/9, 2015 at 4:30 Comment(3)
Gives a bash permission error when copied from github and run from terminalBase
sh: /Volumes/40gb/Applications/Xcode.app/Contents/Developer/usr/bin/xcrun: No such file or directory ## Warning: can't find tool named 'otool' in the ipados SDK, falling back to searching the iOS SDK sh: /Volumes/40gb/Applications/Xcode.app/Contents/Developer/usr/bin/xcrun: No such file or directory ## Warning: can't find tool named 'otool' in iOS SDK, falling back to searching the Mac OS X SDK sh: /Volumes/40gb/Applications/Xcode.app/Contents/Developer/usr/bin/xcrun: No such file or directory ...Base
curl -o /tmp/t.patch raw.githubusercontent.com/zqxiaojin/OptSymbolicatecrash/master/… && cd xcode-select -p/../SharedFrameworks/DTDeviceKitBase.framework/Versions/A/Resources/ && sudo patch symbolicatecrash /tmp/t.patch && cd - % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 1087 100 1087 0 0 4462 0 --:--:-- --:--:-- --:--:-- 4473 Password: patch: **** Can't find file symbolicatecrash : No such file or directoryBase

© 2022 - 2024 — McMap. All rights reserved.