realm-core icon indicating copy to clipboard operation
realm-core copied to clipboard

Crash while consolidating freelist

Open rist opened this issue 2 years ago • 1 comments

SDK and version

SDK : Cocoa Version: 11.9.0

This happens on tvOS 15.3

Observations

  • How frequent do the crash occur? Haven't seen much instances yet
  • Does it happen in production or during dev/test? Production
  • Can the crash be reproduced by you? Unfortunately no
  • Can you provide instructions for how we can reproduce it? Unfortunately no

Crash log / stacktrace

OS Version: tvOS 15.3 (19K547)
Report Version: 104

Exception Type: Unknown (SIGABRT)
Crashed Thread: 18

Application Specific Information:
(prev_ref, prev_size, ref, i, limit, m_alloc.get_file_path_for_assertions())

Thread 18 Crashed:
0   libsystem_kernel.dylib          0x319f406f4         __pthread_kill
1   libsystem_pthread.dylib         0x31a088778         pthread_kill
2   libsystem_c.dylib               0x319dba0c8         abort
3   MUBITV                          0x201478464         please_report_this_issue_in_github_realm_realm_core (terminate.cpp:50)
4   MUBITV                          0x201478798         realm::util::terminate_internal (terminate.cpp:123)
5   MUBITV                          0x201478a50         realm::util::terminate_with_info (terminate.cpp:151)
6   MUBITV                          0x2011d7410         realm::util::terminate_with_info<T> (terminate.hpp:52)
7   MUBITV                          0x2011d6d14         realm::GroupWriter::recreate_freelist (group_writer.cpp:635)
8   MUBITV                          0x2011d5ba8         realm::GroupWriter::write_group (group_writer.cpp:436)
9   MUBITV                          0x2011b60b8         realm::DB::low_level_commit (db.cpp:2347)
10  MUBITV                          0x2011b5f48         realm::DB::do_commit (db.cpp:2168)
11  MUBITV                          0x2011b63b8         realm::Transaction::commit_and_continue_as_read (db.cpp:2187)
12  MUBITV                          0x20127de7c         realm::_impl::RealmCoordinator::commit_write (realm_coordinator.cpp:775)
13  MUBITV                          0x2012f2d8c         realm::Realm::commit_transaction (shared_realm.cpp:916)
14  MUBITV                          0x2010b3ff0         -[RLMRealm commitWriteTransactionWithoutNotifying:error:] (RLMRealm.mm:671)
15  MUBITV                          0x2010b4198         -[RLMRealm transactionWithoutNotifying:block:error:] (RLMRealm.mm:696)
16  MUBITV                          0x2010b40f8         -[RLMRealm transactionWithBlock:error:] (RLMRealm.mm:685)
17  MUBITV                          0x200f32728         Persistence.backgroundSave (Persistence.swift:268)
18  MUBITV                          0x200f5f7ec         thunk for closure
19  MUBITV                          0x200f34e70         thunk for closure
20  libswiftObjectiveC.dylib        0x34c7c9070         autoreleasepool<T>
21  MUBITV                          0x200f34e1c         [inlined] <redacted> (Persistence.swift:265)
22  MUBITV                          0x200f34e1c         Persistence.backgroundSave
23  MUBITV                          0x200d437fc         thunk for closure
24  libdispatch.dylib               0x319c51714         <redacted>
25  libdispatch.dylib               0x319c52f84         <redacted>
26  libdispatch.dylib               0x319c630c4         <redacted>
27  libdispatch.dylib               0x319c63790         <redacted>
28  libsystem_pthread.dylib         0x31a089440         _pthread_wqthread

Thread 0
0   libsystem_kernel.dylib          0x319f404c4         __psynch_cvwait
1   libsystem_pthread.dylib         0x31a08b02c         <redacted>
2   libc++.1.dylib                  0x3199ba588         std::__1::condition_variable::wait
3   MUBITV                          0x2011b74d8         realm::Transaction::wait_for_async_completion (db.hpp:728)
4   MUBITV                          0x2012f2b48         realm::Realm::begin_transaction (shared_realm.cpp:885)
5   MUBITV                          0x2010b3e68         -[RLMRealm beginWriteTransactionWithError:] (RLMRealm.mm:645)
6   MUBITV                          0x2010b4168         -[RLMRealm transactionWithoutNotifying:block:error:] (RLMRealm.mm:693)
7   MUBITV                          0x2010b40f8         -[RLMRealm transactionWithBlock:error:] (RLMRealm.mm:685)
8   MUBITV                          0x200f33050         Persistence.save (Persistence.swift:254)
9   MUBITV                          0x200f40604         [inlined] save
10  MUBITV                          0x200f40604         ViewingHelper.importViewings (ViewingHelper.swift:142)
11  MUBITV                          0x200f645dc         [inlined] importViewings
12  MUBITV                          0x200f645dc         Resource.updateViewings (Resource.swift:330)
13  MUBITV                          0x200f0ff5c         API.requestObject<T>
14  MUBITV                          0x200f22ce8         API.requestObject<T>
15  MUBITV                          0x201541488         DownloadRequest._response<T>
16  MUBITV                          0x2014d2e8c         thunk for closure
17  libdispatch.dylib               0x319c51714         <redacted>
18  libdispatch.dylib               0x319c52f84         <redacted>
19  libdispatch.dylib               0x319c60164         _dispatch_main_queue_callback_4CF
20  CoreFoundation                  0x31a6f0698         <redacted>
21  CoreFoundation                  0x31a6eab18         <redacted>
22  CoreFoundation                  0x31a6e9bf4         CFRunLoopRunSpecific
23  GraphicsServices                0x320b44afc         GSEventRunModal
24  UIKitCore                       0x3925d2cd0         <redacted>
25  UIKitCore                       0x3925d80cc         UIApplicationMain
26  MUBITV                          0x200d174f0         main (ReviewModels.swift:13)
27  <unknown>                       0x101bd91d0         <redacted>

Thread 1
0   libsystem_kernel.dylib          0x319f41334         __workq_kernreturn
1   libsystem_pthread.dylib         0x31a0894c8         _pthread_wqthread

Thread 2
0   libsystem_kernel.dylib          0x319f41334         __workq_kernreturn
1   libsystem_pthread.dylib         0x31a0894c8         _pthread_wqthread

Thread 3
0   libsystem_kernel.dylib          0x319f41334         __workq_kernreturn
1   libsystem_pthread.dylib         0x31a0894c8         _pthread_wqthread

Thread 4 name: com.apple.uikit.eventfetch-thread
0   libsystem_kernel.dylib          0x319f1be00         mach_msg_trap
1   libsystem_kernel.dylib          0x319f1b1e0         mach_msg
2   CoreFoundation                  0x31a6f01d4         <redacted>
3   CoreFoundation                  0x31a6ea5d8         <redacted>
4   CoreFoundation                  0x31a6e9bf4         CFRunLoopRunSpecific
5   Foundation                      0x31c0ad02c         <redacted>
6   Foundation                      0x31c0ad2e4         <redacted>
7   UIKitCore                       0x3926774a8         <redacted>
8   Foundation                      0x31c0d3f3c         <redacted>
9   libsystem_pthread.dylib         0x31a087914         _pthread_start

Thread 5
0   libsystem_kernel.dylib          0x319f404c4         __psynch_cvwait
1   libsystem_pthread.dylib         0x31a08b02c         <redacted>
2   libc++.1.dylib                  0x3199ba588         std::__1::condition_variable::wait
3   MUBITV                          0x2011b74d8         realm::Transaction::wait_for_async_completion (db.hpp:728)
4   MUBITV                          0x2012f2b48         realm::Realm::begin_transaction (shared_realm.cpp:885)
5   MUBITV                          0x2010b3e68         -[RLMRealm beginWriteTransactionWithError:] (RLMRealm.mm:645)
6   MUBITV                          0x2010b4168         -[RLMRealm transactionWithoutNotifying:block:error:] (RLMRealm.mm:693)
7   MUBITV                          0x2010b40f8         -[RLMRealm transactionWithBlock:error:] (RLMRealm.mm:685)
8   MUBITV                          0x200f32728         Persistence.backgroundSave (Persistence.swift:268)
9   MUBITV                          0x200f5f7ec         thunk for closure
10  MUBITV                          0x200f34e70         thunk for closure
11  libswiftObjectiveC.dylib        0x34c7c9070         autoreleasepool<T>
12  MUBITV                          0x200f34e1c         [inlined] <redacted> (Persistence.swift:265)
13  MUBITV                          0x200f34e1c         Persistence.backgroundSave
14  MUBITV                          0x200d437fc         thunk for closure
15  libdispatch.dylib               0x319c51714         <redacted>
16  libdispatch.dylib               0x319c52f84         <redacted>
17  libdispatch.dylib               0x319c630c4         <redacted>
18  libdispatch.dylib               0x319c63790         <redacted>
19  libsystem_pthread.dylib         0x31a089440         _pthread_wqthread

Thread 6
0   libsystem_kernel.dylib          0x319f41334         __workq_kernreturn
1   libsystem_pthread.dylib         0x31a0894c8         _pthread_wqthread

Thread 7
0   libsystem_kernel.dylib          0x319f404c4         __psynch_cvwait
1   libsystem_pthread.dylib         0x31a08b02c         <redacted>
2   libc++.1.dylib                  0x3199ba588         std::__1::condition_variable::wait
3   MUBITV                          0x2011b74d8         realm::Transaction::wait_for_async_completion (db.hpp:728)
4   MUBITV                          0x2012f2b48         realm::Realm::begin_transaction (shared_realm.cpp:885)
5   MUBITV                          0x2010b3e68         -[RLMRealm beginWriteTransactionWithError:] (RLMRealm.mm:645)
6   MUBITV                          0x2010b4168         -[RLMRealm transactionWithoutNotifying:block:error:] (RLMRealm.mm:693)
7   MUBITV                          0x2010b40f8         -[RLMRealm transactionWithBlock:error:] (RLMRealm.mm:685)
8   MUBITV                          0x200f32728         Persistence.backgroundSave (Persistence.swift:268)
9   MUBITV                          0x200f5f7ec         thunk for closure
10  MUBITV                          0x200f34e70         thunk for closure
11  libswiftObjectiveC.dylib        0x34c7c9070         autoreleasepool<T>
12  MUBITV                          0x200f34e1c         [inlined] <redacted> (Persistence.swift:265)
13  MUBITV                          0x200f34e1c         Persistence.backgroundSave
14  MUBITV                          0x200d437fc         thunk for closure
15  libdispatch.dylib               0x319c51714         <redacted>
16  libdispatch.dylib               0x319c52f84         <redacted>
17  libdispatch.dylib               0x319c630c4         <redacted>
18  libdispatch.dylib               0x319c63790         <redacted>
19  libsystem_pthread.dylib         0x31a089440         _pthread_wqthread

Thread 8
0   libsystem_kernel.dylib          0x319f40a98         __semwait_signal
1   libsystem_c.dylib               0x319db7750         nanosleep
2   libsystem_c.dylib               0x319db7550         sleep
3   MUBITV                          0x20160e754         monitorCachedData (SentryCrashCachedData.c:139)
4   libsystem_pthread.dylib         0x31a087914         _pthread_start

Thread 9 name: Realm notification listener
0   libsystem_kernel.dylib          0x319f42234         kevent
1   MUBITV                          0x201266bb8         realm::_impl::ExternalCommitHelper::listen (external_commit_helper.cpp:220)
2   MUBITV                          0x201266cb0         [inlined] operator() (external_commit_helper.cpp:176)
3   MUBITV                          0x201266cb0         [inlined] __invoke<T> (type_traits:3694)
4   MUBITV                          0x201266cb0         [inlined] __thread_execute<T> (thread:286)
5   MUBITV                          0x201266cb0         std::__1::__thread_proxy<T> (thread:297)
6   libsystem_pthread.dylib         0x31a087914         _pthread_start

Thread 10
0   libsystem_kernel.dylib          0x319f41334         __workq_kernreturn
1   libsystem_pthread.dylib         0x31a0894c8         _pthread_wqthread

Thread 11
0   libsystem_kernel.dylib          0x319f404c4         __psynch_cvwait
1   libsystem_pthread.dylib         0x31a08b02c         <redacted>
2   libc++.1.dylib                  0x3199ba588         std::__1::condition_variable::wait
3   MUBITV                          0x2011b74d8         realm::Transaction::wait_for_async_completion (db.hpp:728)
4   MUBITV                          0x2012f2b48         realm::Realm::begin_transaction (shared_realm.cpp:885)
5   MUBITV                          0x2010b3e68         -[RLMRealm beginWriteTransactionWithError:] (RLMRealm.mm:645)
6   MUBITV                          0x2010b4168         -[RLMRealm transactionWithoutNotifying:block:error:] (RLMRealm.mm:693)
7   MUBITV                          0x2010b40f8         -[RLMRealm transactionWithBlock:error:] (RLMRealm.mm:685)
8   MUBITV                          0x200f32728         Persistence.backgroundSave (Persistence.swift:268)
9   MUBITV                          0x200f5f7ec         thunk for closure
10  MUBITV                          0x200f34e70         thunk for closure
11  libswiftObjectiveC.dylib        0x34c7c9070         autoreleasepool<T>
12  MUBITV                          0x200f34e1c         [inlined] <redacted> (Persistence.swift:265)
13  MUBITV                          0x200f34e1c         Persistence.backgroundSave
14  MUBITV                          0x200d437fc         thunk for closure
15  libdispatch.dylib               0x319c51714         <redacted>
16  libdispatch.dylib               0x319c52f84         <redacted>
17  libdispatch.dylib               0x319c630c4         <redacted>
18  libdispatch.dylib               0x319c63790         <redacted>
19  libsystem_pthread.dylib         0x31a089440         _pthread_wqthread

Thread 12 name: com.apple.NSURLConnectionLoader
0   libsystem_kernel.dylib          0x319f1be00         mach_msg_trap
1   libsystem_kernel.dylib          0x319f1b1e0         mach_msg
2   CoreFoundation                  0x31a6f01d4         <redacted>
3   CoreFoundation                  0x31a6ea5d8         <redacted>
4   CoreFoundation                  0x31a6e9bf4         CFRunLoopRunSpecific
5   CFNetwork                       0x31b8b1dc4         _CFURLStorageSessionCopyCache
6   Foundation                      0x31c0d3f3c         <redacted>
7   libsystem_pthread.dylib         0x31a087914         _pthread_start

Thread 13
0   libsystem_kernel.dylib          0x319f404c4         __psynch_cvwait
1   libsystem_pthread.dylib         0x31a08b02c         <redacted>
2   libc++.1.dylib                  0x3199ba588         std::__1::condition_variable::wait
3   MUBITV                          0x2011b4d80         realm::DB::AsyncCommitHelper::main (db.cpp:1774)
4   MUBITV                          0x2011b9cc0         [inlined] operator() (db.cpp:1695)
5   MUBITV                          0x2011b9cc0         [inlined] __invoke<T> (type_traits:3694)
6   MUBITV                          0x2011b9cc0         [inlined] __thread_execute<T> (thread:286)
7   MUBITV                          0x2011b9cc0         std::__1::__thread_proxy<T> (thread:297)
8   libsystem_pthread.dylib         0x31a087914         _pthread_start

Thread 14
0   libsystem_kernel.dylib          0x319f41334         __workq_kernreturn
1   libsystem_pthread.dylib         0x31a0894c8         _pthread_wqthread

Thread 15
0   libsystem_kernel.dylib          0x319f41334         __workq_kernreturn
1   libsystem_pthread.dylib         0x31a0894c8         _pthread_wqthread

Thread 16
0   libsystem_kernel.dylib          0x319f41334         __workq_kernreturn
1   libsystem_pthread.dylib         0x31a0894c8         _pthread_wqthread

Thread 17
0   libsystem_kernel.dylib          0x319f41334         __workq_kernreturn
1   libsystem_pthread.dylib         0x31a0894c8         _pthread_wqthread

Thread 18 Crashed:
0   libsystem_kernel.dylib          0x319f406f4         __pthread_kill
1   libsystem_pthread.dylib         0x31a088778         pthread_kill
2   libsystem_c.dylib               0x319dba0c8         abort
3   MUBITV                          0x201478464         please_report_this_issue_in_github_realm_realm_core (terminate.cpp:50)
4   MUBITV                          0x201478798         realm::util::terminate_internal (terminate.cpp:123)
5   MUBITV                          0x201478a50         realm::util::terminate_with_info (terminate.cpp:151)
6   MUBITV                          0x2011d7410         realm::util::terminate_with_info<T> (terminate.hpp:52)
7   MUBITV                          0x2011d6d14         realm::GroupWriter::recreate_freelist (group_writer.cpp:635)
8   MUBITV                          0x2011d5ba8         realm::GroupWriter::write_group (group_writer.cpp:436)
9   MUBITV                          0x2011b60b8         realm::DB::low_level_commit (db.cpp:2347)
10  MUBITV                          0x2011b5f48         realm::DB::do_commit (db.cpp:2168)
11  MUBITV                          0x2011b63b8         realm::Transaction::commit_and_continue_as_read (db.cpp:2187)
12  MUBITV                          0x20127de7c         realm::_impl::RealmCoordinator::commit_write (realm_coordinator.cpp:775)
13  MUBITV                          0x2012f2d8c         realm::Realm::commit_transaction (shared_realm.cpp:916)
14  MUBITV                          0x2010b3ff0         -[RLMRealm commitWriteTransactionWithoutNotifying:error:] (RLMRealm.mm:671)
15  MUBITV                          0x2010b4198         -[RLMRealm transactionWithoutNotifying:block:error:] (RLMRealm.mm:696)
16  MUBITV                          0x2010b40f8         -[RLMRealm transactionWithBlock:error:] (RLMRealm.mm:685)
17  MUBITV                          0x200f32728         Persistence.backgroundSave (Persistence.swift:268)
18  MUBITV                          0x200f5f7ec         thunk for closure
19  MUBITV                          0x200f34e70         thunk for closure
20  libswiftObjectiveC.dylib        0x34c7c9070         autoreleasepool<T>
21  MUBITV                          0x200f34e1c         [inlined] <redacted> (Persistence.swift:265)
22  MUBITV                          0x200f34e1c         Persistence.backgroundSave
23  MUBITV                          0x200d437fc         thunk for closure
24  libdispatch.dylib               0x319c51714         <redacted>
25  libdispatch.dylib               0x319c52f84         <redacted>
26  libdispatch.dylib               0x319c630c4         <redacted>
27  libdispatch.dylib               0x319c63790         <redacted>
28  libsystem_pthread.dylib         0x31a089440         _pthread_wqthread

Thread 19
0   libsystem_kernel.dylib          0x319f41334         __workq_kernreturn
1   libsystem_pthread.dylib         0x31a0894c8         _pthread_wqthread

Thread 20
0   libsystem_kernel.dylib          0x319f404c4         __psynch_cvwait
1   libsystem_pthread.dylib         0x31a08b02c         <redacted>
2   libc++.1.dylib                  0x3199ba588         std::__1::condition_variable::wait
3   MUBITV                          0x2011b74d8         realm::Transaction::wait_for_async_completion (db.hpp:728)
4   MUBITV                          0x2012f2b48         realm::Realm::begin_transaction (shared_realm.cpp:885)
5   MUBITV                          0x2010b3e68         -[RLMRealm beginWriteTransactionWithError:] (RLMRealm.mm:645)
6   MUBITV                          0x2010b4168         -[RLMRealm transactionWithoutNotifying:block:error:] (RLMRealm.mm:693)
7   MUBITV                          0x2010b40f8         -[RLMRealm transactionWithBlock:error:] (RLMRealm.mm:685)
8   MUBITV                          0x200f32728         Persistence.backgroundSave (Persistence.swift:268)
9   MUBITV                          0x200f5f7ec         thunk for closure
10  MUBITV                          0x200f34e70         thunk for closure
11  libswiftObjectiveC.dylib        0x34c7c9070         autoreleasepool<T>
12  MUBITV                          0x200f34e1c         [inlined] <redacted> (Persistence.swift:265)
13  MUBITV                          0x200f34e1c         Persistence.backgroundSave
14  MUBITV                          0x200d437fc         thunk for closure
15  libdispatch.dylib               0x319c51714         <redacted>
16  libdispatch.dylib               0x319c52f84         <redacted>
17  libdispatch.dylib               0x319c630c4         <redacted>
18  libdispatch.dylib               0x319c63790         <redacted>
19  libsystem_pthread.dylib         0x31a089440         _pthread_wqthread

Thread 21
0   libsystem_kernel.dylib          0x319f41334         __workq_kernreturn
1   libsystem_pthread.dylib         0x31a0894c8         _pthread_wqthread

Thread 22
0   libsystem_kernel.dylib          0x319f41334         __workq_kernreturn
1   libsystem_pthread.dylib         0x31a0894c8         _pthread_wqthread



EOF

rist avatar Mar 04 '22 08:03 rist

Related to https://github.com/realm/realm-core/issues/5298 and https://github.com/realm/realm-core/issues/5299#issuecomment-1059603226

ironage avatar Mar 04 '22 23:03 ironage

Closed by #5993

jedelbo avatar Nov 17 '22 08:11 jedelbo