You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* The issue hapens due to the race between setting the _session to nil in the -URLSession:didBecomeInvalidWithError: delegate method and calling NSURLSession’s finishTasksAndInvalidate when closing the CBLRemoteSession. The issue is a regression of fixing #1429 (race of resetting _allRequests).
* Solution: created a strong session that will exists through the block execution.
* Note: Calling NSURLSessions’s -finishTasksAndInvalidate after the sesion is invalidated is no-ops operation (from manual testing).
#1923
Hi,
We are testing continuous PTX messages with below operation
Sometimes we observe below crash, attached console logs
2017-10-04 11:59:09.833717+0530 AT&T EPTT[3684:1897060] COUCH LOG:Type-Router , Message-POST http://lite.couchbase./_replicate + 267-byte body
User-Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 10_3_3 like Mac OS X) AppleWebKit/603.3.8 (KHTML, like Gecko) Mobile/14G60
Accept: application/json
Content-Type: application/json
Origin: file://
2017-10-04 11:59:09.835069+0530 AT&T EPTT[3684:1897060] COUCH LOG:Type-Sync , Message-CBLRestPuller[https://919999990011:@syncqc11.hsqc.com/ptxdata] STARTING ...
2017-10-04 11:59:09.841883+0530 AT&T EPTT[3684:1897060] COUCH LOG:Type-Sync , Message-CBLRestPuller[https://919999990011:@syncqc11.hsqc.com/ptxdata]: Reachability state = <syncqc11.hsqc.com>:reachable (02), suspended=0
2017-10-04 11:59:09.842158+0530 AT&T EPTT[3684:1897060] COUCH LOG:Type-Sync , Message-CBLRestPuller[https://919999990011:@syncqc11.hsqc.com/ptxdata]: Going online
2017-10-04 11:59:09.842575+0530 AT&T EPTT[3684:1897060] COUCH LOG:Type-Sync , Message-CBLRestPuller[https://919999990011:@syncqc11.hsqc.com/ptxdata] Progress: set active = 1
2017-10-04 11:59:09.844416+0530 AT&T EPTT[3684:1897060] COUCH LOG:Type-RemoteRequest , Message-Added Authorization header for CBLPasswordAuthorizer[919999990011/]
2017-10-04 11:59:09.847401+0530 AT&T EPTT[3684:1897060] COUCH LOG:Type-RemoteRequest , Message-CBLRemoteJSONRequest[GET https://919999990011:@syncqc11.hsqc.com/ptxdata/_local/487a7d1f57a2ec840f11a305df8a2963627fc9f6]: Starting...
2017-10-04 11:59:09.848007+0530 AT&T EPTT[3684:1897060] COUCH LOG:Type-Router , Message-Response -- status=200, body=24 bytes
Server: CouchbaseLite 1.3.1 unofficial: commit
Content-Type: application/json
2017-10-04 11:59:09.848604+0530 AT&T EPTT[3684:1897060] COUCH LOG:Type-Router , Message-POST http://lite.couchbase./_replicate + 176-byte body
User-Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 10_3_3 like Mac OS X) AppleWebKit/603.3.8 (KHTML, like Gecko) Mobile/14G60
Accept: application/json
Content-Type: application/json
Origin: file://
2017-10-04 11:59:09.848647+0530 AT&T EPTT[3684:1900940] COUCH LOG:Type-RemoteRequest , Message-CBLRemoteSession starting CBLRemoteJSONRequest[GET https://919999990011:@syncqc11.hsqc.com/ptxdata/_local/487a7d1f57a2ec840f11a305df8a2963627fc9f6]
2017-10-04 11:59:09.849294+0530 AT&T EPTT[3684:1897060] COUCH LOG:Type-Sync , Message-CBLRestPusher[https://919999990011:@syncqc11.hsqc.com/ptxdata] STARTING ...
2017-10-04 11:59:09.865571+0530 AT&T EPTT[3684:1897060] COUCH LOG:Type-Sync , Message-CBLRestPusher[https://919999990011:@syncqc11.hsqc.com/ptxdata]: Reachability state = <syncqc11.hsqc.com>:reachable (02), suspended=0
2017-10-04 11:59:09.866024+0530 AT&T EPTT[3684:1897060] COUCH LOG:Type-Sync , Message-CBLRestPusher[https://919999990011:@syncqc11.hsqc.com/ptxdata]: Going online
2017-10-04 11:59:09.866384+0530 AT&T EPTT[3684:1897060] COUCH LOG:Type-Sync , Message-CBLRestPusher[https://919999990011:@syncqc11.hsqc.com/ptxdata] Progress: set active = 1
2017-10-04 11:59:09.866691+0530 AT&T EPTT[3684:1897060] COUCH LOG:Type-RemoteRequest , Message-Added Authorization header for CBLPasswordAuthorizer[919999990011/]
2017-10-04 11:59:09.866927+0530 AT&T EPTT[3684:1897060] COUCH LOG:Type-RemoteRequest , Message-CBLRemoteJSONRequest[GET https://919999990011:@syncqc11.hsqc.com/ptxdata/_local/4d8aad54627dda98a3b609396c3947e85f7f8e95]: Starting...
2017-10-04 11:59:09.868902+0530 AT&T EPTT[3684:1897060] COUCH LOG:Type-Router , Message-Response -- status=200, body=24 bytes
Server: CouchbaseLite 1.3.1 unofficial: commit
Content-Type: application/json
2017-10-04 11:59:09.874690+0530 AT&T EPTT[3684:1901029] COUCH LOG:Type-RemoteRequest , Message-CBLRemoteSession starting CBLRemoteJSONRequest[GET https://919999990011:@syncqc11.hsqc.com/ptxdata/_local/4d8aad54627dda98a3b609396c3947e85f7f8e95]
2017-10-04 11:59:09.902833+0530 AT&T EPTT[3684:1897067] COUCH LOG:Type-Router , Message- Runninf the router request on server thread
2017-10-04 11:59:09.903314+0530 AT&T EPTT[3684:1897060] COUCH LOG:Type-Router , Message-GET http://lite.couchbase./ptxdata/s919999990011_ptx1507098215332_a1507098215333_attachment.doc
User-Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 10_3_3 like Mac OS X) AppleWebKit/603.3.8 (KHTML, like Gecko) Mobile/14G60
Accept: application/json
Content-Type: application/json
2017-10-04 11:59:09.904558+0530 AT&T EPTT[3684:1897060] COUCH LOG:Type-Router , Message-Response -- status=200, body=563 bytes
Server: CouchbaseLite 1.3.1 unofficial: commit
Accept-Ranges: bytes
Cache-Control: must-revalidate
Content-Type: application/json
Etag: "2-c29e2b0b7c42eaf6381d77dc04777f63"
2017-10-04 11:59:09.965843+0530 AT&T EPTT[3684:1897067] COUCH LOG:Type-Router , Message- Runninf the router request on server thread
2017-10-04 11:59:09.966255+0530 AT&T EPTT[3684:1897060] COUCH LOG:Type-Router , Message-GET http://lite.couchbase./_active_tasks
User-Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 10_3_3 like Mac OS X) AppleWebKit/603.3.8 (KHTML, like Gecko) Mobile/14G60
Accept: application/json
Content-Type: application/json
2017-10-04 11:59:09.967455+0530 AT&T EPTT[3684:1897060] COUCH LOG:Type-Router , Message-Response -- status=200, body=993 bytes
Server: CouchbaseLite 1.3.1 unofficial: commit
Accept-Ranges: bytes
Cache-Control: must-revalidate
Content-Type: application/json
2017-10-04 11:59:09.984779+0530 AT&T EPTT[3684:1897067] COUCH LOG:Type-Router , Message- Runninf the router request on server thread
2017-10-04 11:59:09.985315+0530 AT&T EPTT[3684:1897060] COUCH LOG:Type-Router , Message-POST http://lite.couchbase./_replicate + 251-byte body
User-Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 10_3_3 like Mac OS X) AppleWebKit/603.3.8 (KHTML, like Gecko) Mobile/14G60
Accept: application/json
Content-Type: application/json
Origin: file://
2017-10-04 11:59:09.986353+0530 AT&T EPTT[3684:1897060] COUCH LOG:Type-Sync , Message-CBLRestPuller[https://919999990011:@locqc11.hsqc.com/ptxdata] STARTING ...
2017-10-04 11:59:09.988610+0530 AT&T EPTT[3684:1897060] COUCH LOG:Type-Sync , Message-CBLRestPuller[https://919999990011:@locqc11.hsqc.com/ptxdata]: Reachability state = <locqc11.hsqc.com>:reachable (02), suspended=0
2017-10-04 11:59:09.989099+0530 AT&T EPTT[3684:1897060] COUCH LOG:Type-Sync , Message-CBLRestPuller[https://919999990011:@locqc11.hsqc.com/ptxdata]: Going online
]2017-10-04 11:59:09.990938+0530 AT&T EPTT[3684:1897060] COUCH LOG:Type-Sync , Message-CBLRestPuller[https://919999990011:@locqc11.hsqc.com/ptxdata]: No local checkpoint; not getting remote one
2017-10-04 11:59:09.991411+0530 AT&T EPTT[3684:1897060] COUCH LOG:Type-Sync , Message-CBLRestPuller[https://919999990011:*****@locqc11.hsqc.com/ptxdata] Progress: set active = 1
2017-10-04 11:59:10.004788+0530 AT&T EPTT[3684:1897060] COUCH LOG:Type-ChangeTracker , Message-CBLSocketChangeTracker[0x1c659db40 ptxdata]: Started... https://919999990011:*****@locqc11.hsqc.com/ptxdata/_changes?feed=normal&heartbeat=90000&style=all_docs&filter=sync_gateway/bychannel
2017-10-04 11:59:10.005322+0530 AT&T EPTT[3684:1897060] COUCH LOG:Type-Router , Message-Response -- status=200, body=24 bytes
Server: CouchbaseLite 1.3.1 unofficial: commit
Content-Type: application/json
2017-10-04 11:59:10.016939+0530 AT&T EPTT[3684:1897060] COUCH LOG:Type-Router , Message-POST http://lite.couchbase./_replicate + 175-byte body
User-Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 10_3_3 like Mac OS X) AppleWebKit/603.3.8 (KHTML, like Gecko) Mobile/14G60
Accept: application/json
Content-Type: application/json
Origin: file://
2017-10-04 11:59:10.017325+0530 AT&T EPTT[3684:1897067] COUCH LOG:Type-Router , Message- Runninf the router request on server thread
2017-10-04 11:59:10.017843+0530 AT&T EPTT[3684:1897060] COUCH LOG:Type-Sync , Message-CBLRestPusher[https://919999990011:@locqc11.hsqc.com/ptxdata] STOPPING...
2017-10-04 11:59:10.018403+0530 AT&T EPTT[3684:1897060] COUCH LOG:Type-Router , Message-GET http://lite.couchbase./ptxdata/s919999990011_ptx1507098233126_a1507098233127_attachment.doc
User-Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 10_3_3 like Mac OS X) AppleWebKit/603.3.8 (KHTML, like Gecko) Mobile/14G60
Accept: application/json
Content-Type: application/json
2017-10-04 11:59:10.019221+0530 AT&T EPTT[3684:1897060] COUCH LOG:Type-Router , Message-Response -- status=200, body=563 bytes
Server: CouchbaseLite 1.3.1 unofficial: commit
Accept-Ranges: bytes
Cache-Control: must-revalidate
Content-Type: application/json
Etag: "2-60d86d89b9058a4f3460d42551b9065d"
2017-10-04 11:59:10.019887+0530 AT&T EPTT[3684:1897060] COUCH LOG:Type-Router , Message-GET http://lite.couchbase./ptxdata/s919999990011_ptx1507098319230_a1507098319231_attachment.doc
User-Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 10_3_3 like Mac OS X) AppleWebKit/603.3.8 (KHTML, like Gecko) Mobile/14G60
Accept: application/json
Content-Type: application/json
2017-10-04 11:59:10.020631+0530 AT&T EPTT[3684:1897060] COUCH LOG:Type-Router , Message-Response -- status=200, body=564 bytes
Server: CouchbaseLite 1.3.1 unofficial: commit
Accept-Ranges: bytes
Cache-Control: must-revalidate
Content-Type: application/json
Etag: "2-b569b98b7e6c2795e4363c6a2d4f3926"
2017-10-04 11:59:10.033096+0530 AT&T EPTT[3684:1897060] COUCH LOG:Type-RemoteRequest , Message-CBLRemoteJSONRequest[PUT https://919999990011:@syncqc11.hsqc.com/ptxdata/_local/4d8aad54627dda98a3b609396c3947e85f7f8e95]: Got response, status 201
2017-10-04 11:59:10.038417+0530 AT&T EPTT[3684:1900817] COUCH LOG:Type-RemoteRequest , Message-CBLRemoteSession done with CBLRemoteJSONRequest[PUT https://919999990011:@syncqc11.hsqc.com/ptxdata/_local/4d8aad54627dda98a3b609396c3947e85f7f8e95]
2017-10-04 11:59:10.039094+0530 AT&T EPTT[3684:1897060] COUCH LOG:Type-RemoteRequest , Message-CBLRemoteJSONRequest[PUT https://919999990011:@syncqc11.hsqc.com/ptxdata/_local/4d8aad54627dda98a3b609396c3947e85f7f8e95]: Finished loading
2017-10-04 11:59:10.039692+0530 AT&T EPTT[3684:1897060] COUCH LOG:Type-Sync , Message-CBLRestPusher[https://919999990011:@syncqc11.hsqc.com/ptxdata] Progress: set active = 0
2017-10-04 11:59:10.040150+0530 AT&T EPTT[3684:1897060] COUCH LOG:Type-Sync , Message-CBLRestPusher[https://919999990011:@syncqc11.hsqc.com/ptxdata] STOPPED
2017-10-04 11:59:10.040405+0530 AT&T EPTT[3684:1897060] COUCH LOG:Type-(null) , Message-Replication: CBLRestPusher[https://919999990011:*****@syncqc11.hsqc.com/ptxdata] took 54.402 sec; error=(null)
2017-10-04 11:59:10.041790+0530 AT&T EPTT[3684:1900940] COUCH LOG:Type-RemoteRequest , Message-CBLRemoteSession closed
2017-10-04 11:59:10.042194+0530 AT&T EPTT[3684:1900940] COUCH LOG:Type-RemoteRequest , Message-CBLRemoteSession closing
(lldb) bt
objc_msgSend + 28 frame #1: 0x000000018f9ba988 CFNetwork
__40-[NSURLSession finishTasksAndInvalidate]_block_invoke + 36frame Convert
TDUITableSource
toCBLUITableSource
in Interface Builder. #2: 0x000000010154e154 libclang_rt.asan_ios_dynamic.dylib__wrap_dispatch_async_block_invoke + 272 frame #3: 0x00000001013c1a50 libdispatch.dylib
_dispatch_call_block_and_release + 24frame Creating DB with invalid name fails silently #4: 0x00000001013c1a10 libdispatch.dylib
_dispatch_client_callout + 16 frame #5: 0x00000001013cf2e8 libdispatch.dylib
_dispatch_queue_serial_drain + 1140frame No public API to access local documents #6: 0x00000001013c5634 libdispatch.dylib
_dispatch_queue_invoke + 852 frame #7: 0x00000001013d1630 libdispatch.dylib
_dispatch_root_queue_drain + 552frame UICollectionViewDataSource using CBLLiveQuery #8: 0x00000001013d139c libdispatch.dylib
_dispatch_worker_thread3 + 140 frame #9: 0x000000018e29f100 libsystem_pthread.dylib
_pthread_wqthread + 1096frame attachment bodyURL returning file path with generic extension '.blob' #10: 0x000000018e29ecac libsystem_pthread.dylib
start_wqthread + 4 (lldb) thread info -s thread #153: tid = 0x1d0111, 0x000000018dc5415c libobjc.A.dylib
objc_msgSend + 28, queue = 'com.apple.NSURLSession-work', stop reason = EXC_BAD_ACCESS (code=1, address=0x7e8001682d000100)The text was updated successfully, but these errors were encountered: