Skip to content

os_unfair_lock after updating to 0.27.1 #1226

@RolandasRazma

Description

@RolandasRazma

we see a lot of "BUG IN CLIENT OF LIBPLATFORM: Trying to recursively lock an os_unfair_lock" after updating to 0.27.1 from 0.26.0.

We use watchers extensively (almost all calls) if that make any difference

Thread 0 Crashed:: Dispatch queue: diskcookies
0   libsystem_platform.dylib      	0x000000011810945c _os_unfair_lock_recursive_abort + 23
1   libsystem_platform.dylib      	0x0000000118104862 _os_unfair_lock_lock_slow + 256
2   libsystem_malloc.dylib        	0x0000000117fa54c0 tiny_malloc_should_clear + 141
3   libsystem_malloc.dylib        	0x0000000117f8d88a szone_malloc_should_clear + 66
4   libsystem_malloc.dylib        	0x0000000117f9930d malloc_zone_malloc + 104
5   com.apple.CoreFoundation      	0x0000000115060fe0 __CFStringChangeSizeMultiple + 848
6   com.apple.CoreFoundation      	0x0000000115059b7c CFStringAppend + 524
7   com.apple.CoreFoundation      	0x0000000115047665 __CFStringAppendFormatCore + 14709
8   com.apple.CoreFoundation      	0x0000000115048d15 _CFStringCreateWithFormatAndArgumentsAux2 + 133
9   com.apple.CoreFoundation      	0x0000000115048e62 CFStringCreateWithFormat + 146
10  com.apple.CFNetwork           	0x0000000114c7377d 0x114b09000 + 1484669
11  com.apple.CFNetwork           	0x0000000114c725ef 0x114b09000 + 1480175
12  libdispatch.dylib             	0x0000000117ca37f9 _dispatch_client_callout + 8
13  libdispatch.dylib             	0x0000000117cb07ff _dispatch_lane_barrier_sync_invoke_and_complete + 94
14  com.apple.CFNetwork           	0x0000000114c71da4 0x114b09000 + 1478052
15  com.apple.CFNetwork           	0x0000000114c6751f 0x114b09000 + 1434911
16  com.apple.CoreFoundation      	0x0000000114fcae46 __CFDictionaryApplyFunction_block_invoke + 22
17  com.apple.CoreFoundation      	0x0000000115100723 CFBasicHashApply + 131
18  com.apple.CoreFoundation      	0x0000000114fcae0b CFDictionaryApplyFunction + 155
19  com.apple.CFNetwork           	0x0000000114c67475 0x114b09000 + 1434741
20  libsystem_c.dylib             	0x0000000117e2ad2b __cxa_finalize_ranges + 319
21  libsystem_c.dylib             	0x0000000117e2b050 exit + 48
22  tv.fiit.Fiit                  	0x0000000106ca4fbb exitSignalHandler + 11
23  libsystem_platform.dylib      	0x000000011810642d _sigtramp + 29
24  ???                           	0x000000011732ac88 type metadata for () + 8
25  libsystem_malloc.dylib        	0x0000000117fa550f tiny_malloc_should_clear + 220
26  libsystem_malloc.dylib        	0x0000000117f8d88a szone_malloc_should_clear + 66
27  libsystem_malloc.dylib        	0x0000000117f9930d malloc_zone_malloc + 104
28  libsystem_malloc.dylib        	0x0000000117f99abc malloc + 21
29  libswiftCore.dylib            	0x000000011725df89 swift_slowAlloc + 25
30  libswiftCore.dylib            	0x000000011725e004 _swift_allocObject_(swift::TargetHeapMetadata<swift::InProcess> const*, unsigned long, unsigned long) + 20
31  libswiftCore.dylib            	0x0000000116fabb92 _ArrayBufferProtocol._forceCreateUniqueMutableBufferImpl(countForBuffer:minNewCapacity:requiredCapacity:) + 242
32  libswiftCore.dylib            	0x0000000116f9e6ca Array._copyToNewBuffer(oldCount:) + 122
33  libswiftCore.dylib            	0x00000001171df433 specialized Array.append(_:) + 51
34  libswiftCore.dylib            	0x0000000116fa1d9f ContiguousArray.append(_:) + 15
35  tv.fiit.Fiit                  	0x0000000108959d99 whenAll<A>(_:notifyOn:) + 1081
36  tv.fiit.Fiit                  	0x0000000108909120 GraphQLExecutor.execute<A>(selections:on:info:accumulator:) + 2608
37  tv.fiit.Fiit                  	0x000000010890e0f5 GraphQLExecutor.complete<A>(value:ofType:info:accumulator:) + 6581
38  tv.fiit.Fiit                  	0x000000010890cdf0 GraphQLExecutor.complete<A>(value:ofType:info:accumulator:) + 1712
39  tv.fiit.Fiit                  	0x000000010890c17f specialized closure #1 in GraphQLExecutor.execute<A>(fields:on:info:accumulator:) + 511
40  tv.fiit.Fiit                  	0x000000010890fcab partial apply for specialized  + 75
41  tv.fiit.Fiit                  	0x000000010895da8b ResultOrPromise.flatMap<A>(_:) + 747
42  tv.fiit.Fiit                  	0x000000010890b52f GraphQLExecutor.execute<A>(fields:on:info:accumulator:) + 2271
43  tv.fiit.Fiit                  	0x0000000108908c6b GraphQLExecutor.execute<A>(selections:on:info:accumulator:) + 1403
44  tv.fiit.Fiit                  	0x000000010890e0f5 GraphQLExecutor.complete<A>(value:ofType:info:accumulator:) + 6581
45  tv.fiit.Fiit                  	0x000000010890c17f specialized closure #1 in GraphQLExecutor.execute<A>(fields:on:info:accumulator:) + 511
46  tv.fiit.Fiit                  	0x000000010890fcab partial apply for specialized  + 75
47  tv.fiit.Fiit                  	0x000000010895da8b ResultOrPromise.flatMap<A>(_:) + 747
48  tv.fiit.Fiit                  	0x000000010890b52f GraphQLExecutor.execute<A>(fields:on:info:accumulator:) + 2271
49  tv.fiit.Fiit                  	0x0000000108908c6b GraphQLExecutor.execute<A>(selections:on:info:accumulator:) + 1403
50  tv.fiit.Fiit                  	0x000000010890e0f5 GraphQLExecutor.complete<A>(value:ofType:info:accumulator:) + 6581
51  tv.fiit.Fiit                  	0x000000010890cdf0 GraphQLExecutor.complete<A>(value:ofType:info:accumulator:) + 1712
52  tv.fiit.Fiit                  	0x000000010890c17f specialized closure #1 in GraphQLExecutor.execute<A>(fields:on:info:accumulator:) + 511
53  tv.fiit.Fiit                  	0x000000010890fcab partial apply for specialized  + 75
54  tv.fiit.Fiit                  	0x000000010895da8b ResultOrPromise.flatMap<A>(_:) + 747
55  tv.fiit.Fiit                  	0x000000010890b52f GraphQLExecutor.execute<A>(fields:on:info:accumulator:) + 2271
56  tv.fiit.Fiit                  	0x0000000108908c6b GraphQLExecutor.execute<A>(selections:on:info:accumulator:) + 1403
57  tv.fiit.Fiit                  	0x000000010890844b GraphQLExecutor.execute<A>(selections:on:withKey:variables:accumulator:) + 667
58  tv.fiit.Fiit                  	0x00000001089210a3 closure #2 in GraphQLResponse.parseResult(cacheKeyForObject:) + 707
59  tv.fiit.Fiit                  	0x00000001089211d4 partial apply for closure #2 in GraphQLResponse.parseResult(cacheKeyForObject:) + 36
60  tv.fiit.Fiit                  	0x0000000108948c0d firstly<A>(_:) + 77
61  tv.fiit.Fiit                  	0x00000001089207a8 GraphQLResponse.parseResult(cacheKeyForObject:) + 2248
62  tv.fiit.Fiit                  	0x00000001088e226f closure #1 in ApolloClient.handleOperationResult<A>(shouldPublishResultToStore:context:_:resultHandler:) + 111
63  tv.fiit.Fiit                  	0x00000001088e2304 partial apply for closure #1 in ApolloClient.handleOperationResult<A>(shouldPublishResultToStore:context:_:resultHandler:) + 20
64  tv.fiit.Fiit                  	0x0000000108948c0d firstly<A>(_:) + 77
65  tv.fiit.Fiit                  	0x00000001088e1dca ApolloClient.handleOperationResult<A>(shouldPublishResultToStore:context:_:resultHandler:) + 1482
66  tv.fiit.Fiit                  	0x00000001088e172f closure #1 in ApolloClient.send<A>(operation:shouldPublishResultToStore:context:resultHandler:) + 719
67  tv.fiit.Fiit                  	0x00000001088e17ec partial apply for closure #1 in ApolloClient.send<A>(operation:shouldPublishResultToStore:context:resultHandler:) + 76
68  tv.fiit.Fiit                  	0x000000010893317c closure #2 in HTTPNetworkTransport.send<A>(operation:isPersistedQueryRetry:files:completionHandler:) + 1996
69  tv.fiit.Fiit                  	0x0000000108935474 partial apply for closure #2 in HTTPNetworkTransport.send<A>(operation:isPersistedQueryRetry:files:completionHandler:) + 100
70  tv.fiit.Fiit                  	0x00000001089623e8 thunk for @escaping @callee_guaranteed (@guaranteed Result<(Data, NSHTTPURLResponse), Error>) -> () + 56
71  tv.fiit.Fiit                  	0x0000000108962431 partial apply for thunk for @escaping @callee_guaranteed (@guaranteed Result<(Data, NSHTTPURLResponse), Error>) -> () + 17
72  tv.fiit.Fiit                  	0x0000000108961825 thunk for @escaping @callee_guaranteed (@in_guaranteed Result<(Data, NSHTTPURLResponse), Error>) -> (@out ()) + 101
73  tv.fiit.Fiit                  	0x0000000108963d4d URLSessionClient.urlSession(_:task:didCompleteWithError:) + 2701
74  tv.fiit.Fiit                  	0x000000010896453f @objc URLSessionClient.urlSession(_:task:didCompleteWithError:) + 159
75  com.apple.CFNetwork           	0x0000000114ca7313 0x114b09000 + 1696531
76  com.apple.Foundation          	0x00000001113fe583 __NSBLOCKOPERATION_IS_CALLING_OUT_TO_A_BLOCK__ + 7
77  com.apple.Foundation          	0x00000001113fe47b -[NSBlockOperation main] + 98
78  com.apple.Foundation          	0x0000000111401408 __NSOPERATION_IS_INVOKING_MAIN__ + 17
79  com.apple.Foundation          	0x00000001113fd67b -[NSOperation start] + 731
80  com.apple.Foundation          	0x0000000111401d62 __NSOPERATIONQUEUE_IS_STARTING_AN_OPERATION__ + 17
81  com.apple.Foundation          	0x000000011140186c __NSOQSchedule_f + 182
82  libdispatch.dylib             	0x0000000117cb02ec _dispatch_block_async_invoke2 + 83
83  libdispatch.dylib             	0x0000000117ca37f9 _dispatch_client_callout + 8
84  libdispatch.dylib             	0x0000000117cafd22 _dispatch_main_queue_callback_4CF + 1212
85  com.apple.CoreFoundation      	0x0000000115021699 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9
86  com.apple.CoreFoundation      	0x000000011501c2f9 __CFRunLoopRun + 2329
87  com.apple.CoreFoundation      	0x000000011501b6b6 CFRunLoopRunSpecific + 438
88  com.apple.GraphicsServices    	0x000000011cad0bb0 GSEventRunModal + 65
89  com.apple.UIKitCore           	0x000000011e3cca67 UIApplicationMain + 1621
90  tv.fiit.Fiit                  	0x0000000106cd4fd2 main + 306 (main.swift:31)
91  libdyld.dylib                 	0x0000000117d24cf5 start + 1

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions