Closed
Bug 1308014
Opened 9 years ago
Closed 9 years ago
assertion failure: guids.count > 99
Categories
(Firefox for iOS :: Data Storage, defect, P1)
Tracking
()
RESOLVED
FIXED
| Tracking | Status | |
|---|---|---|
| fxios | 6.0+ | --- |
People
(Reporter: jhugman, Assigned: sleroux, Mentored)
References
Details
Attachments
(1 file)
master is consistently crashing on or near startup with guids.count = 100.
2016-10-05 18:37:24.543 [Debug] [SQLiteHistory.swift:905] insertOrUpdatePlace(_:modified:) > Warning: history item zdzGeyaDGq4a changed both locally and remotely. Comparing timestamps from different clocks!
2016-10-05 18:37:24.566 [Debug] [SQLiteHistory.swift:905] insertOrUpdatePlace(_:modified:) > Warning: history item zzlVf0HUVwLr changed both locally and remotely. Comparing timestamps from different clocks!
2016-10-05 18:37:24.589 [Debug] [SQLiteHistory.swift:905] insertOrUpdatePlace(_:modified:) > Warning: history item _hNTNJn_gGZl changed both locally and remotely. Comparing timestamps from different clocks!
2016-10-05 18:37:24.609 [Debug] [SQLiteHistory.swift:905] insertOrUpdatePlace(_:modified:) > Warning: history item _UYYLbEVorIX changed both locally and remotely. Comparing timestamps from different clocks!
2016-10-05 18:37:24.845 [Debug] [Downloader.swift:192] handleSuccess > Advancing baseTimestamp to 1475679946850 - 1
2016-10-05 18:37:24.846 [Debug] [Downloader.swift:204] handleSuccess > Advancing lastModified to Optional(1475679946850) ?? 1475679946850.
2016-10-05 18:37:24.849 [Debug] [BrowserDB.swift:287] checkpoint() > Checkpointing a BrowserDB.
2016-10-05 18:37:24.850 [Debug] [SwiftData.swift:552] checkpoint > Running WAL checkpoint on /private/var/mobile/Containers/Shared/AppGroup/164B3ACE-AED1-4D71-8038-FCA63B1E3A7A/profile.profile/browser.db on thread <NSThread: 0x170275640>{number = 3, name = (null)}.
2016-10-05 18:37:24.851 [Debug] [SwiftData.swift:554] checkpoint > WAL checkpoint done on /private/var/mobile/Containers/Shared/AppGroup/164B3ACE-AED1-4D71-8038-FCA63B1E3A7A/profile.profile/browser.db.
2016-10-05 18:37:25.069 [Debug] [IndependentRecordSynchronizer.swift:88] uploadRecords(_:lastTimestamp:storageClient:onUpload:) > No modified records to upload.
2016-10-05 18:37:30.574 [Debug] [StorageClient.swift:356] failFromResponse > Status code: 200.
assertion failed: : file /Users/jhugman/workspaces/mozilla/firefox-ios/Storage/SQL/SQLiteHistory.swift, line 1073
2016-10-05 18:37:30.581336 Client[358:31376] assertion failed: : file /Users/jhugman/workspaces/mozilla/firefox-ios/Storage/SQL/SQLiteHistory.swift, line 1073
(Recorded Frame)
Date/Time: 2016-10-05 21:49:36.5528 +0100
Launch Time: 2016-10-05 21:49:20.5178 +0100
OS Version: iPhone OS 10.0.2 (14A456)
Report Version: 104
Exception Type: EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x0000000000000001, 0x000000010268ecc4
Triggered by Thread: 0
Filtered syslog:
None found
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libswiftCore.dylib 0x000000010268ecc4 0x102530000 + 1436868
1 libswiftCore.dylib 0x000000010268ecc4 0x102530000 + 1436868
2 Storage 0x0000000101c1d1f8 0x101b54000 + 823800
3 Storage 0x0000000101c1df1c 0x101b54000 + 827164
4 Sync 0x00000001021dcb34 0x1021ac000 + 199476
5 Sync 0x00000001021d7550 0x1021ac000 + 177488
6 Sync 0x00000001021d9c10 0x1021ac000 + 187408
7 Sync 0x00000001021d4598 0x1021ac000 + 165272
8 Shared 0x0000000101a285d4 0x101a00000 + 165332
9 Sync 0x00000001021d4708 0x1021ac000 + 165640
10 Sync 0x00000001021d4874 0x1021ac000 + 166004
11 Shared 0x0000000101a29a70 0x101a00000 + 170608
12 Deferred 0x0000000102476580 Deferred.(bindQueue<A> (OS_dispatch_queue, f : (A) -> Deferred<A1>) -> Deferred<A1>).(closure #1) (Deferred.swift:94)
13 Deferred 0x0000000102475d28 partial apply for Deferred.(uponQueue(OS_dispatch_queue, block : (A) -> ()) -> ()).(closure #2) (Deferred.swift:68)
14 libdispatch.dylib 0x000000018652d200 _dispatch_call_block_and_release + 24
15 libdispatch.dylib 0x000000018652d1c0 _dispatch_client_callout + 16
16 libdispatch.dylib 0x0000000186531d6c _dispatch_main_queue_callback_4CF + 1000
17 CoreFoundation 0x0000000187651f2c __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 12
18 CoreFoundation 0x000000018764fb18 __CFRunLoopRun + 1660
19 CoreFoundation 0x000000018757e048 CFRunLoopRunSpecific + 444
20 GraphicsServices 0x0000000189001198 GSEventRunModal + 180
21 UIKit 0x000000018d558628 -[UIApplication _run] + 684
22 UIKit 0x000000018d553360 UIApplicationMain + 208
23 Client 0x000000010038ccc4 0x10007c000 + 3214532
24 libdyld.dylib 0x00000001865605b8 start + 4
| Reporter | ||
Comment 1•9 years ago
|
||
master == f43a1d3
Comment 2•9 years ago
|
||
// TODO: support longer GUID lists.
Comment 3•9 years ago
|
||
MaxVariableNumber should be 999, not 99. This implies that you're uploading 1000+ deleted history items. Did you clear local history while Sync was enabled?
Comment 4•9 years ago
|
||
Oh, the 99 could be:
public func markAsSynchronized(guids: [GUID], modified: Timestamp) -> Deferred<Maybe<Timestamp>> {
// TODO: support longer GUID lists.
assert(guids.count < 99)
which looks wrong to me. That should be MaxVariableNumber.
Comment 5•9 years ago
|
||
And the proper fix for this is to chunk in both markAsSynchronized and markAsDeleted, as we do in SQLiteLogins:
public func removeLoginsWithGUIDs(guids: [GUID]) -> Success {
let timestamp = NSDate.now()
return db.run(chunk(guids, by: BrowserDB.MaxVariableNumber).flatMap {
self.getDeletionStatementsForGUIDs($0, nowMillis: timestamp)
}) >>> effect(self.notifyLoginDidChange)
}
My bad for not filing the follow-up to do so…
Updated•9 years ago
|
| Assignee | ||
Comment 7•9 years ago
|
||
Causing crashes in testing and debug builds. Potentially can causes strange behavior for release clients. Moving to P1.
Assignee: nobody → sleroux
Status: NEW → ASSIGNED
Priority: -- → P1
| Assignee | ||
Comment 8•9 years ago
|
||
Attachment #8803961 -
Flags: review?(rnewman)
Comment 9•9 years ago
|
||
Comment on attachment 8803961 [details]
Link to Github pull-request: https://github.com/mozilla-mobile/firefox-ios/pull/2187
r+ with nits. Thanks for jumping on this!
Attachment #8803961 -
Attachment description: Link to Github pull-request: https://github.com/mozilla-mobile/firefox-ios/pull/2187#attch-to-bugzilla → Link to Github pull-request: https://github.com/mozilla-mobile/firefox-ios/pull/2187
Attachment #8803961 -
Flags: review?(rnewman) → review+
| Assignee | ||
Comment 10•9 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
| Assignee | ||
Updated•9 years ago
|
You need to log in
before you can comment on or make changes to this bug.
Description
•