Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crashed on using Device Sync #8346

Closed
veluloganathan opened this issue Sep 1, 2023 · 10 comments
Closed

Crashed on using Device Sync #8346

veluloganathan opened this issue Sep 1, 2023 · 10 comments

Comments

@veluloganathan
Copy link

veluloganathan commented Sep 1, 2023

How frequently does the bug occur?

Sometimes

Description

Help us to fix this crash happening frequently but not all the time.

Crashed: Thread
0  libsystem_kernel.dylib         0x7578 __pthread_kill + 8
1  libsystem_pthread.dylib        0x7118 pthread_kill + 268
2  libsystem_c.dylib              0x1d178 abort + 180
3  App                             0x7ce4b4 realm::util::terminate(char const*, char const*, long, std::initializer_list<realm::util::Printable>&&) + 148 (terminate.cpp:148)
4  App                             0x7ce6f4 realm::util::terminate_internal(std::__1::basic_stringstream<char, std::__1::char_traits<char>, std::__1::allocator<char>>&) + 143 (terminate.cpp:143)
5  App                             0x7ce5d4 realm::util::terminate_with_info(char const*, char const*, long, char const*, std::initializer_list<realm::util::Printable>&&) + 156 (terminate.cpp:156)
6  App                             0x542700 realm::SlabAlloc::free_block(unsigned long, realm::SlabAlloc::FreeBlock*) + 591 (alloc_slab.cpp:591)
7  App                             0x5424e0 realm::SlabAlloc::do_free(unsigned long, char*) + 541 (alloc_slab.cpp:541)
8  App                             0x5ceb34 realm::Node::do_copy_on_write(unsigned long) + 168 (node.cpp:168)
9  App                             0x547c20 realm::Array::set(unsigned long, long long) + 985 (array.hpp:985)
10 App                             0x5ceb08 realm::Node::do_copy_on_write(unsigned long) + 264 (node.hpp:264)
11 App                             0x547c20 realm::Array::set(unsigned long, long long) + 985 (array.hpp:985)
12 App                             0x7550d4 realm::sync::ClientHistory::update_sync_progress(realm::sync::SyncProgress const&, unsigned long long const*, std::__1::shared_ptr<realm::Transaction>) + 837 (client_history_impl.cpp:837)
13 App                             0x754e70 realm::sync::ClientHistory::set_sync_progress(realm::sync::SyncProgress const&, unsigned long long const*, realm::sync::VersionInfo&) + 701 (shared_ptr.h:701)
14 App                             0x7621bc realm::sync::ClientImpl::Session::integrate_changesets(realm::sync::ClientReplication&, realm::sync::SyncProgress const&, unsigned long long, std::__1::vector<realm::sync::Transformer::RemoteChangeset, std::__1::allocator<realm::sync::Transformer::RemoteChangeset>> const&, realm::sync::VersionInfo&, realm::sync::DownloadBatchState) + 1506 (client_impl_base.cpp:1506)
15 App                             0x7247e0 realm::sync::ClientImpl::Session::initiate_integrate_changesets(unsigned long long, realm::sync::DownloadBatchState, realm::sync::SyncProgress const&, std::__1::vector<realm::sync::Transformer::RemoteChangeset, std::__1::allocator<realm::sync::Transformer::RemoteChangeset>> const&) + 825 (client.cpp:825)
16 App                             0x7611fc realm::sync::ClientImpl::Session::receive_download_message(realm::sync::SyncProgress const&, unsigned long long, realm::sync::DownloadBatchState, long long, std::__1::vector<realm::sync::Transformer::RemoteChangeset, std::__1::allocator<realm::sync::Transformer::RemoteChangeset>> const&) + 2406 (client_impl_base.cpp:2406)
17 App                             0x767dc0 void realm::_impl::ClientProtocol::parse_download_message<realm::sync::ClientImpl::Connection>(realm::sync::ClientImpl::Connection&, realm::_impl::HeaderLineParser&) + 490 (protocol_codec.hpp:490)
18 App                             0x75e85c void realm::_impl::ClientProtocol::parse_message_received<realm::sync::ClientImpl::Connection>(realm::sync::ClientImpl::Connection&, std::__1::basic_string_view<char, std::__1::char_traits<char>>) + 242 (protocol_codec.hpp:242)
19 App                             0x75c6d4 realm::sync::ClientImpl::Connection::websocket_binary_message_received(realm::util::Span<char const, 18446744073709551615ul>) + 290 (unique_ptr.h:290)
20 App                             0x74f0e8 (anonymous namespace)::WebSocket::frame_reader_loop() + 1007 (websocket.cpp:1007)
21 App                             0x74311c realm::util::UniqueFunction<void (std::__1::error_code, unsigned long)>::operator()(std::__1::error_code, unsigned long) const + 94 (functional.hpp:94)
22 App                             0x743068 void realm::sync::network::Service::AsyncOper::do_recycle_and_execute<realm::util::UniqueFunction<void (std::__1::error_code, unsigned long)>, std::__1::error_code&, unsigned long&>(bool, realm::util::UniqueFunction<void (std::__1::error_code, unsigned long)>&, std::__1::error_code&, unsigned long&) + 302 (unique_ptr.h:302)
23 App                             0x742b60 realm::sync::network::Service::BasicStreamOps<realm::sync::network::ssl::Stream>::BufferedReadOper<realm::util::UniqueFunction<void (std::__1::error_code, unsigned long)>>::recycle_and_execute() + 2638 (network.hpp:2638)
24 App                             0x748ac0 realm::sync::network::Service::Impl::run_impl(bool) + 1677 (network.hpp:1677)
25 App                             0x73ba54 realm::sync::websocket::DefaultSocketProvider::event_loop() + 598 (default_socket.cpp:598)
26 App                             0x73d310 void* std::__1::__thread_proxy[abi:v15006]<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*) + 259 (unique_ptr.h:259)
27 libsystem_pthread.dylib        0x16b8 _pthread_start + 148
28 libsystem_pthread.dylib        0xb88 thread_start + 8

Stacktrace & log output

No response

Can you reproduce the bug?

Sometimes

Reproduction Steps

No response

Version

10.42.1

What Atlas Services are you using?

Both Atlas Device Sync and Atlas App Services

Are you using encryption?

No

Platform OS and version(s)

iOS

Build environment

Xcode version: ...
Dependency manager and version: ...

@leemaguire
Copy link
Contributor

@veluloganathan Would you be able to give us a sample App that can reproduce this crash?

@veluloganathan
Copy link
Author

@leemaguire I don't have sample app. Happening in my prod app.

@veluloganathan
Copy link
Author

Here the one from Xcode Crashes

Screenshot 2023-09-01 at 12 05 49 PM

@nirinchev
Copy link
Member

@veluloganathan I'm assuming this is happening on your development devices? If so, can you share the corrupted Realm file? You can send it over in the email thread and I'll send it over to the core database team.

@veluloganathan
Copy link
Author

@nirinchev it's happening in appstore app not in development device.

@veluloganathan
Copy link
Author

Is this related to realm/realm-core#6813 ?

@nirinchev
Copy link
Member

nirinchev commented Sep 1, 2023

Yes, this is the most likely cause. The issue is that while we have received some reports of this occurring, we don't have enough information to reproduce it or corrupted files that we can investigate.

@veluloganathan
Copy link
Author

@nirinchev from our crash logs we have seen this happening in most iPhone 13 and 14 Pro

@sync-by-unito sync-by-unito bot removed the T-Bug label Sep 12, 2023
@nirinchev
Copy link
Member

This has been fixed and the fix was released in Realm Swift 10.42.2. Please update to that version and let us know if you encounter the problem again.

@veluloganathan
Copy link
Author

Great news! Thanks @nirinchev

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 17, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants