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

ThreadSanitizer: data race #816

Open
faresMagdyElsokary opened this issue Jun 20, 2023 · 0 comments
Open

ThreadSanitizer: data race #816

faresMagdyElsokary opened this issue Jun 20, 2023 · 0 comments
Assignees

Comments

@faresMagdyElsokary
Copy link

while we use ThreadSanitizer, it detect an data race when we call insightsClient.sendEvents(events) in AsyncOperation in start() func when set state to executing

Here is the ThreadSanitizer waring logs:-
`WARNING: ThreadSanitizer: data race (pid=33856)
Write of size 1 at 0x00012c0d0178 by thread T12:
#0 AsyncOperation.start() AsyncOperation.swift:55 (AlgoliaSearchClient:arm64+0x588fc) (BuildId: 2a7b3cb091cc3ccf9912af59da82c51932000000200000000700000000000e00)
#1 @objc AsyncOperation.start() (AlgoliaSearchClient:arm64+0x58958) (BuildId: 2a7b3cb091cc3ccf9912af59da82c51932000000200000000700000000000e00)
#2 NSOPERATIONQUEUE_IS_STARTING_AN_OPERATION :675360464 (Foundation:arm64+0x42e3e0) (BuildId: e7f2a1f0fb2c3074a4eae5853bffcee432000000200000000700000000041000)
#3 _dispatch_client_callout :678448832 (libdispatch.dylib:arm64+0x5d4c) (BuildId: 88cf0ad253593f97b1106fd59a3bf3c132000000200000000700000000041000)

Previous read of size 1 at 0x00012c0d0178 by main thread (mutexes: write M0):
#0 @objc AsyncOperation.isFinished.getter :40 (AlgoliaSearchClient:arm64+0x58670) (BuildId: 2a7b3cb091cc3ccf9912af59da82c51932000000200000000700000000000e00)
#1 -[NSOperation waitUntilFinished] :675426944 (Foundation:arm64+0x4298e4) (BuildId: e7f2a1f0fb2c3074a4eae5853bffcee432000000200000000700000000041000)
#2 InsightsClient.sendEvents(:requestOptions:) InsightsClient.swift:112 (AlgoliaSearchClient:arm64+0x1517e8) (BuildId: 2a7b3cb091cc3ccf9912af59da82c51932000000200000000700000000000e00)
#3 AlgoliaAnalytics.log(
:parameters:) AlgoliaAnalytics.swift:73 (Qawafel:arm64+0x100431de4) (BuildId: c205cf05364c3c01be7185be2488868932000000300000000700000000000e00)
#4 protocol witness for AnalyticsProtocol.log(:parameters:) in conformance AlgoliaAnalytics (Qawafel:arm64+0x100432f3c) (BuildId: c205cf05364c3c01be7185be2488868932000000300000000700000000000e00)
#5 closure #1 in AnalyticsProvider.log(
:parameters:) AnalyticsProvider.swift:187 (Qawafel:arm64+0x100255868) (BuildId: c205cf05364c3c01be7185be2488868932000000300000000700000000000e00)
#6 partial apply for closure #1 in AnalyticsProvider.log(:parameters:) (Qawafel:arm64+0x100263f28) (BuildId: c205cf05364c3c01be7185be2488868932000000300000000700000000000e00)
#7 Sequence.forEach(
:) :680542672 (libswiftCore.dylib:arm64+0xa948c) (BuildId: f59b0c69ee283da5829334a59d3375bc32000000200000000700000000040f00)
#8 AnalyticsProvider.logProductViewed(:metatData:possion:) AnalyticsProvider.swift:259 (Qawafel:arm64+0x100258468) (BuildId: c205cf05364c3c01be7185be2488868932000000300000000700000000000e00)
#9 protocol witness for AnalyticsProviderProtocol.logProductViewed(
:metatData:possion:) in conformance AnalyticsProvider (Qawafel:arm64+0x100261690) (BuildId: c205cf05364c3c01be7185be2488868932000000300000000700000000000e00)
#10 ProductDetailsVM.publishData() ProductDetailsVM.swift:437 (Qawafel:arm64+0x100573410) (BuildId: c205cf05364c3c01be7185be2488868932000000300000000700000000000e00)
#11 ProductDetailsVM.setupDataSourceAndReload() ProductDetailsVM.swift:290 (Qawafel:arm64+0x1005719f4) (BuildId: c205cf05364c3c01be7185be2488868932000000300000000700000000000e00)
#12 closure #1 in ProductDetailsVM.getProductDetails() ProductDetailsVM.swift:267 (Qawafel:arm64+0x100570c30) (BuildId: c205cf05364c3c01be7185be2488868932000000300000000700000000000e00)
#13 partial apply for closure #1 in ProductDetailsVM.getProductDetails() (Qawafel:arm64+0x10058c560) (BuildId: c205cf05364c3c01be7185be2488868932000000300000000700000000000e00)
#14 closure #1 in ProductProvider.details(identifier:completion:) ProductProvider.swift:165 (Qawafel:arm64+0x100f1b480) (BuildId: c205cf05364c3c01be7185be2488868932000000300000000700000000000e00)
#15 partial apply for closure #1 in ProductProvider.details(identifier:completion:) (Qawafel:arm64+0x100f1b5c4) (BuildId: c205cf05364c3c01be7185be2488868932000000300000000700000000000e00)
#16 thunk for @escaping @callee_guaranteed (@guaranteed Result<BaseResponse?, NSError>, @unowned Bool) -> () (Qawafel:arm64+0x1004c2910) (BuildId: c205cf05364c3c01be7185be2488868932000000300000000700000000000e00)
#17 partial apply for thunk for @escaping @callee_guaranteed (@guaranteed Result<BaseResponse?, NSError>, @unowned Bool) -> () (Qawafel:arm64+0x1004c29bc) (BuildId: c205cf05364c3c01be7185be2488868932000000300000000700000000000e00)
#18 closure #3 in NLBaseAPI.fetchData<A, B, C>(target:shouldRetryOn401:responseClass:progress:cachedResponseKey:errorClass:completion:) NLBaseAPI.swift:100 (NetworkLayerSwift:arm64+0xa394) (BuildId: d173bb88555d37b5bce3bc1650ca599032000000200000000700000000000e00)
#19 partial apply for closure #3 in NLBaseAPI.fetchData<A, B, C>(target:shouldRetryOn401:responseClass:progress:cachedResponseKey:errorClass:completion:) (NetworkLayerSwift:arm64+0xb3c0) (BuildId: d173bb88555d37b5bce3bc1650ca599032000000200000000700000000000e00)
#20 closure #5 in NLBaseAPI.fetchData<A, B, C>(target:shouldRetryOn401:responseClass:progress:cachedResponseKey:errorClass:completion:) NLBaseAPI.swift:121 (NetworkLayerSwift:arm64+0xaddc) (BuildId: d173bb88555d37b5bce3bc1650ca599032000000200000000700000000000e00)
#21 partial apply for closure #5 in NLBaseAPI.fetchData<A, B, C>(target:shouldRetryOn401:responseClass:progress:cachedResponseKey:errorClass:completion:) (NetworkLayerSwift:arm64+0xb5d8) (BuildId: d173bb88555d37b5bce3bc1650ca599032000000200000000700000000000e00)
#22 closure #1 in MoyaProvider.requestNormal(:callbackQueue:progress:completion:) MoyaProvider+Internal.swift:30 (Moya:arm64+0x11568) (BuildId: 4d8805ccc24436a4a61713cbd1123a5332000000200000000700000000000e00)
#23 partial apply for closure #1 in MoyaProvider.requestNormal(
:callbackQueue:progress:completion:) (Moya:arm64+0x116c4) (BuildId: 4d8805ccc24436a4a61713cbd1123a5332000000200000000700000000000e00)
#24 closure #1 in closure #2 in MoyaProvider.requestNormal(:callbackQueue:progress:completion:) MoyaProvider+Internal.swift:73 (Moya:arm64+0x12208) (BuildId: 4d8805ccc24436a4a61713cbd1123a5332000000200000000700000000000e00)
#25 partial apply for closure #1 in closure #2 in MoyaProvider.requestNormal(
:callbackQueue:progress:completion:) (Moya:arm64+0x16610) (BuildId: 4d8805ccc24436a4a61713cbd1123a5332000000200000000700000000000e00)
#26 closure #2 in MoyaProvider.sendAlamofireRequest(:target:callbackQueue:progress:completion:) MoyaProvider+Internal.swift:278 (Moya:arm64+0x15804) (BuildId: 4d8805ccc24436a4a61713cbd1123a5332000000200000000700000000000e00)
#27 partial apply for closure #2 in MoyaProvider.sendAlamofireRequest
(:target:callbackQueue:progress:completion:) (Moya:arm64+0x16930) (BuildId: 4d8805ccc24436a4a61713cbd1123a5332000000200000000700000000000e00)
#28 closure #1 in DataRequest.response(callbackQueue:completionHandler:) :680541632 (Moya:arm64+0xa79c) (BuildId: 4d8805ccc24436a4a61713cbd1123a5332000000200000000700000000000e00)
#29 partial apply for closure #2 in DataRequest.response(callbackQueue:completionHandler:) (Moya:arm64+0xb8ac) (BuildId: 4d8805ccc24436a4a61713cbd1123a5332000000200000000700000000000e00)
#30 closure #1 in closure #1 in closure #1 in closure #1 in DataRequest.response(queue:completionHandler:) :678453312 (Alamofire:arm64+0xd4594) (BuildId: 5555615117e035cb9e2ef20492a9e72d32000000200000000700000000000e00)
#31 partial apply for closure #1 in closure #1 in closure #1 in closure #1 in DataRequest.response(queue:completionHandler:) (Alamofire:arm64+0xeb960) (BuildId: 5555615117e035cb9e2ef20492a9e72d32000000200000000700000000000e00)
#32 thunk for @escaping @callee_guaranteed () -> () (Alamofire:arm64+0x5e264) (BuildId: 5555615117e035cb9e2ef20492a9e72d32000000200000000700000000000e00)
#33 __tsan::invoke_and_release_block(void*) :678453088 (libclang_rt.tsan_iossim_dynamic.dylib:arm64+0x8796c) (BuildId: ce023e0a240933eaa69ce3fe788cd4a932000000200000000700000000000e00)
#34 _dispatch_client_callout :678462272 (libdispatch.dylib:arm64+0x5d4c) (BuildId: 88cf0ad253593f97b1106fd59a3bf3c132000000200000000700000000041000)
#35 static AppDelegate.$main() AppDelegate.swift:14 (Qawafel:arm64+0x10128cf34) (BuildId: c205cf05364c3c01be7185be2488868932000000300000000700000000000e00)
#36 main (Qawafel:arm64+0x10128e4bc) (BuildId: c205cf05364c3c01be7185be2488868932000000300000000700000000000e00)

Location is heap block of size 432 at 0x00012c0d0080 allocated by main thread:
#0 calloc :678466976 (libclang_rt.tsan_iossim_dynamic.dylib:arm64+0x5e3b8) (BuildId: ce023e0a240933eaa69ce3fe788cd4a932000000200000000700000000000e00)
#1 objc_rootAllocWithZone :679484736 (libobjc.A.dylib:arm64+0x1a3bc) (BuildId: dfe7d97ed1bd38d9b8f15c58d6bbf6ad32000000200000000700000000041000)
#2 specialized HTTPTransport.execute<A, B, C>(
:transform:) HTTPTransport.swift:44 (AlgoliaSearchClient:arm64+0x119ca0) (BuildId: 2a7b3cb091cc3ccf9912af59da82c51932000000200000000700000000000e00)
#3 InsightsClient.sendEvents(:requestOptions:) InsightsClient.swift:112 (AlgoliaSearchClient:arm64+0x1517e8) (BuildId: 2a7b3cb091cc3ccf9912af59da82c51932000000200000000700000000000e00)
#4 AlgoliaAnalytics.log(
:parameters:) AlgoliaAnalytics.swift:73 (Qawafel:arm64+0x100431de4) (BuildId: c205cf05364c3c01be7185be2488868932000000300000000700000000000e00)
#5 protocol witness for AnalyticsProtocol.log(:parameters:) in conformance AlgoliaAnalytics (Qawafel:arm64+0x100432f3c) (BuildId: c205cf05364c3c01be7185be2488868932000000300000000700000000000e00)
#6 closure #1 in AnalyticsProvider.log(
:parameters:) AnalyticsProvider.swift:187 (Qawafel:arm64+0x100255868) (BuildId: c205cf05364c3c01be7185be2488868932000000300000000700000000000e00)
#7 partial apply for closure #1 in AnalyticsProvider.log(:parameters:) (Qawafel:arm64+0x100263f28) (BuildId: c205cf05364c3c01be7185be2488868932000000300000000700000000000e00)
#8 Sequence.forEach(
:) :680551824 (libswiftCore.dylib:arm64+0xa948c) (BuildId: f59b0c69ee283da5829334a59d3375bc32000000200000000700000000040f00)
#9 AnalyticsProvider.logProductViewed(:metatData:possion:) AnalyticsProvider.swift:259 (Qawafel:arm64+0x100258468) (BuildId: c205cf05364c3c01be7185be2488868932000000300000000700000000000e00)
#10 protocol witness for AnalyticsProviderProtocol.logProductViewed(
:metatData:possion:) in conformance AnalyticsProvider (Qawafel:arm64+0x100261690) (BuildId: c205cf05364c3c01be7185be2488868932000000300000000700000000000e00)
#11 ProductDetailsVM.publishData() ProductDetailsVM.swift:437 (Qawafel:arm64+0x100573410) (BuildId: c205cf05364c3c01be7185be2488868932000000300000000700000000000e00)
#12 ProductDetailsVM.setupDataSourceAndReload() ProductDetailsVM.swift:290 (Qawafel:arm64+0x1005719f4) (BuildId: c205cf05364c3c01be7185be2488868932000000300000000700000000000e00)
#13 closure #1 in ProductDetailsVM.getProductDetails() ProductDetailsVM.swift:267 (Qawafel:arm64+0x100570c30) (BuildId: c205cf05364c3c01be7185be2488868932000000300000000700000000000e00)
#14 partial apply for closure #1 in ProductDetailsVM.getProductDetails() (Qawafel:arm64+0x10058c560) (BuildId: c205cf05364c3c01be7185be2488868932000000300000000700000000000e00)
#15 closure #1 in ProductProvider.details(identifier:completion:) ProductProvider.swift:165 (Qawafel:arm64+0x100f1b480) (BuildId: c205cf05364c3c01be7185be2488868932000000300000000700000000000e00)
#16 partial apply for closure #1 in ProductProvider.details(identifier:completion:) (Qawafel:arm64+0x100f1b5c4) (BuildId: c205cf05364c3c01be7185be2488868932000000300000000700000000000e00)
#17 thunk for @escaping @callee_guaranteed (@guaranteed Result<BaseResponse?, NSError>, @unowned Bool) -> () (Qawafel:arm64+0x1004c2910) (BuildId: c205cf05364c3c01be7185be2488868932000000300000000700000000000e00)
#18 partial apply for thunk for @escaping @callee_guaranteed (@guaranteed Result<BaseResponse?, NSError>, @unowned Bool) -> () (Qawafel:arm64+0x1004c29bc) (BuildId: c205cf05364c3c01be7185be2488868932000000300000000700000000000e00)
#19 closure #3 in NLBaseAPI.fetchData<A, B, C>(target:shouldRetryOn401:responseClass:progress:cachedResponseKey:errorClass:completion:) NLBaseAPI.swift:100 (NetworkLayerSwift:arm64+0xa394) (BuildId: d173bb88555d37b5bce3bc1650ca599032000000200000000700000000000e00)
#20 partial apply for closure #3 in NLBaseAPI.fetchData<A, B, C>(target:shouldRetryOn401:responseClass:progress:cachedResponseKey:errorClass:completion:) (NetworkLayerSwift:arm64+0xb3c0) (BuildId: d173bb88555d37b5bce3bc1650ca599032000000200000000700000000000e00)
#21 closure #5 in NLBaseAPI.fetchData<A, B, C>(target:shouldRetryOn401:responseClass:progress:cachedResponseKey:errorClass:completion:) NLBaseAPI.swift:121 (NetworkLayerSwift:arm64+0xaddc) (BuildId: d173bb88555d37b5bce3bc1650ca599032000000200000000700000000000e00)
#22 partial apply for closure #5 in NLBaseAPI.fetchData<A, B, C>(target:shouldRetryOn401:responseClass:progress:cachedResponseKey:errorClass:completion:) (NetworkLayerSwift:arm64+0xb5d8) (BuildId: d173bb88555d37b5bce3bc1650ca599032000000200000000700000000000e00)
#23 closure #1 in MoyaProvider.requestNormal(:callbackQueue:progress:completion:) MoyaProvider+Internal.swift:30 (Moya:arm64+0x11568) (BuildId: 4d8805ccc24436a4a61713cbd1123a5332000000200000000700000000000e00)
#24 partial apply for closure #1 in MoyaProvider.requestNormal(
:callbackQueue:progress:completion:) (Moya:arm64+0x116c4) (BuildId: 4d8805ccc24436a4a61713cbd1123a5332000000200000000700000000000e00)
#25 closure #1 in closure #2 in MoyaProvider.requestNormal(:callbackQueue:progress:completion:) MoyaProvider+Internal.swift:73 (Moya:arm64+0x12208) (BuildId: 4d8805ccc24436a4a61713cbd1123a5332000000200000000700000000000e00)
#26 partial apply for closure #1 in closure #2 in MoyaProvider.requestNormal(
:callbackQueue:progress:completion:) (Moya:arm64+0x16610) (BuildId: 4d8805ccc24436a4a61713cbd1123a5332000000200000000700000000000e00)
#27 closure #2 in MoyaProvider.sendAlamofireRequest(:target:callbackQueue:progress:completion:) MoyaProvider+Internal.swift:278 (Moya:arm64+0x15804) (BuildId: 4d8805ccc24436a4a61713cbd1123a5332000000200000000700000000000e00)
#28 partial apply for closure #2 in MoyaProvider.sendAlamofireRequest
(:target:callbackQueue:progress:completion:) (Moya:arm64+0x16930) (BuildId: 4d8805ccc24436a4a61713cbd1123a5332000000200000000700000000000e00)
#29 closure #1 in DataRequest.response(callbackQueue:completionHandler:) :680528736 (Moya:arm64+0xa79c) (BuildId: 4d8805ccc24436a4a61713cbd1123a5332000000200000000700000000000e00)
#30 partial apply for closure #2 in DataRequest.response(callbackQueue:completionHandler:) (Moya:arm64+0xb8ac) (BuildId: 4d8805ccc24436a4a61713cbd1123a5332000000200000000700000000000e00)
#31 closure #1 in closure #1 in closure #1 in closure #1 in DataRequest.response(queue:completionHandler:) :678467200 (Alamofire:arm64+0xd4594) (BuildId: 5555615117e035cb9e2ef20492a9e72d32000000200000000700000000000e00)
#32 partial apply for closure #1 in closure #1 in closure #1 in closure #1 in DataRequest.response(queue:completionHandler:) (Alamofire:arm64+0xeb960) (BuildId: 5555615117e035cb9e2ef20492a9e72d32000000200000000700000000000e00)
#33 thunk for @escaping @callee_guaranteed () -> () (Alamofire:arm64+0x5e264) (BuildId: 5555615117e035cb9e2ef20492a9e72d32000000200000000700000000000e00)
#34 __tsan::invoke_and_release_block(void*) :678466976 (libclang_rt.tsan_iossim_dynamic.dylib:arm64+0x8796c) (BuildId: ce023e0a240933eaa69ce3fe788cd4a932000000200000000700000000000e00)
#35 _dispatch_client_callout :678447488 (libdispatch.dylib:arm64+0x5d4c) (BuildId: 88cf0ad253593f97b1106fd59a3bf3c132000000200000000700000000041000)
#36 static AppDelegate.$main() AppDelegate.swift:14 (Qawafel:arm64+0x10128cf34) (BuildId: c205cf05364c3c01be7185be2488868932000000300000000700000000000e00)
#37 main (Qawafel:arm64+0x10128e4bc) (BuildId: c205cf05364c3c01be7185be2488868932000000300000000700000000000e00)

Mutex M0 (0x00012c0d00f8) created at:
#0 pthread_mutex_init :678466752 (libclang_rt.tsan_iossim_dynamic.dylib:arm64+0x30db0) (BuildId: ce023e0a240933eaa69ce3fe788cd4a932000000200000000700000000000e00)
#1 -[NSOperation init] :675412064 (Foundation:arm64+0x428bb4) (BuildId: e7f2a1f0fb2c3074a4eae5853bffcee432000000200000000700000000041000)
#2 specialized HTTPRequest.init(requester:retryStrategy:request:callType:timeout:transform:completion:) (AlgoliaSearchClient:arm64+0x102fe0) (BuildId: 2a7b3cb091cc3ccf9912af59da82c51932000000200000000700000000000e00)
#3 specialized HTTPRequestBuilder.build<A, B>(for:transform:with:) HTTPRequestBuilder.swift:35 (AlgoliaSearchClient:arm64+0x151ee4) (BuildId: 2a7b3cb091cc3ccf9912af59da82c51932000000200000000700000000000e00)
#4 specialized HTTPTransport.execute<A, B, C>(:transform:) HTTPTransport.swift:44 (AlgoliaSearchClient:arm64+0x119ca0) (BuildId: 2a7b3cb091cc3ccf9912af59da82c51932000000200000000700000000000e00)
#5 InsightsClient.sendEvents(
:requestOptions:) InsightsClient.swift:112 (AlgoliaSearchClient:arm64+0x1517e8) (BuildId: 2a7b3cb091cc3ccf9912af59da82c51932000000200000000700000000000e00)
#6 AlgoliaAnalytics.log(:parameters:) AlgoliaAnalytics.swift:73 (Qawafel:arm64+0x100431de4) (BuildId: c205cf05364c3c01be7185be2488868932000000300000000700000000000e00)
#7 protocol witness for AnalyticsProtocol.log(
:parameters:) in conformance AlgoliaAnalytics (Qawafel:arm64+0x100432f3c) (BuildId: c205cf05364c3c01be7185be2488868932000000300000000700000000000e00)
#8 closure #1 in AnalyticsProvider.log(:parameters:) AnalyticsProvider.swift:187 (Qawafel:arm64+0x100255868) (BuildId: c205cf05364c3c01be7185be2488868932000000300000000700000000000e00)
#9 partial apply for closure #1 in AnalyticsProvider.log(
:parameters:) (Qawafel:arm64+0x100263f28) (BuildId: c205cf05364c3c01be7185be2488868932000000300000000700000000000e00)
#10 Sequence.forEach(:) :680536848 (libswiftCore.dylib:arm64+0xa948c) (BuildId: f59b0c69ee283da5829334a59d3375bc32000000200000000700000000040f00)
#11 AnalyticsProvider.logProductViewed(
:metatData:possion:) AnalyticsProvider.swift:259 (Qawafel:arm64+0x100258468) (BuildId: c205cf05364c3c01be7185be2488868932000000300000000700000000000e00)
#12 protocol witness for AnalyticsProviderProtocol.logProductViewed(:metatData:possion:) in conformance AnalyticsProvider (Qawafel:arm64+0x100261690) (BuildId: c205cf05364c3c01be7185be2488868932000000300000000700000000000e00)
#13 ProductDetailsVM.publishData() ProductDetailsVM.swift:437 (Qawafel:arm64+0x100573410) (BuildId: c205cf05364c3c01be7185be2488868932000000300000000700000000000e00)
#14 ProductDetailsVM.setupDataSourceAndReload() ProductDetailsVM.swift:290 (Qawafel:arm64+0x1005719f4) (BuildId: c205cf05364c3c01be7185be2488868932000000300000000700000000000e00)
#15 closure #1 in ProductDetailsVM.getProductDetails() ProductDetailsVM.swift:267 (Qawafel:arm64+0x100570c30) (BuildId: c205cf05364c3c01be7185be2488868932000000300000000700000000000e00)
#16 partial apply for closure #1 in ProductDetailsVM.getProductDetails() (Qawafel:arm64+0x10058c560) (BuildId: c205cf05364c3c01be7185be2488868932000000300000000700000000000e00)
#17 closure #1 in ProductProvider.details(identifier:completion:) ProductProvider.swift:165 (Qawafel:arm64+0x100f1b480) (BuildId: c205cf05364c3c01be7185be2488868932000000300000000700000000000e00)
#18 partial apply for closure #1 in ProductProvider.details(identifier:completion:) (Qawafel:arm64+0x100f1b5c4) (BuildId: c205cf05364c3c01be7185be2488868932000000300000000700000000000e00)
#19 thunk for @escaping @callee_guaranteed (@guaranteed Result<BaseResponse?, NSError>, @unowned Bool) -> () (Qawafel:arm64+0x1004c2910) (BuildId: c205cf05364c3c01be7185be2488868932000000300000000700000000000e00)
#20 partial apply for thunk for @escaping @callee_guaranteed (@guaranteed Result<BaseResponse?, NSError>, @unowned Bool) -> () (Qawafel:arm64+0x1004c29bc) (BuildId: c205cf05364c3c01be7185be2488868932000000300000000700000000000e00)
#21 closure #3 in NLBaseAPI.fetchData<A, B, C>(target:shouldRetryOn401:responseClass:progress:cachedResponseKey:errorClass:completion:) NLBaseAPI.swift:100 (NetworkLayerSwift:arm64+0xa394) (BuildId: d173bb88555d37b5bce3bc1650ca599032000000200000000700000000000e00)
#22 partial apply for closure #3 in NLBaseAPI.fetchData<A, B, C>(target:shouldRetryOn401:responseClass:progress:cachedResponseKey:errorClass:completion:) (NetworkLayerSwift:arm64+0xb3c0) (BuildId: d173bb88555d37b5bce3bc1650ca599032000000200000000700000000000e00)
#23 closure #5 in NLBaseAPI.fetchData<A, B, C>(target:shouldRetryOn401:responseClass:progress:cachedResponseKey:errorClass:completion:) NLBaseAPI.swift:121 (NetworkLayerSwift:arm64+0xaddc) (BuildId: d173bb88555d37b5bce3bc1650ca599032000000200000000700000000000e00)
#24 partial apply for closure #5 in NLBaseAPI.fetchData<A, B, C>(target:shouldRetryOn401:responseClass:progress:cachedResponseKey:errorClass:completion:) (NetworkLayerSwift:arm64+0xb5d8) (BuildId: d173bb88555d37b5bce3bc1650ca599032000000200000000700000000000e00)
#25 closure #1 in MoyaProvider.requestNormal(
:callbackQueue:progress:completion:) MoyaProvider+Internal.swift:30 (Moya:arm64+0x11568) (BuildId: 4d8805ccc24436a4a61713cbd1123a5332000000200000000700000000000e00)
#26 partial apply for closure #1 in MoyaProvider.requestNormal(:callbackQueue:progress:completion:) (Moya:arm64+0x116c4) (BuildId: 4d8805ccc24436a4a61713cbd1123a5332000000200000000700000000000e00)
#27 closure #1 in closure #2 in MoyaProvider.requestNormal(
:callbackQueue:progress:completion:) MoyaProvider+Internal.swift:73 (Moya:arm64+0x12208) (BuildId: 4d8805ccc24436a4a61713cbd1123a5332000000200000000700000000000e00)
#28 partial apply for closure #1 in closure #2 in MoyaProvider.requestNormal(:callbackQueue:progress:completion:) (Moya:arm64+0x16610) (BuildId: 4d8805ccc24436a4a61713cbd1123a5332000000200000000700000000000e00)
#29 closure #2 in MoyaProvider.sendAlamofireRequest
(:target:callbackQueue:progress:completion:) MoyaProvider+Internal.swift:278 (Moya:arm64+0x15804) (BuildId: 4d8805ccc24436a4a61713cbd1123a5332000000200000000700000000000e00)
#30 partial apply for closure #2 in MoyaProvider.sendAlamofireRequest(_:target:callbackQueue:progress:completion:) (Moya:arm64+0x16930) (BuildId: 4d8805ccc24436a4a61713cbd1123a5332000000200000000700000000000e00)
#31 closure #1 in DataRequest.response(callbackQueue:completionHandler:) :680537888 (Moya:arm64+0xa79c) (BuildId: 4d8805ccc24436a4a61713cbd1123a5332000000200000000700000000000e00)
#32 partial apply for closure #2 in DataRequest.response(callbackQueue:completionHandler:) (Moya:arm64+0xb8ac) (BuildId: 4d8805ccc24436a4a61713cbd1123a5332000000200000000700000000000e00)
#33 closure #1 in closure #1 in closure #1 in closure #1 in DataRequest.response(queue:completionHandler:) :678442336 (Alamofire:arm64+0xd4594) (BuildId: 5555615117e035cb9e2ef20492a9e72d32000000200000000700000000000e00)
#34 partial apply for closure #1 in closure #1 in closure #1 in closure #1 in DataRequest.response(queue:completionHandler:) (Alamofire:arm64+0xeb960) (BuildId: 5555615117e035cb9e2ef20492a9e72d32000000200000000700000000000e00)
#35 thunk for @escaping @callee_guaranteed () -> () (Alamofire:arm64+0x5e264) (BuildId: 5555615117e035cb9e2ef20492a9e72d32000000200000000700000000000e00)
#36 __tsan::invoke_and_release_block(void*) :678466752 (libclang_rt.tsan_iossim_dynamic.dylib:arm64+0x8796c) (BuildId: ce023e0a240933eaa69ce3fe788cd4a932000000200000000700000000000e00)
#37 _dispatch_client_callout :678434048 (libdispatch.dylib:arm64+0x5d4c) (BuildId: 88cf0ad253593f97b1106fd59a3bf3c132000000200000000700000000041000)
#38 static AppDelegate.$main() AppDelegate.swift:14 (Qawafel:arm64+0x10128cf34) (BuildId: c205cf05364c3c01be7185be2488868932000000300000000700000000000e00)
#39 main (Qawafel:arm64+0x10128e4bc) (BuildId: c205cf05364c3c01be7185be2488868932000000300000000700000000000e00)

Thread T12 (tid=379522, running) is a GCD worker thread

SUMMARY: ThreadSanitizer: data race AsyncOperation.swift:55 in AsyncOperation.start()

ThreadSanitizer report breakpoint hit. Use 'thread info -s' to get extended information about the report.`

Environment:

  • OS: iOS
    Screenshot 2023-06-20 at 2 42 42 PM
@VladislavFitz VladislavFitz self-assigned this Jun 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants