Closed Bug 1386494 Opened 7 years ago Closed 6 years ago

Simultaneous accesses by SQLiteHistory.addLocalVisitForExistingSite()

Categories

(Firefox for iOS :: Data Storage, defect)

Other
iOS
defect
Not set
normal

Tracking

()

RESOLVED INACTIVE

People

(Reporter: farhan, Unassigned)

References

Details

(Whiteboard: [MobileCore][DataLoss])

In xcode9, sqlite seems to dump errors when Simultaneous read/writes are happening. here is a sample of 2 writes that are happening when visiting any page and adding items to your history. To reproduce this, Checkout my xcode-9 branch at mozilla-mobile/firefox-ios/xcode-9 and build with xcode9-beta 4. I dont think this is an iOS11 specific thing rather this looks like an issue that has always existed but that is now being reported. This one looks related to the Youtube history bug we fixed. I think Profile.onLocationChange is being called too frequently. Simultaneous accesses to 0x600000823cd0, but modification requires exclusive access. Previous access (a modification) started at Storage`SQLiteHistory.addLocalVisitForExistingSite(_:) + 384 (0x106a2f1b0). Current access (a modification) started at: 0 libswiftCore.dylib 0x000000010d3880e0 swift_beginAccess + 505 1 Storage 0x0000000106a2f2a0 closure #1 in SQLiteHistory.addLocalVisitForExistingSite(_:) + 1709 2 Storage 0x0000000106a31280 partial apply for closure #1 in SQLiteHistory.addLocalVisitForExistingSite(_:) + 86 3 Storage 0x0000000106a2e390 thunk for @callee_owned (@in SQLiteDBConnection, @inout NSError?) -> (@unowned Int) + 16 4 Storage 0x0000000106a31320 thunk for @callee_owned (@in SQLiteDBConnection, @inout NSError?) -> (@unowned Int)partial apply + 82 5 Storage 0x0000000106aff530 closure #1 in BrowserDB.withConnection<A>(flags:err:callback:) + 277 6 Storage 0x0000000106aff880 partial apply for closure #1 in BrowserDB.withConnection<A>(flags:err:callback:) + 106 7 Storage 0x0000000106b2e270 closure #1 in SwiftData.withConnection(_:synchronous:cb:) + 957 8 Storage 0x0000000106b3db80 partial apply for closure #1 in SwiftData.withConnection(_:synchronous:cb:) + 121 9 Storage 0x0000000106b29b10 thunk for @callee_owned () -> () + 41 10 libdispatch.dylib 0x000000010e01834c _dispatch_client_callout + 8 11 libdispatch.dylib 0x000000010e01f072 _dispatch_queue_barrier_sync_invoke_and_complete + 392 12 Storage 0x0000000106b2dde0 SwiftData.withConnection(_:synchronous:cb:) + 596 13 Storage 0x0000000106aff1b0 BrowserDB.withConnection<A>(flags:err:callback:) + 469 14 Storage 0x0000000106aff8f0 BrowserDB.withConnection<A>(_:callback:) + 113 15 Storage 0x0000000106a2f030 SQLiteHistory.addLocalVisitForExistingSite(_:) + 433 16 Storage 0x0000000106a2fc00 closure #1 in SQLiteHistory.addLocalVisit(_:) + 47 17 Storage 0x0000000106a313c0 partial apply for closure #1 in SQLiteHistory.addLocalVisit(_:) + 67 18 Shared 0x0000000106837400 closure #1 in >>> infix<A, B>(_:_:) + 333 19 Shared 0x000000010683ace0 partial apply for closure #1 in >>> infix<A, B>(_:_:) + 98 20 Deferred 0x000000010ced1140 specialized closure #1 in Deferred.bindQueue<A>(_:f:) + 53 21 Deferred 0x000000010ced2280 partial apply for closure #1 in Deferred.bindQueue<A>(_:f:) + 100 22 Deferred 0x000000010ced0df0 specialized closure #2 in Deferred._fill(_:assertIfFilled:) + 90 23 Deferred 0x000000010ced0ad0 partial apply for closure #2 in Deferred.uponQueue(_:block:) + 68 24 Deferred 0x000000010cece360 thunk for @callee_owned () -> () + 32 25 libdispatch.dylib 0x000000010e017303 _dispatch_call_block_and_release + 12 26 libdispatch.dylib 0x000000010e01834c _dispatch_client_callout + 8 27 libdispatch.dylib 0x000000010e01cbf0 _dispatch_queue_override_invoke + 1458 28 libdispatch.dylib 0x000000010e023cf3 _dispatch_root_queue_drain + 772 29 libdispatch.dylib 0x000000010e023c83 _dispatch_worker_thread4 + 44 30 libsystem_pthread.dylib 0x000000010e48408f _pthread_wqthread + 1299 31 libsystem_pthread.dylib 0x000000010e484070 start_wqthread + 13
Flags: needinfo?(jdarcangelo)
Flags: needinfo?(jdarcangelo) → needinfo?(rnewman)
See Also: → 1386492
Whiteboard: [MobileCore][DataLoss]
This *should* go away once Bug 1388563 is fixed.
Depends on: 1388563
Flags: needinfo?(rnewman)
this also fails a large number of UITests as well. Affected tests will be disabled.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → INVALID
Resolution: INVALID → INACTIVE
You need to log in before you can comment on or make changes to this bug.