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

Double deallocation while clearing Table #6340

Closed
Arthur-Guillaume opened this issue Feb 27, 2023 · 5 comments · Fixed by #6962
Closed

Double deallocation while clearing Table #6340

Arthur-Guillaume opened this issue Feb 27, 2023 · 5 comments · Fixed by #6962
Assignees
Labels
O-Community Reproduction-Required Waiting-For-Reporter Waiting for more information from the reporter before we can proceed

Comments

@Arthur-Guillaume
Copy link

SDK and version

SDK : ? realm-swift
Version:

  • realm-swift: 10.36.0
  • realm-core: 13.4.1

Observations

  • How frequent do the crash occur? Sometimes ~ 15% of our end users
  • Does it happen in production or during dev/test? production
  • Can the crash be reproduced by you? randomly crashing on our devices as well as end-users
  • Can you provide instructions for how we can reproduce it? sorry, no.

Crash log / stacktrace

"BUG IN CLIENT OF LIBPLATFORM: Trying to recursively lock an os_unfair_lock"

#0 0x000000020fb4c08c in _os_unfair_lock_recursive_abort ()
#1 0x000000020fb46898 in _os_unfair_lock_lock_slow ()
#2 0x00000001baaeb9b4 in lookUpImpOrForward ()
#3 0x00000001baae60c4 in _objc_msgSend_uncached ()
#4 0x00000001baae55d8 in AutoreleasePoolPage::releaseUntil(objc_object**) ()
#5 0x00000001baae8f80 in objc_autoreleasePoolPop ()
#6 0x000000010e891fcc in _dispatch_last_resort_autorelease_pool_pop ()
#7 0x000000010e89ae20 in _dispatch_lane_invoke ()
#8 0x000000010e8a7cac in _dispatch_workloop_worker_thread ()
#9 0x000000020fbdcdf8 in _pthread_wqthread ()


/path/to_project/Tuist/Dependencies/SwiftPackageManager/.build/checkouts/realm-core/src/realm/alloc_slab.cpp:531: [realm-core-13.4.1] Assertion failed: ref + size <= next->first with (ref, size, next->first, next->second, get_file_path_for_assertions()) = [672960, 56, 672960, 56, "/var/mobile/Containers/Data/Application/574A5780-44BD-44FC-9622-0EBC19D4544A/Documents/userRelated.realm"]
0 app_name 0x00000001060c9bf8 _ZN5realm4utilL18terminate_internalERNSt3__118basic_stringstreamIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE + 56
1 app_name 0x00000001060c9ec8 _ZN5realm4util19terminate_with_infoEPKcS2_lS2_OSt16initializer_listINS0_9PrintableEE + 320
2 app_name 0x000000010563b330 ZN5realm4util19terminate_with_infoIJRmS2_RKmS2_NSt3__112basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEEEEEvPKciSD_SD_DpOT + 256
3 app_name 0x000000010563aa20 _ZN5realm9SlabAlloc7do_freeEmPc + 1532
4 app_name 0x00000001057141ac _ZN5realm9Allocator5free_EmPKc + 156
5 app_name 0x00000001057dcbe8 _ZN5realm4Node16do_copy_on_writeEm + 348
6 app_name 0x000000010541a7e8 _ZN5realm4Node13copy_on_writeEv + 92
7 app_name 0x00000001056547e0 _ZN5realm5Array3setEmx + 268
8 app_name 0x00000001052cb124 _ZN5realm5Array16update_child_refEmm + 56
9 app_name 0x00000001052cc458 _ZN5realm4Node13update_parentEv + 108
10 app_name 0x00000001057dcbd4 _ZN5realm4Node16do_copy_on_writeEm + 328
11 app_name 0x000000010541a7e8 _ZN5realm4Node13copy_on_writeEv + 92
12 app_name 0x00000001056547e0 _ZN5realm5Array3setEmx + 268
13 app_name 0x0000000106045934 _ZN5realm5Group16update_child_refEmm + 60
14 app_name 0x00000001052cc458 _ZN5realm4Node13update_parentEv + 108
15 app_name 0x00000001057dcbd4 _ZN5realm4Node16do_copy_on_writeEm + 328
16 app_name 0x000000010541a7e8 _ZN5realm4Node13copy_on_writeEv + 92
17 app_name 0x00000001056547e0 _ZN5realm5Array3setEmx + 268
18 app_name 0x00000001052cb124 _ZN5realm5Array16update_child_refEmm + 56
19 app_name 0x00000001052cc458 _ZN5realm4Node13update_parentEv + 108
20 app_name 0x00000001057dcbd4 _ZN5realm4Node16do_copy_on_writeEm + 328
21 app_name 0x000000010541a7e8 _ZN5realm4Node13copy_on_writeEv + 92
22 app_name 0x00000001056547e0 _ZN5realm5Array3setEmx + 268
23 app_name 0x00000001052cb124 _ZN5realm5Array16update_child_refEmm + 56
24 app_name 0x00000001052cc458 _ZN5realm4Node13update_parentEv + 108
25 app_name 0x00000001057dcbd4 _ZN5realm4Node16do_copy_on_writeEm + 328
26 app_name 0x000000010541a7e8 _ZN5realm4Node13copy_on_writeEv + 92
27 app_name 0x0000000105653620 _ZN5realm5Array8set_typeENS_10NodeHeader4TypeE + 136
28 app_name 0x0000000105763910 _ZN5realm11StringIndex5clearEv + 316
29 app_name 0x0000000105fdd2fc _ZN5realm5Table13clear_indexesEv + 176
30 app_name 0x00000001056c80a0 _ZN5realm11ClusterTree5clearERNS_12CascadeStateE + 64
31 app_name 0x0000000105fe72a8 _ZN5realm5Table5clearEv + 80
32 app_name 0x0000000105995d1c _ZN5realm7Results5clearEv + 236
33 app_name 0x00000001053a5cac _Z13RLMClearTableR12RLMClassInfo + 384
34 app_name 0x000000010559c8a8 _ZZ36-[RLMResults deleteObjectsFromRealm]ENK4$19clEv + 136
35 app_name 0x000000010558e4a4 ZL25translateRLMResultsErrorsIZ36-[RLMResults deleteObjectsFromRealm]E4$19EDaOT_P8NSString + 72
36 app_name 0x000000010558e1b0 -[RLMResults deleteObjectsFromRealm] + 232
37 app_name 0x000000010555ed4c -[RLMRealm deleteObjects:] + 408
38 app_name 0x00000001061a9b20 $s10RealmSwift0A0V6deleteyyAA7ResultsVyxGSo13RLMObjectBaseCRbzAA0A15CollectionValueRzlF + 108
39 app_name 0x000000010445e538 $s7app_name21RealmObjectRepositoryC5clearyyFyycfU_yyXEfU
+ 324
40 app_name 0x000000010445e570 $s7app_name21RealmObjectRepositoryC5clearyyFyycfU_yyXEfU_TA + 28
41 app_name 0x00000001061a7374 $s10RealmSwift0A0V5write16withoutNotifying_xSaySo20RLMNotificationTokenCG_xyKXEtKlF + 356
42 app_name 0x000000010445e34c $s7app_name21RealmObjectRepositoryC5clearyyFyycfU
+ 412
43 app_name 0x0000000104460278 $s7app_name21RealmObjectRepositoryC12doWorkForApp33_167C144EAB252E16EF2D52FD3FDBF6A1LL5blockyyyc_tFyycfU
+ 248
44 app_name 0x00000001043e8870 $sIeg_IeyB_TR + 48
45 libdispatch.dylib 0x000000010ec2853c _dispatch_call_block_and_release + 32
46 libdispatch.dylib 0x000000010ec29ff0 _dispatch_client_callout + 20
47 libdispatch.dylib 0x000000010ec3a800 _dispatch_main_queue_drain + 1196
48 libdispatch.dylib 0x000000010ec3a344 _dispatch_main_queue_callback_4CF + 44
49 CoreFoundation 0x00000001c19f56c8 42CCFC7B-FF32-3D25-8F01-CCB2AD843A8B + 632520
50 CoreFoundation 0x00000001c19d702c 42CCFC7B-FF32-3D25-8F01-CCB2AD843A8B + 507948
51 CoreFoundation 0x00000001c19dbeb0 CFRunLoopRunSpecific + 612
52 UIFoundation 0x00000001cbe86b54 22746B0A-1546-3D81-AE08-EE0F17206E53 + 850772
53 UIFoundation 0x00000001cbe87708 22746B0A-1546-3D81-AE08-EE0F17206E53 + 853768
54 UIFoundation 0x00000001cbe447c4 _NSReadAttributedStringFromURLOrData + 6556
55 UIFoundation 0x00000001cbe42db0 22746B0A-1546-3D81-AE08-EE0F17206E53 + 572848
56 app_name 0x00000001046f3b58 $sSo18NSAttributedStringC5UIKitE4data7options18documentAttributesAB10Foundation4DataV_SDySo0aB24DocumentReadingOptionKeyaypGSAySo12NSDictionaryCSgGSgtKcfcTO + 188
57 app_name 0x00000001046f38ec $sSo18NSAttributedStringC5UIKitE4data7options18documentAttributesAB10Foundation4DataV_SDySo0aB24DocumentReadingOptionKeyaypGSAySo12NSDictionaryCSgGSgtKcfC + 76
58 app_name 0x00000001046f3608 $sSS7app_nameE10formatHtmlSo18NSAttributedStringCSgyF + 828
59 app_name 0x0000000104bf3874 $s7app_name19LoginViewControllerC04initC033_F2686403CACB661FE8E746488637887BLLyyF + 3016
60 app_name 0x0000000104bf2908 $s7app_name19LoginViewControllerC11viewDidLoadyyF + 3728
61 app_name 0x0000000104bf29e4 $s7app_name19LoginViewControllerC11viewDidLoadyyFTo + 36
62 UIKitCore 0x00000001c3eb205c CF21AD9C-EFBF-3961-A7C0-54BD30CEFEA9 + 3678300
63 UIKitCore 0x00000001c3b4a35c CF21AD9C-EFBF-3961-A7C0-54BD30CEFEA9 + 107356
64 UIKitCore 0x00000001c3b4a074 CF21AD9C-EFBF-3961-A7C0-54BD30CEFEA9 + 106612
65 UIKitCore 0x00000001c3cfed78 CF21AD9C-EFBF-3961-A7C0-54BD30CEFEA9 + 1895800
66 UIKitCore 0x00000001c3e12c1c CF21AD9C-EFBF-3961-A7C0-54BD30CEFEA9 + 3025948
67 UIKitCore 0x00000001c42935d0 CF21AD9C-EFBF-3961-A7C0-54BD30CEFEA9 + 7747024
68 UIKitCore 0x00000001c3cd37dc CF21AD9C-EFBF-3961-A7C0-54BD30CEFEA9 + 1718236
69 UIKitCore 0x00000001c3cd3710 CF21AD9C-EFBF-3961-A7C0-54BD30CEFEA9 + 1718032
70 UIKitCore 0x00000001c3cd361c CF21AD9C-EFBF-3961-A7C0-54BD30CEFEA9 + 1717788
71 UIKitCore 0x00000001c3b6ea08 CF21AD9C-EFBF-3961-A7C0-54BD30CEFEA9 + 256520
72 CoreFoundation 0x00000001c199e514 42CCFC7B-FF32-3D25-8F01-CCB2AD843A8B + 275732
73 CoreFoundation 0x00000001c1a06d6c 42CCFC7B-FF32-3D25-8F01-CCB2AD843A8B + 703852
74 CoreFoundation 0x00000001c19d6b90 42CCFC7B-FF32-3D25-8F01-CCB2AD843A8B + 506768
75 CoreFoundation 0x00000001c19dbeb0 CFRunLoopRunSpecific + 612
76 GraphicsServices 0x00000001fbbd1368 GSEventRunModal + 164
77 UIKitCore 0x00000001c3ed1668 CF21AD9C-EFBF-3961-A7C0-54BD30CEFEA9 + 3806824
78 UIKitCore 0x00000001c3ed12cc UIApplicationMain + 340
79 app_name 0x0000000104df04a8 main + 1164
80 dyld 0x00000001e02d4960 4B042F28-0D14-30EC-A1DE-3DBB10866AD7 + 88416!!! IMPORTANT: Please report this at https://github.com/realm/realm-core/issues/new/choose2023-02-27 11:53:07.190353+0100 app_name[28291:7449780]
/path/to/project/Tuist/Dependencies/SwiftPackageManager/.build/checkouts/realm-core/src/realm/alloc_slab.cpp:531: [realm-core-13.4.1] Assertion failed: ref + size <= next->first with (ref, size, next->first, next->second, get_file_path_for_assertions()) = [672960, 56, 672960, 56, "/var/mobile/Containers/Data/Application/574A5780-44BD-44FC-9622-0EBC19D4544A/Documents/userRelated.realm"]
0 app_name 0x00000001060c9bf8 _ZN5realm4utilL18terminate_internalERNSt3__118basic_stringstreamIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE + 56
1 app_name 0x00000001060c9ec8 _ZN5realm4util19terminate_with_infoEPKcS2_lS2_OSt16initializer_listINS0_9PrintableEE + 320
2 app_name 0x000000010563b330 ZN5realm4util19terminate_with_infoIJRmS2_RKmS2_NSt3__112basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEEEEEvPKciSD_SD_DpOT + 256
3 app_name 0x000000010563aa20 _ZN5realm9SlabAlloc7do_freeEmPc + 1532
4 app_name 0x00000001057141ac _ZN5realm9Allocator5free_EmPKc + 156
5 app_name 0x00000001057dcbe8 _ZN5realm4Node16do_copy_on_writeEm + 348
6 app_name 0x000000010541a7e8 _ZN5realm4Node13copy_on_writeEv + 92
7 app_name 0x00000001056547e0 _ZN5realm5Array3setEmx + 268
8 app_name 0x00000001052cb124 _ZN5realm5Array16update_child_refEmm + 56
9 app_name 0x00000001052cc458 _ZN5realm4Node13update_parentEv + 108
10 app_name 0x00000001057dcbd4 _ZN5realm4Node16do_copy_on_writeEm + 328
11 app_name 0x000000010541a7e8 _ZN5realm4Node13copy_on_writeEv + 92
12 app_name 0x00000001056547e0 _ZN5realm5Array3setEmx + 268
13 app_name 0x0000000106045934 _ZN5realm5Group16update_child_refEmm + 60
14 app_name 0x00000001052cc458 _ZN5realm4Node13update_parentEv + 108
15 app_name 0x00000001057dcbd4 _ZN5realm4Node16do_copy_on_writeEm + 328
16 app_name 0x000000010541a7e8 _ZN5realm4Node13copy_on_writeEv + 92
17 app_name 0x00000001056547e0 _ZN5realm5Array3setEmx + 268
18 app_name 0x00000001052cb124 _ZN5realm5Array16update_child_refEmm + 56
19 app_name 0x00000001052cc458 _ZN5realm4Node13update_parentEv + 108
20 app_name 0x00000001057dcbd4 _ZN5realm4Node16do_copy_on_writeEm + 328
21 app_name 0x000000010541a7e8 _ZN5realm4Node13copy_on_writeEv + 92
22 app_name 0x00000001056547e0 _ZN5realm5Array3setEmx + 268
23 app_name 0x00000001052cb124 _ZN5realm5Array16update_child_refEmm + 56
24 app_name 0x00000001052cc458 _ZN5realm4Node13update_parentEv + 108
25 app_name 0x00000001057dcbd4 _ZN5realm4Node16do_copy_on_writeEm + 328
26 app_name 0x000000010541a7e8 _ZN5realm4Node13copy_on_writeEv + 92
27 app_name 0x0000000105653620 _ZN5realm5Array8set_typeENS_10NodeHeader4TypeE + 136
28 app_name 0x0000000105763910 _ZN5realm11StringIndex5clearEv + 316
29 app_name 0x0000000105fdd2fc _ZN5realm5Table13clear_indexesEv + 176
30 app_name 0x00000001056c80a0 _ZN5realm11ClusterTree5clearERNS_12CascadeStateE + 64
31 app_name 0x0000000105fe72a8 _ZN5realm5Table5clearEv + 80
32 app_name 0x0000000105995d1c _ZN5realm7Results5clearEv + 236
33 app_name 0x00000001053a5cac _Z13RLMClearTableR12RLMClassInfo + 384
34 app_name 0x000000010559c8a8 _ZZ36-[RLMResults deleteObjectsFromRealm]ENK4$19clEv + 136
35 app_name 0x000000010558e4a4 ZL25translateRLMResultsErrorsIZ36-[RLMResults deleteObjectsFromRealm]E4$19EDaOT_P8NSString + 72
36 app_name 0x000000010558e1b0 -[RLMResults deleteObjectsFromRealm] + 232
37 app_name 0x000000010555ed4c -[RLMRealm deleteObjects:] + 408
38 app_name 0x00000001061a9b20 $s10RealmSwift0A0V6deleteyyAA7ResultsVyxGSo13RLMObjectBaseCRbzAA0A15CollectionValueRzlF + 108
39 app_name 0x000000010445e538 $s7app_name21RealmObjectRepositoryC5clearyyFyycfU_yyXEfU
+ 324
40 app_name 0x000000010445e570 $s7app_name21RealmObjectRepositoryC5clearyyFyycfU_yyXEfU_TA + 28
41 app_name 0x00000001061a7374 $s10RealmSwift0A0V5write16withoutNotifying_xSaySo20RLMNotificationTokenCG_xyKXEtKlF + 356
42 app_name 0x000000010445e34c $s7app_name21RealmObjectRepositoryC5clearyyFyycfU
+ 412
43 app_name 0x0000000104460278 $s7app_name21RealmObjectRepositoryC12doWorkForApp33_167C144EAB252E16EF2D52FD3FDBF6A1LL5blockyyyc_tFyycfU
+ 248
44 app_name 0x00000001043e8870 $sIeg_IeyB_TR + 48
45 libdispatch.dylib 0x000000010ec2853c _dispatch_call_block_and_release + 32
46 libdispatch.dylib 0x000000010ec29ff0 _dispatch_client_callout + 20
47 libdispatch.dylib 0x000000010ec3a800 _dispatch_main_queue_drain + 1196
48 libdispatch.dylib 0x000000010ec3a344 _dispatch_main_queue_callback_4CF + 44
49 CoreFoundation 0x00000001c19f56c8 42CCFC7B-FF32-3D25-8F01-CCB2AD843A8B + 632520
50 CoreFoundation 0x00000001c19d702c 42CCFC7B-FF32-3D25-8F01-CCB2AD843A8B + 507948
51 CoreFoundation 0x00000001c19dbeb0 CFRunLoopRunSpecific + 612
52 UIFoundation 0x00000001cbe86b54 22746B0A-1546-3D81-AE08-EE0F17206E53 + 850772
53 UIFoundation 0x00000001cbe87708 22746B0A-1546-3D81-AE08-EE0F17206E53 + 853768
54 UIFoundation 0x00000001cbe447c4 _NSReadAttributedStringFromURLOrData + 6556
55 UIFoundation 0x00000001cbe42db0 22746B0A-1546-3D81-AE08-EE0F17206E53 + 572848
56 app_name 0x00000001046f3b58 $sSo18NSAttributedStringC5UIKitE4data7options18documentAttributesAB10Foundation4DataV_SDySo0aB24DocumentReadingOptionKeyaypGSAySo12NSDictionaryCSgGSgtKcfcTO + 188
57 app_name 0x00000001046f38ec $sSo18NSAttributedStringC5UIKitE4data7options18documentAttributesAB10Foundation4DataV_SDySo0aB24DocumentReadingOptionKeyaypGSAySo12NSDictionaryCSgGSgtKcfC + 76
58 app_name 0x00000001046f3608 $sSS7app_nameE10formatHtmlSo18NSAttributedStringCSgyF + 828
59 app_name 0x0000000104bf3874 $s7app_name19LoginViewControllerC04initC033_F2686403CACB661FE8E746488637887BLLyyF + 3016
60 app_name 0x0000000104bf2908 $s7app_name19LoginViewControllerC11viewDidLoadyyF + 3728
61 app_name 0x0000000104bf29e4 $s7app_name19LoginViewControllerC11viewDidLoadyyFTo + 36
62 UIKitCore 0x00000001c3eb205c CF21AD9C-EFBF-3961-A7C0-54BD30CEFEA9 + 3678300
63 UIKitCore 0x00000001c3b4a35c CF21AD9C-EFBF-3961-A7C0-54BD30CEFEA9 + 107356
64 UIKitCore 0x00000001c3b4a074 CF21AD9C-EFBF-3961-A7C0-54BD30CEFEA9 + 106612
65 UIKitCore 0x00000001c3cfed78 CF21AD9C-EFBF-3961-A7C0-54BD30CEFEA9 + 1895800
66 UIKitCore 0x00000001c3e12c1c CF21AD9C-EFBF-3961-A7C0-54BD30CEFEA9 + 3025948
67 UIKitCore 0x00000001c42935d0 CF21AD9C-EFBF-3961-A7C0-54BD30CEFEA9 + 7747024
68 UIKitCore 0x00000001c3cd37dc CF21AD9C-EFBF-3961-A7C0-54BD30CEFEA9 + 1718236
69 UIKitCore 0x00000001c3cd3710 CF21AD9C-EFBF-3961-A7C0-54BD30CEFEA9 + 1718032
70 UIKitCore 0x00000001c3cd361c CF21AD9C-EFBF-3961-A7C0-54BD30CEFEA9 + 1717788
71 UIKitCore 0x00000001c3b6ea08 CF21AD9C-EFBF-3961-A7C0-54BD30CEFEA9 + 256520
72 CoreFoundation 0x00000001c199e514 42CCFC7B-FF32-3D25-8F01-CCB2AD843A8B + 275732
73 CoreFoundation 0x00000001c1a06d6c 42CCFC7B-FF32-3D25-8F01-CCB2AD843A8B + 703852
74 CoreFoundation 0x00000001c19d6b90 42CCFC7B-FF32-3D25-8F01-CCB2AD843A8B + 506768
75 CoreFoundation 0x00000001c19dbeb0 CFRunLoopRunSpecific + 612
76 GraphicsServices 0x00000001fbbd1368 GSEventRunModal + 164
77 UIKitCore 0x00000001c3ed1668 CF21AD9C-EFBF-3961-A7C0-54BD30CEFEA9 + 3806824
78 UIKitCore 0x00000001c3ed12cc UIApplicationMain + 340
79 app_name 0x0000000104df04a8 main + 1164
80 dyld 0x00000001e02d4960 4B042F28-0D14-30EC-A1DE-3DBB10866AD7 + 88416!!! IMPORTANT: Please report this at https://github.com/realm/realm-core/issues/new/choose

Steps & Code to Reproduce

Updated from realm-swift 10.32.3 to 10.36.0 (realm-core from 12.11.0 to 13.4.1).

Already opened an issues on realm-swift repo: realm/realm-swift#8152

Please, feel free to ask for additional, relevant data.

@jedelbo
Copy link
Contributor

jedelbo commented Mar 2, 2023

Looks like the problem is rather a double deallocation ( Assertion failed: ref + size <= next->first )

@jedelbo
Copy link
Contributor

jedelbo commented Mar 7, 2023

Internal note: I cam reproduce this exact stack trace in a unit test, but it requires that I explicitly free the memory used by the Group top array first.

@jedelbo
Copy link
Contributor

jedelbo commented Mar 7, 2023

@Arthur-Guillaume does all the stack traces look like the one above. If not, could you share another one?

@sync-by-unito sync-by-unito bot added Reproduction-Required Waiting-For-Reporter Waiting for more information from the reporter before we can proceed labels Mar 7, 2023
@robert-lis-fox
Copy link

Ever since updating from 10.32.2 to 10.39.1 (which seems very similar to realm/realm-swift#8152) we’ve been seeing a crash with a very similar stack trace affecting, a small, albeit noticeable amount of users. Reads appear to be working correctly, but writes and deletes is where the crash occurs. Seems like some users experienced that crash during app launch, repeatedly, getting stuck. Additional data point, we’re accessing the database concurrently, using queue confided Realm instances. We’ve build a sort of “recovery” system where if our database access crashes the process over 3 times, we wipe the database file from the disk and set everything up again, we’ve been speculating, that for some stuck users, might be going that down path.

libsystem_kernel 0x1eb7c4558 _pthread_kill
libsystem_pthread 0x20c442114 pthread_kill
libsystem_c 0x1b3fce174 abort
Saturn 0x101256ed0 please_report_this_issue_in_github_realm_realm_core_v_13_10_1 (terminate.cpp:65)
Saturn 0x101257110 realm::util::terminate_internal (terminate.cpp:143)
Saturn 0x101256ff0 realm::util::terminate_with_info (terminate.cpp:162)
Saturn 0x100fc4f80 realm::util::terminate_with_info (terminate.hpp:52)
Saturn 0x100fc4d60 realm::SlabAlloc::do_free (alloc_slab.cpp:540)
Saturn 0x101052a4c realm::Allocator::free
(alloc.hpp:525)
Saturn 0x101052a4c realm::Node::do_copy_on_write (node.cpp:167)
Saturn 0x100fca0cc realm::Node::copy_on_write (node.hpp:299)
Saturn 0x100fca0cc realm::Array::set (array.cpp:378)
Saturn 0x101052a20 realm::Node::update_parent (node.hpp:264)
Saturn 0x101052a20 realm::Node::do_copy_on_write (node.cpp:154)
Saturn 0x100fca0cc realm::Node::copy_on_write (node.hpp:299)
Saturn 0x100fca0cc realm::Array::set (array.cpp:378)
Saturn 0x101052a20 realm::Node::update_parent (node.hpp:264)
Saturn 0x101052a20 realm::Node::do_copy_on_write (node.cpp:154)
Saturn 0x100fca0cc realm::Node::copy_on_write (node.hpp:299)
Saturn 0x100fca0cc realm::Array::set (array.cpp:378)
Saturn 0x101052a20 realm::Node::update_parent (node.hpp:264)
Saturn 0x101052a20 realm::Node::do_copy_on_write (node.cpp:154)
Saturn 0x100fca0cc realm::Node::copy_on_write (node.hpp:299)
Saturn 0x100fca0cc realm::Array::set (array.cpp:378)
Saturn 0x100ff06e0 realm::ClusterNodeInner::update_ref_in_parent (cluster_tree.cpp:281)
Saturn 0x101053440 realm::ClusterTree::update_ref_in_parent (cluster_tree.hpp:92)
Saturn 0x101053440 realm::Obj::sync (obj.cpp:1232)
Saturn 0x101053440 realm::Obj::set (obj.cpp:1714)
Saturn 0x100dd591c realm::switch_on_type (property.hpp:246)
Saturn 0x100dd591c realm::Object::set_property_value_impl (object_accessor.hpp:174)
Saturn 0x100dcced8 realm::Object::create (object_accessor.hpp:362)
Saturn 0x100dcc698 RLMAccessorContext::createObject (RLMAccessor.mm:1102)
Saturn 0x100dd6b4c RLMAccessorContext::unbox (RLMAccessor.mm:1134)
Saturn 0x100dd6b4c realm::(anonymous namespace)::ValueUpdater::operator() (object_accessor.hpp:92)
Saturn 0x100dd5944 realm::switch_on_type (property.hpp:252)
Saturn 0x100dd5944 realm::Object::set_property_value_impl (object_accessor.hpp:174)
Saturn 0x100dcced8 realm::Object::create (object_accessor.hpp:362)
Saturn 0x100dcc698 RLMAccessorContext::createObject (RLMAccessor.mm:1102)
Saturn 0x100e1fa2c RLMAddObjectToRealm (RLMObjectStore.mm:119)
Saturn 0x100f84388 Realm.add (Realm.swift:556)
Saturn 0x100f84388 Realm.add (Realm.swift:580)
Saturn 0x101a165fc SchoolManager.received

@jedelbo
Copy link
Contributor

jedelbo commented May 26, 2023

@robert-lis-fox thank you for reporting this. Although the stacktrace is a bit different from the other, there are clear similarities. It is - however - difficult to see what the common cause could be. It is interesting that some users are getting this repeatedly during app launch. But in the stacktrace above you are updating some data. Are you able to tell in more detail what is happening?

@sync-by-unito sync-by-unito bot changed the title Crash during write transaction - Trying to recursively lock an os_unfair_lock Double deallocation while clearing Table Jun 21, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 21, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
O-Community Reproduction-Required Waiting-For-Reporter Waiting for more information from the reporter before we can proceed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants