site_archiver@lists.apple.com Delivered-To: macnetworkprog@lists.apple.com Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:message-id:mime-version:subject:to:x-me-sender :x-me-sender:x-sasl-enc:x-sasl-enc; s=fm1; bh=PKDhCPLWvJetwzSaFg xxzr/SNrBQXqmARYe5SnUJX6Q=; b=risiMbq8uzaavWAAzoBfMeblHIeLAts2X9 MgNXh+U6J+kJuTqZW0ZKy2FWgH25rUv71EZ+ZABMhk2pQEgkL/mbDBd/hZ7eCdbp 3AtbgVq+GuAcs7X0/i6FVaVCbBzCacUKi/35MuvbrGAgpgcazwDEgs2tSE+hjSOC 0yWCnoaYX4MOAr4mdphy+bkOsD37Lqjy05EBmABQSC0uMC9kwzg2LQVOzbM+lter hT5RYdk4q841j3CFoubKoxVZW2Sk72uU4qCBKiDFvNDs9v2OKLQwUo49Yt9poCKL mwlznKhZf8c5WO3UQ0/Ah4S9hXsHO8h/aRHqtsFe4vlHZGt5t/ww== I work on an app that talks to a special camera over Wi-Fi. We use HTTP[S] to control the camera and get data from it. We use NSURLConnection with a delegate. Network operations are called from the main queue and call back on the main queue. This has been working well for years. But recently, we're making enhancements to the camera that result in fast data acquisition times, and some of the sets of transfers we do has changed. Every now and again (while running in the iPad simulator on macOS 10.12.5), the simulator crashes as shown below, with EXC_BAD_ACCESS (code=EXC_i386_GPFLT). %rsi seems completely bogus (0x894c27ebeb74c084). %rax is 0xfb8be8e6894cff00. None of my other stacks are any more useful than this one, in that none of them shows execution in my own code beyond main(), except for one thread that's doing processing (via dispatch_async()) of the data that was returned in the network call, on a concurrent queue. That processing is completely self-contained, and the result is handled via dispatch_async() to the main queue. Any suggestions on what might be causing this? Thanks! libBacktraceRecording.dylib`__gcd_queue_item_enqueue_hook_block_invoke: 0x10f49ce32 <+0>: pushq %rbp 0x10f49ce33 <+1>: movq %rsp, %rbp -> 0x10f49ce36 <+4>: movq 0x20(%rsi), %rax 0x10f49ce3a <+8>: movq 0x20(%rdi), %rcx 0x10f49ce3e <+12>: cmpq 0x8(%rcx), %rax 0x10f49ce42 <+16>: sete %al 0x10f49ce45 <+19>: popq %rbp 0x10f49ce46 <+20>: retq Thread 26Queue : com.apple.CFNetwork.Connection (serial) #0 0x000000010f49ce36 in __gcd_queue_item_enqueue_hook_block_invoke () #1 0x000000010f49c4c5 in gcd_queue_item_enqueue_hook () #2 0x00000001173afc91 in _dispatch_introspection_queue_item_enqueue_hook () #3 0x000000011738a188 in _dispatch_queue_push () #4 0x00000001178cd78a in nw_connection_read () #5 0x00000001178d90bc in tcp_connection_read () #6 0x000000010fda9dd1 in TCPIOConnection::read(unsigned long, unsigned long, void (dispatch_data_s*, CFStreamError) block_pointer) () #7 0x000000010fdacae0 in HTTPEngine::_getBodyIntelligently(void (dispatch_data_s*, CFStreamError, bool) block_pointer) () #8 0x000000010fdac656 in HTTPEngine::_readBodyStartNextRead() () #9 0x000000010ff85fbb in ___ZN10HTTPEngine21_getBodyIntelligentlyEU13block_pointerFvP15dispatch_data_s13CFStreamErrorbE_block_invoke () #10 0x000000010fdab55a in ___ZN15TCPIOConnection4readEmmU13block_pointerFvP15dispatch_data_s13CFStreamErrorE_block_invoke () #11 0x00000001173854a6 in _dispatch_call_block_and_release () #12 0x00000001173ae05c in _dispatch_client_callout () #13 0x000000011738c94f in _dispatch_queue_serial_drain () #14 0x000000011738d669 in _dispatch_queue_invoke () #15 0x000000011738fec4 in _dispatch_root_queue_drain () #16 0x000000011738fbef in _dispatch_worker_thread3 () #17 0x00000001177455a2 in _pthread_wqthread () #18 0x000000011774507d in start_wqthread () Enqueued from com.apple.network.connections (Thread 34)Queue : com.apple.network.connections (serial) #0 0x000000011738a188 in _dispatch_queue_push () #1 0x00000001178cdb49 in __nw_connection_read_block_invoke.122 () #2 0x0000000117617564 in nw_read_request_complete () #3 0x000000011761829a in nw_read_request_consume_data () #4 0x0000000117898cf3 in nw_endpoint_flow_service_reads () #5 0x00000001178bcf25 in nw_socket_update_input_source () #6 0x00000001173ae05c in _dispatch_client_callout () #7 0x000000011738ac6e in _dispatch_continuation_pop () #8 0x000000011739f9fc in _dispatch_source_latch_and_call () #9 0x00000001173984f1 in _dispatch_source_invoke () #10 0x000000011738cc47 in _dispatch_queue_serial_drain () #11 0x000000011738d669 in _dispatch_queue_invoke () #12 0x000000011738fec4 in _dispatch_root_queue_drain () #13 0x000000011738fbef in _dispatch_worker_thread3 () #14 0x00000001177455a2 in _pthread_wqthread () #15 0x000000011774507d in start_wqthread () -- Rick Mann rmann@latencyzero.com _______________________________________________ Do not post admin requests to the list. They will be ignored. Macnetworkprog mailing list (Macnetworkprog@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/macnetworkprog/site_archiver%40lists... This email sent to site_archiver@lists.apple.com