Closed Bug 1191851 Opened 9 years ago Closed 9 years ago

App crashes on startup on Aurora 29

Categories

(Firefox for iOS :: General, defect)

Other
iOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
Tracking Status
fxios + ---

People

(Reporter: sleroux, Assigned: sleroux)

Details

Attachments

(2 files, 1 obsolete file)

Users are experiencing startup crashes when upgrading to Aurora #29. Newgroups thread: https://groups.google.com/a/mozilla.com/forum/?utm_medium=email&utm_source=footer#!msg/ios-mobile-testers/RivF0uezgm4/r28ce8f4EgAJ

Might be related to session restore issues.
I installed build #28, loaded a bunch of sites, closed the browser, re-opened and installed build #29 and session restore worked and am not crashing on my iPad Air. Need more steps from the users.
Attached file crashlog.log
Hitting this on my iPad Air after playing around, crash on startup
I symbolicated some of the addresses and it looks like this is the culprit:

4   UIKit                         	0x18a059b74 -[UICollectionView _endItemAnimationsWithInvalidationContext:tentativelyForReordering:] + 9932
5   UIKit                         	0x18a05c988 -[UICollectionView _performBatchUpdates:completion:invalidationContext:tentativelyForReordering:] + 352
6   Client                        	0x1001757d4 Client.TopSitesPanel.(deleteOrUpdateSites in _C9DFE36B31E426C19626C23F17C1D229) (Client.TopSitesPanel)(Shared.Result<Storage.Cursor<Storage.Site>>, indexPath : ObjectiveC.NSIndexPath) -> () (in Client) (TopSitesPanel.swift:143)
7   Client                        	0x1002a7ce8 Client.TopSitesPanel.((deleteHistoryTileForSite in _C9DFE36B31E426C19626C23F17C1D229) (Client.TopSitesPanel) -> (Storage.Site, atIndexPath : ObjectiveC.NSIndexPath) -> ()).(closure #1).(closure #1) (in Client) (TopSitesPanel.swift:129)
Looks like this crash is for deleting top sites and might not be related to the startup crash.
Here is what is output to my iPhone's console from the time I tap on the Fennec Aurora button and its termination:

    Aug  7 11:27:01 Erics-iPhone kernel[0] <Notice>: xpcproxy[319] Container: /private/var/mobile/Containers/Data/Application/B6ACBE26-0FB4-43F5-892C-3E63141182DF (sandbox)
    Aug  7 11:27:01 Erics-iPhone amfid[170] <Error>:  SecTrustEvaluate  [leaf CriticalExtensions IssuerCommonName]
    Aug  7 11:27:01 Erics-iPhone amfid[170] <Error>:  SecTrustEvaluate  [leaf CriticalExtensions IssuerCommonName]
    Aug  7 11:27:01 Erics-iPhone locationd[61] <Notice>: Gesture EnabledForTopCLient: 0, EnabledInDaemonSettings: 0
    Aug  7 11:27:01 Erics-iPhone amfid[170] <Error>:  SecTrustEvaluate  [leaf CriticalExtensions IssuerCommonName]
    Aug  7 11:27:02 Erics-iPhone amfid[170] <Error>:  SecTrustEvaluate  [leaf CriticalExtensions IssuerCommonName]
    Aug  7 11:27:02 Erics-iPhone amfid[170] <Error>:  SecTrustEvaluate  [leaf CriticalExtensions IssuerCommonName]
    Aug  7 11:27:02 Erics-iPhone amfid[170] <Error>:  SecTrustEvaluate  [leaf CriticalExtensions IssuerCommonName]
    Aug  7 11:27:02 Erics-iPhone amfid[170] <Error>:  SecTrustEvaluate  [leaf CriticalExtensions IssuerCommonName]
    Aug  7 11:27:02 Erics-iPhone amfid[170] <Error>:  SecTrustEvaluate  [leaf CriticalExtensions IssuerCommonName]
    Aug  7 11:27:02 Erics-iPhone amfid[170] <Error>:  SecTrustEvaluate  [leaf CriticalExtensions IssuerCommonName]
    Aug  7 11:27:02 Erics-iPhone amfid[170] <Error>:  SecTrustEvaluate  [leaf CriticalExtensions IssuerCommonName]
    Aug  7 11:27:02 Erics-iPhone amfid[170] <Error>:  SecTrustEvaluate  [leaf CriticalExtensions IssuerCommonName]
    Aug  7 11:27:02 Erics-iPhone amfid[170] <Error>:  SecTrustEvaluate  [leaf CriticalExtensions IssuerCommonName]
    Aug  7 11:27:02 Erics-iPhone amfid[170] <Error>:  SecTrustEvaluate  [leaf CriticalExtensions IssuerCommonName]
    Aug  7 11:27:02 Erics-iPhone amfid[170] <Error>:  SecTrustEvaluate  [leaf CriticalExtensions IssuerCommonName]
    Aug  7 11:27:02 Erics-iPhone amfid[170] <Error>:  SecTrustEvaluate  [leaf CriticalExtensions IssuerCommonName]
    Aug  7 11:27:02 Erics-iPhone amfid[170] <Error>:  SecTrustEvaluate  [leaf CriticalExtensions IssuerCommonName]
    Aug  7 11:27:02 Erics-iPhone amfid[170] <Error>:  SecTrustEvaluate  [leaf CriticalExtensions IssuerCommonName]
    Aug  7 11:27:02 Erics-iPhone amfid[170] <Error>:  SecTrustEvaluate  [leaf CriticalExtensions IssuerCommonName]
    Aug  7 11:27:02 Erics-iPhone amfid[170] <Error>:  SecTrustEvaluate  [leaf CriticalExtensions IssuerCommonName]
    Aug  7 11:27:02 Erics-iPhone amfid[170] <Error>:  SecTrustEvaluate  [leaf CriticalExtensions IssuerCommonName]
    Aug  7 11:27:02 Erics-iPhone amfid[170] <Error>:  SecTrustEvaluate  [leaf CriticalExtensions IssuerCommonName]
    Aug  7 11:27:02 Erics-iPhone amfid[170] <Error>:  SecTrustEvaluate  [leaf CriticalExtensions IssuerCommonName]
    Aug  7 11:27:02 Erics-iPhone Client[319] <Error>: assertion failed: 12H143: libxpc.dylib + 71768 [C9F3C08A-8A3B-3849-A905-D24911240853]: 0x7d
    Aug  7 11:27:02 Erics-iPhone Unknown[319] <Error>:
    Aug  7 11:27:02 Erics-iPhone iap2d[294] <Warning>: process org.mozilla.ios.FennecAurora is now running the foreground
    Aug  7 11:27:03 Erics-iPhone BTLEServer[130] <Notice>: (Note ) Received "Get Notification Attributes" command for notification #82
    Aug  7 11:27:03 Erics-iPhone iap2d[294] <Warning>: process com.apple.WebKit.WebContent is now running the foreground
    Aug  7 11:27:03 Erics-iPhone iap2d[294] <Warning>: process com.apple.WebKit.Networking is now running the foreground
    Aug  7 11:27:04 Erics-iPhone backboardd[57] <Warning>: CoreAnimation: updates deferred for too long
    Aug  7 11:27:04 Erics-iPhone securityd[83] <Error>:  securityd_xpc_dictionary_handler Client[319] copy_matching The operation couldn’t be completed. (OSStatus error -50 - query missing class name)
    Aug  7 11:27:04 Erics-iPhone Client[319] <Error>:  SecOSStatusWith error:[-50] The operation couldn’t be completed. (OSStatus error -50 - Remote error : The operation couldn‚Äôt be completed. (OSStatus error -50 - query missing class name))
    Aug  7 11:27:06 Erics-iPhone Client[319] <Error>: fatal error: Array index out of range
    Aug  7 11:27:06 Erics-iPhone mediaserverd[22] <Notice>: '' org.mozilla.ios.FennecAurora(pid = 319) setting DiscoveryMode = DiscoveryMode_None, currentDiscoveryMode = DiscoveryMode_None
    Aug  7 11:27:06 Erics-iPhone com.apple.xpc.launchd[1] (com.apple.WebKit.Networking.A594B6B0-BAF6-4F6D-A57C-7F273030F1D2[320]) <Warning>: Service exited with abnormal code: 1
    Aug  7 11:27:06 Erics-iPhone com.apple.xpc.launchd[1] (UIKitApplication:org.mozilla.ios.FennecAurora[0xe9cf][319]) <Warning>: Service exited with abnormal code: 6
    Aug  7 11:27:06 Erics-iPhone iap2d[294] <Warning>: process com.apple.WebKit.Networking is now terminated
    Aug  7 11:27:06 Erics-iPhone iap2d[294] <Warning>: process com.apple.WebKit.WebContent is now terminated
    Aug  7 11:27:06 Erics-iPhone SpringBoard[54] <Warning>: Application 'UIKitApplication:org.mozilla.ios.FennecAurora[0xe9cf]' exited voluntarily.
    Aug  7 11:27:06 Erics-iPhone assertiond[64] <Warning>: pid_suspend failed for <BKNewProcess: 0x125e16ba0; org.mozilla.ios.FennecAurora; pid: 319; hostpid: -1>: Unknown error: -1, Unknown error: -1
    Aug  7 11:27:06 Erics-iPhone assertiond[64] <Warning>: Could not set priority of <BKNewProcess: 0x125e16ba0; org.mozilla.ios.FennecAurora; pid: 319; hostpid: -1> to 2, priority: No such process
    Aug  7 11:27:06 Erics-iPhone assertiond[64] <Warning>: Could not set priority of <BKNewProcess: 0x125e16ba0; org.mozilla.ios.FennecAurora; pid: 319; hostpid: -1> to 4096, priority: No such process
    Aug  7 11:27:06 Erics-iPhone iap2d[294] <Warning>: process org.mozilla.ios.FennecAurora is now terminated
    Aug  7 11:27:11 Erics-iPhone apsd[94] <Warning>: Silent Push: Deny app has no feature.
The parts that seem most interesting (I think the security stuff is unrelated, as part of some background task):

Aug  7 11:27:02 Erics-iPhone Client[319] <Error>: assertion failed: 12H143: libxpc.dylib + 71768 [C9F3C08A-8A3B-3849-A905-D24911240853]: 0x7d

Aug  7 11:27:04 Erics-iPhone securityd[83] <Error>:  securityd_xpc_dictionary_handler Client[319] copy_matching The operation couldn’t be completed. (OSStatus error -50 - query missing class name)
Aug  7 11:27:04 Erics-iPhone Client[319] <Error>:  SecOSStatusWith error:[-50] The operation couldn’t be completed. (OSStatus error -50 - Remote error : The operation couldn‚Äôt be completed. (OSStatus error -50 - query missing class name))

Aug  7 11:27:06 Erics-iPhone Client[319] <Error>: fatal error: Array index out of range
Hey Brian,

I saw that since build 29 that you've merged in these two fixes related to session restore.

https://github.com/mozilla/firefox-ios/pull/865
https://github.com/mozilla/firefox-ios/pull/856

It looks like the crash is coming from index out of range of an array during restoration. Do you think that these patches would address this issue? I know it's vague but we're having difficulties getting a proper crash report.
Flags: needinfo?(bnicholson)
Hard to say. Looking at git blame, the fix in [1] did fix an array OOB crasher, but the line it fixed was introduced only the day before in [2]. So it doesn't look like this would be the same crasher since the code causing that crash wasn't even part of the last build.

Do you think the symbols in comment 4 are accurate? As you said in comment 5, it seems like they point to a top sites crash rather than a session restore crash. Emily did recently fix a top sites crasher (bug 1189985), though the STR I was using were only after an orientation change and weren't on startup. Maybe those fixes will help, though?

[1] https://github.com/mozilla/firefox-ios/pull/865/files#diff-a581649b500d44b234f6d5c119812c54R50
[2] https://github.com/mozilla/firefox-ios/pull/855/files#diff-a581649b500d44b234f6d5c119812c54R53
Flags: needinfo?(bnicholson)
Woke up this morning with Aurora crashing on launch for me. I'll take this bug and see if I can run the debugger on my build.
Assignee: nobody → sleroux
Alright - I managed to pull down a breakpad dump of the startup crash and translate it into a mac .crash file and was able to symbolicate the culprit:

sleroux29795:startup2 sleroux$ xcrun atos -o Client.app/Client -arch arm64 -l 0x10009c000 0x10019c094
static Client.Browser.toTab (Client.Browser.Type)(Client.Browser) -> Storage.RemoteTab? (in Client) (Browser.swift:53)

Looks like the issue is referencing the zero'th element of history items when populating RemoteTabs
Attachment #8645743 - Flags: review?(sarentz)
Comment on attachment 8645743 [details] [review]
PR https://github.com/mozilla/firefox-ios/pull/886

A fix has already been merged into master. See https://bugzilla.mozilla.org/show_bug.cgi?id=1191428.
Attachment #8645743 - Attachment is obsolete: true
Attachment #8645743 - Flags: review?(sarentz)
Resolving for now. Will retest in build 30.
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: