Uploaded image for project: 'Realm Cocoa SDK'
  1. Realm Cocoa SDK
  2. RCOCOA-2302

Crash in Realm Sync, realm::SyncSession::handle_location_update_failed, realm_core_v_13_26_0

      How frequently does the bug occur?

      Sometimes

      Description

      Since releasing an update with Realm Swift 10.47.0 a week ago, we're receiving a ton of crash reports for this issue. We've received 1273 crash reports across across 300 users. This is 10x higher than any other crash, and also 10x higher than all crashes from the previous version of Realm Swift in use, 10.43.0.

      Stacktrace & log output

      Unable to find source-code formatter for language: shell. Available languages are: actionscript, ada, applescript, bash, c, c#, c++, cpp, css, erlang, go, groovy, haskell, html, java, javascript, js, json, lua, none, nyan, objc, perl, php, python, r, rainbow, ruby, scala, sh, sql, swift, visualbasic, xml, yaml
      Logs:
      2024-03-08 13:41:55:417         <1877439> init(type:)(RealmManager.swift 27)
      2024-03-08 13:41:55:417  [INFO] REALM[ERROR] App: request location failed (CustomError -1200): An SSL error has occurred and a secure connection to the server cannot be made.
      2024-03-08 13:41:55:418         <1877428> handleSyncError(_:session:)(RealmCoordinator.swift 91)
      2024-03-08 13:41:55:418 [ERROR] Connection Failed: related decl 'e' for RLMSyncError(_nsError: Error Domain=io.realm.sync Code=12 "Unable to reach the server: An SSL error has occurred and a secure connection to the server cannot be made." UserInfo={NSLocalizedDescription=Unable to reach the server: An SSL error has occurred and a secure connection to the server cannot be made.})
      2024-03-08 13:41:55:589         <1877855> init(type:)(RealmManager.swift 27)
      2024-03-08 13:41:55:589  [INFO] REALM[ERROR] App: request location failed (CustomError -1200): An SSL error has occurred and a secure connection to the server cannot be made.
      
      ==============================================================================================
      Crash Report:
      Incident Identifier: 78ab8d4c-dccb-4eea-a024-d693500d9f9d
      CrashReporter Key:   6F19E5C8-EF0F-4AD7-B843-9643590523AD
      Hardware Model:      iPhone14,3
      Process:         xxxxxxxxxxxxxxxxxxx [4973]
      Path:            /private/var/containers/Bundle/Application/FE17F96D-8201-4975-BFE5-963B2B7EF5D8/xxxxxxxxxxxxxxxxxxx.app/xxxxxxxxxxxxxxxxxxx
      Identifier:      xxxxxxxxxxxxxxxxxxx
      Version:         2024.2.3 (500)
      Code Type:       arm64
      Parent Process:   [1]
      
      Date/Time:       2024-03-08T13:41:55.999Z
      Launch Time:     2024-03-08T13:40:31Z
      OS Version:      iPhone OS 17.4 (21E219)
      Report Version:  104
      
      Exception Type:  SIGABRT
      Exception Codes: #0 at 0x1edaf6974
      Crashed Thread:  12
      
      Thread 12 Crashed:
      0   libsystem_kernel.dylib               0x00000001edaf6974 __pthread_kill + 8
      1   libsystem_c.dylib                    0x00000001ad53fb80 abort + 176
      2   Realm                                0x000000010276a450 please_report_this_issue_in_github_realm_realm_core_v_13_26_0 + 8
      3   Realm                                0x000000010276a784 realm::util::terminate_internal(std::__1::basic_stringstream<char, std::__1::char_traits<char>, std::__1::allocator<char> >&) + 240
      4   Realm                                0x000000010276a5f4 realm::util::terminate_with_info(char const*, char const*, long, char const*, std::initializer_list<realm::util::Printable>&&) + 396
      5   Realm                                0x000000010276a464 realm::util::terminate(char const*, char const*, long, std::initializer_list<realm::util::Printable>&&) + 16
      6   Realm                                0x00000001028f41c8 realm::SyncSession::handle_location_update_failed(realm::Status) + 1004
      7   Realm                                0x00000001029011e0 realm::util::UniqueFunction<void (std::__1::optional<realm::app::AppError>)>::SpecificImpl<realm::SyncSession::handle_refresh(std::__1::shared_ptr<realm::SyncSession> const&, bool)::$_2>::call(std::__1::optional<realm::app::AppError>&&) + 996
      8   Realm                                0x000000010290b668 realm::util::UniqueFunction<void (std::__1::optional<realm::app::AppError>)>::SpecificImpl<realm::SyncUser::refresh_custom_data(bool, realm::util::UniqueFunction<void (std::__1::optional<realm::app::AppError>)>)::$_7>::call(std::__1::optional<realm::app::AppError>&&) + 316
      9   Realm                                0x00000001028c75d8 realm::util::UniqueFunction<void (realm::app::Response const&)>::SpecificImpl<realm::app::App::refresh_access_token(std::__1::shared_ptr<realm::SyncUser> const&, bool, realm::util::UniqueFunction<void (std::__1::optional<realm::app::AppError>)>&&)::$_12>::call(realm::app::Response const&) + 156
      10  Realm                                0x00000001028c6718 realm::util::UniqueFunction<void (std::__1::optional<realm::app::AppError>)>::SpecificImpl<realm::app::App::update_location_and_resend(realm::app::Request&&, realm::util::UniqueFunction<void (realm::app::Response const&)>&&, std::__1::optional<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >&&)::$_8>::call(std::__1::optional<realm::app::AppError>&&) + 176
      11  Realm                                0x00000001028c5a14 realm::util::UniqueFunction<void (realm::app::Request&&, realm::app::Response const&)>::SpecificImpl<realm::app::App::request_location(realm::util::UniqueFunction<void (std::__1::optional<realm::app::AppError>)>&&, std::__1::optional<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >&&, std::__1::optional<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >&&, int)::$_7>::call(realm::app::Request&&, realm::app::Response const&) + 816
      12  Realm                                0x00000001024c167c ___ZN12_GLOBAL__N_121CocoaNetworkTransport22send_request_to_serverERKN5realm3app7RequestEONS1_4util14UniqueFunctionIFvRKNS2_8ResponseEEEE_block_invoke (RLMApp.mm:78)
      13  Realm                                0x00000001024fe9b0 -[RLMSessionDelegate URLSession:task:didCompleteWithError:] (RLMNetworkTransport.mm:0)
      14  CFNetwork                            0x00000001a66d798c _CFNetworkSetHSTSStoragePath + 55244
      15  libdispatch.dylib                    0x00000001ad48513c _dispatch_call_block_and_release + 28
      16  libdispatch.dylib                    0x00000001ad486dd4 _dispatch_client_callout + 16
      17  libdispatch.dylib                    0x00000001ad48e400 _dispatch_lane_serial_drain + 744
      18  libdispatch.dylib                    0x00000001ad48ef64 _dispatch_lane_invoke + 428
      19  libdispatch.dylib                    0x00000001ad499cb4 _dispatch_root_queue_drain_deferred_wlh + 284
      20  libdispatch.dylib                    0x00000001ad499528 _dispatch_workloop_worker_thread + 400
      21  libsystem_pthread.dylib              0x0000000201574f20 _pthread_wqthread + 284
      22  libsystem_pthread.dylib              0x0000000201574fc0 start_wqthread + 4
      
      Thread 7:
      0   libsystem_kernel.dylib               0x00000001edafb8cc kevent + 8
      1   Realm                                0x00000001027bf8a8 realm::sync::network::Service::IoReactor::wait_and_advance(std::__1::chrono::time_point<std::__1::chrono::steady_clock, std::__1::chrono::duration<long long, std::__1::ratio<1l, 1000000000l> > >, std::__1::chrono::time_point<std::__1::chrono::steady_clock, std::__1::chrono::duration<long long, std::__1::ratio<1l, 1000000000l> > >, bool&, realm::sync::network::Service::OperQueue<realm::sync::network::Service::AsyncOper>&) + 40
      2   Realm                                0x00000001027c1bfc realm::sync::network::Service::Impl::run_impl(bool) + 348
      3   Realm                                0x00000001027b28ec realm::sync::websocket::DefaultSocketProvider::event_loop() + 216
      4   Realm                                0x00000001027b4a8c void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, void (realm::sync::websocket::DefaultSocketProvider::*)(), realm::sync::websocket::DefaultSocketProvider*> >(void*) + 60
      5   libsystem_pthread.dylib              0x0000000201575a90 _pthread_start + 132
      6   libsystem_pthread.dylib              0x0000000201574fcc thread_start + 4
      
      Thread 8:
      0   libsystem_kernel.dylib               0x00000001edafb8cc kevent + 8
      1   Realm                                0x00000001028424c4 std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, realm::_impl::ExternalCommitHelper::ExternalCommitHelper(realm::_impl::RealmCoordinator&, realm::RealmConfig const&)::$_0> >(void*, void*) + 48
      2   libsystem_pthread.dylib              0x0000000201575a90 _pthread_start + 132
      3   libsystem_pthread.dylib              0x0000000201574fcc thread_start + 4
      

      Can you reproduce the bug?

      No

      Reproduction Steps

      No response

      Version

      10.47.0

      What Atlas Services are you using?

      Atlas Device Sync

      Are you using encryption?

      No

      Platform OS and version(s)

      iOS (iPhone and iPad), 17.4, 17.3.1, 17.3, 17.2, 17.1.1, 16.3.1

      Build environment

      Xcode version: 15.2
      MacOS version: 14.1.3
      Dependency manager and version: CocoaPods 1.15.0

            Assignee:
            michael.wilkersonbarker@mongodb.com Michael Wilkerson-Barker (Inactive)
            Reporter:
            unitosyncbot Unito Sync Bot
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: