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

Crash on iOS 17.3.1 - NetworkService.createURLRequest(networkRequest:) EXC_BAD_ACCESS (KERN_PROTECTION_FAILURE) #1007

Open
2 of 3 tasks
ramanocs1145 opened this issue Mar 12, 2024 · 5 comments
Assignees
Labels
bug Something isn't working. Used by issue templates

Comments

@ramanocs1145
Copy link

ramanocs1145 commented Mar 12, 2024

Prerequisites

  • This is not a Security Disclosure, otherwise please follow the guidelines in Security Policy.
  • I have updated to the latest released version of the SDK and the issue still persists.
  • I have searched in this repository's issues to see if it has already been reported.

Bug summary

This existing crash - #958 - still happening on iOS 17.3.1 version as well as AEPService 4.2.2 version too.

Here I have provided the full stack-trace details below,

Crashlytics - Stack trace

com.apple.main-thread
0 libsystem_platform.dylib 0xf30 platform_memmove + 144
1 libswiftCore.dylib 0x3b009c swift_allocateGenericClassMetadata + 392
2 libswiftCore.dylib 0x3b2644 + 2536
3 SwiftUI 0x3e70 + 36
4 SwiftUI 0x179f94c + 528
5 SwiftUI 0x179ae64 + 10780
6 SwiftUI 0xe05d70 + 10080
7 SwiftUI 0xe05204 + 7156
8 SwiftUI 0x18f3168 + 31476
9 SwiftUI 0x18f1d64 + 26352
10 SwiftUI 0x18fe848 + 6064
11 VipPro 0x215020 SceneDelegate.navigateApp(
:shouldRemoveObject:tempPassword:) + 69 (UniversalLinking.swift:69)
12 VipPro 0x214d20 SceneDelegate.scene(:openURLContexts:) + 21 (UniversalLinking.swift:21)
13 VipPro 0x215ae0 @objc SceneDelegate.scene(
:openURLContexts:) + 4311177952 (:4311177952)
14 VipPro 0x116498 SceneDelegate.handleDeeplinking(:connectionOptions:) + 81 (SceneDelegate.swift:81)
15 VipPro 0x116afc specialized SceneDelegate.scene(
:willConnectTo:options:) + 28 (SceneDelegate.swift:28)
16 VipPro 0x115f34 @objc SceneDelegate.scene(_:willConnectTo:options:) + 4310130484 (:4310130484)
17 UIKitCore 0x192fe4 + 1080
18 UIKitCore 0x2500dc + 808
19 UIKitCore 0x24fc04 + 360
20 UIKitCore 0x24fa30 + 288
21 FrontBoardServices 0xf6d4 + 324
22 FrontBoardServices 0xf570 + 280
23 FrontBoardServices 0xe19c + 168
24 FrontBoardServices 0x19f8c + 352
25 libdispatch.dylib 0x4300 + 20
26 libdispatch.dylib 0x7d48 + 284
27 FrontBoardServices 0xa520 + 52
28 FrontBoardServices 0xa4a0 + 240
29 FrontBoardServices 0xa378 + 28
30 CoreFoundation 0x370ac + 28
31 CoreFoundation 0x36328 + 176
32 CoreFoundation 0x34b3c + 340
33 CoreFoundation 0x33818 + 828
34 CoreFoundation 0x333f8 CFRunLoopRunSpecific + 608
35 GraphicsServices 0x34f8 GSEventRunModal + 164
36 UIKitCore 0x22c8a0 + 888
37 UIKitCore 0x22bedc UIApplicationMain + 340
38 UIKitCore 0x456598 + 12220
39 VipPro 0x3c480 main + 4309238912 (AppDelegate.swift:4309238912)
40 ??? 0x1d51c6dcc (Missing)

com.google.fira.worker
0 libsystem_kernel.dylib 0x1cd4 pread + 8
1 libsqlite3.dylib 0x920fc sqlite3_sourceid + 7592
2 libsqlite3.dylib 0x7224 sqlite3_snprintf + 7780
3 libsqlite3.dylib 0x4dec sqlite3_vfs_find + 7440
4 libsqlite3.dylib 0x17e0 sqlite3_open_v2 + 2424
5 VipPro 0xcbd96c -[APMSqliteStore openAndValidateDatabase:] + 1672520
6 VipPro 0xcb9fbc -[APMSqliteStore initWithDatabasePath:error:] + 1657752
7 VipPro 0xc3d9b0 -[APMDatabase initializeDatabaseResourcesWithContext:databasePath:error:] + 1148300
8 VipPro 0xc352c8 -[APMDatabase initWithDatabaseName:persistedConfig:error:] + 1113764
9 VipPro 0xc5d56c __47-[APMMeasurement startMeasurementOnWorkerQueue]_block_invoke + 1278280
10 VipPro 0xc5d1e8 -[APMMeasurement startMeasurementOnWorkerQueue] + 1277380
11 VipPro 0xc5cab4 -[APMMeasurement setEnabledOnWorkerQueue:] + 1275536
12 VipPro 0xc5c9cc __29-[APMMeasurement setEnabled:]_block_invoke + 1275304
13 VipPro 0xcb4294 __51-[APMScheduler scheduleOnWorkerQueueBlockID:block:]_block_invoke + 1633904
14 libdispatch.dylib 0x26a8 + 32
15 libdispatch.dylib 0x4300 + 20
16 libdispatch.dylib 0xb894 + 748
17 libdispatch.dylib 0xc3c4 + 380
18 libdispatch.dylib 0x17004 + 288
19 libdispatch.dylib 0x16878 + 404
20 libsystem_pthread.dylib 0x1964 _pthread_wqthread + 288
21 libsystem_pthread.dylib 0x1a04 start_wqthread + 8

Thread
0 libsystem_kernel.dylib 0x96d0 __workq_kernreturn + 8
1 libsystem_pthread.dylib 0x19b0 _pthread_wqthread + 364
2 libsystem_pthread.dylib 0x1a04 start_wqthread + 8

com.apple.root.default-qos
0 libsystem_kernel.dylib 0x1bf8 __ulock_wait + 8
1 libdispatch.dylib 0x4cf0 + 56
2 libdispatch.dylib 0x4aa4 + 56
3 libdispatch.dylib 0x139a0 + 368
4 libdispatch.dylib 0x1354c + 148
5 VipPro 0x62968c __44+[FIRIAMActionURLFollower actionURLFollower]_block_invoke + 82 (FIRIAMActionURLFollower.m:82)
6 libdispatch.dylib 0x4300 + 20
7 libdispatch.dylib 0x5b3c + 32
8 VipPro 0x629400 +[FIRIAMActionURLFollower actionURLFollower] + 85 (once.h:85)
9 VipPro 0x62ade4 -[FIRIAMRuntimeManager internalStartRuntimeWithSDKSettings:] + 330 (FIRIAMRuntimeManager.m:330)
10 libdispatch.dylib 0x26a8 + 32
11 libdispatch.dylib 0x4300 + 20
12 libdispatch.dylib 0x744c + 928
13 libdispatch.dylib 0x15be4 + 392
14 libdispatch.dylib 0x163ec + 156
15 libsystem_pthread.dylib 0x1928 _pthread_wqthread + 228
16 libsystem_pthread.dylib 0x1a04 start_wqthread + 8

APMDefaultIdentitySupport
0 ??? 0x1d51dacb4 (Missing)
1 ??? 0x1d51c3228 (Missing)
2 ??? 0x1d51c4094 (Missing)
3 libobjc.A.dylib 0x804c __sel_registerName(char const*, bool, bool) + 48
4 Foundation 0x45c4 NSSelectorFromString + 156
5 VipPro 0xc213e0 -[APMPlatformIdentitySupport resettableDeviceID] + 1032124
6 VipPro 0xc416d4 __47-[APMDefaultIdentitySupport resettableDeviceID]_block_invoke + 1163952
7 libdispatch.dylib 0x13250 + 148
8 libdispatch.dylib 0x4300 + 20
9 libdispatch.dylib 0xb894 + 748
10 libdispatch.dylib 0xc3c4 + 380
11 libdispatch.dylib 0x17004 + 288
12 libdispatch.dylib 0x16878 + 404
13 libsystem_pthread.dylib 0x1964 _pthread_wqthread + 288
14 libsystem_pthread.dylib 0x1a04 start_wqthread + 8

com.apple.uikit.eventfetch-thread
0 libsystem_kernel.dylib 0x1178 mach_msg2_trap + 8
1 libsystem_kernel.dylib 0xf10 mach_msg2_internal + 80
2 libsystem_kernel.dylib 0xe28 mach_msg_overwrite + 436
3 libsystem_kernel.dylib 0xc68 mach_msg + 24
4 CoreFoundation 0x35a9c + 160
5 CoreFoundation 0x33994 + 1208
6 CoreFoundation 0x333f8 CFRunLoopRunSpecific + 608
7 Foundation 0x2c3ec + 212
8 Foundation 0x596ac + 64
9 UIKitCore 0x18e710 + 420
10 Foundation 0xafd40 + 732
11 libsystem_pthread.dylib 0x24d4 _pthread_start + 136
12 libsystem_pthread.dylib 0x1a10 thread_start + 8

com.google.GDTCORFlatFileStorage
0 libsystem_kernel.dylib 0x1a74 stat + 8
1 Foundation 0x7692c + 96
2 Foundation 0x75af8 + 148
3 Foundation 0x75a48 + 32
4 Foundation 0x74b8c + 100
5 VipPro 0x441ad8 __75-[GDTCORFlatFileStorage batchWithEventSelector:batchExpiration:onComplete:]_block_invoke_2 + 226 (GDTCORFlatFileStorage.m:226)
6 libdispatch.dylib 0x26a8 + 32
7 libdispatch.dylib 0x4300 + 20
8 libdispatch.dylib 0xb894 + 748
9 libdispatch.dylib 0xc3c4 + 380
10 libdispatch.dylib 0x17004 + 288
11 libdispatch.dylib 0x16878 + 404
12 libsystem_pthread.dylib 0x1964 _pthread_wqthread + 288
13 libsystem_pthread.dylib 0x1a04 start_wqthread + 8

Thread
0 libsystem_kernel.dylib 0x96d0 __workq_kernreturn + 8
1 libsystem_pthread.dylib 0x19b0 _pthread_wqthread + 364
2 libsystem_pthread.dylib 0x1a04 start_wqthread + 8

APMExperimentWorkerQueue
0 libsystem_kernel.dylib 0x1cd4 pread + 8
1 libsqlite3.dylib 0x920fc sqlite3_sourceid + 7592
2 libsqlite3.dylib 0x7224 sqlite3_snprintf + 7780
3 libsqlite3.dylib 0x4dec sqlite3_vfs_find + 7440
4 libsqlite3.dylib 0x17e0 sqlite3_open_v2 + 2424
5 VipPro 0xcbd96c -[APMSqliteStore openAndValidateDatabase:] + 1672520
6 VipPro 0xcb9fbc -[APMSqliteStore initWithDatabasePath:error:] + 1657752
7 VipPro 0xc41db4 -[APMEDatabase initializeDatabaseResourcesWithContext:databasePath:] + 1165712
8 VipPro 0xc41cdc -[APMEDatabase initWithPath:] + 1165496
9 VipPro 0xc4957c -[APMETaskManager startTaskManagerOnWorkerQueue] + 1196376
10 VipPro 0xc49534 __35-[APMETaskManager startTaskManager]_block_invoke + 1196304
11 VipPro 0xc4a864 __46-[APMETaskManager dispatchAsyncOnWorkerQueue:]_block_invoke + 1201216
12 libdispatch.dylib 0x26a8 + 32
13 libdispatch.dylib 0x4300 + 20
14 libdispatch.dylib 0xb894 + 748
15 libdispatch.dylib 0xc3c4 + 380
16 libdispatch.dylib 0x17004 + 288
17 libdispatch.dylib 0x16878 + 404
18 libsystem_pthread.dylib 0x1964 _pthread_wqthread + 288
19 libsystem_pthread.dylib 0x1a04 start_wqthread + 8

com.google.firebase.crashlytics.ios.binary-images
0 libsystem_kernel.dylib 0x1c50 write + 8
1 VipPro 0x7b1ac0 FIRCLSFileLoopWithWriteBlock + 244 (FIRCLSFile.m:244)
2 VipPro 0x7b1994 FIRCLSFileWriteToFileDescriptor + 219 (FIRCLSFile.m:219)
3 VipPro 0x7b1f9c FIRCLSFileWriteStringWithSuffix + 338 (FIRCLSFile.m:338)
4 VipPro 0x7b1df0 FIRCLSFileWriteHashKey + 525 (FIRCLSFile.m:525)
5 VipPro 0x79f4b4 FIRCLSProcessBinaryImageChange + 560 (FIRCLSBinaryImage.m:560)
6 libdispatch.dylib 0x4300 + 20
7 libdispatch.dylib 0xb894 + 748
8 libdispatch.dylib 0xc3c4 + 380
9 libdispatch.dylib 0x17004 + 288
10 libdispatch.dylib 0x16878 + 404
11 libsystem_pthread.dylib 0x1964 _pthread_wqthread + 288
12 libsystem_pthread.dylib 0x1a04 start_wqthread + 8

com.google.firebase.crashlytics.MachExceptionServer
0 VipPro 0x7a12a0 FIRCLSProcessRecordAllThreads + 393 (FIRCLSProcess.c:393)
1 VipPro 0x7a1680 FIRCLSProcessRecordAllThreads + 424 (FIRCLSProcess.c:424)
2 VipPro 0x7af0d4 FIRCLSHandler + 34 (FIRCLSHandler.m:34)
3 VipPro 0x7af8d8 FIRCLSMachExceptionServer + 521 (FIRCLSMachException.c:521)
4 libsystem_pthread.dylib 0x24d4 _pthread_start + 136
5 libsystem_pthread.dylib 0x1a10 thread_start + 8

com.apple.root.utility-qos
0 ??? 0x1d51c4000 (Missing)
1 ??? 0x1d51c3d3c (Missing)
2 ??? 0x1d51c3c5c (Missing)
3 ??? 0x1d51c3ad0 (Missing)
4 libswiftCore.dylib 0x3f20ec + 1828
5 libswiftCore.dylib 0x3f096c swift_conformsToProtocol + 156
6 AttributeGraph 0x45e4 + 184
7 AttributeGraph 0x7d68 + 360
8 libdispatch.dylib 0x4300 + 20
9 libdispatch.dylib 0x15dbc + 864
10 libdispatch.dylib 0x163ec + 156
11 libsystem_pthread.dylib 0x1928 _pthread_wqthread + 228
12 libsystem_pthread.dylib 0x1a04 start_wqthread + 8

Thread
0 libsystem_kernel.dylib 0x96d0 __workq_kernreturn + 8
1 libsystem_pthread.dylib 0x19b0 _pthread_wqthread + 364
2 libsystem_pthread.dylib 0x1a04 start_wqthread + 8

Thread
0 libsystem_kernel.dylib 0x96d0 __workq_kernreturn + 8
1 libsystem_pthread.dylib 0x19b0 _pthread_wqthread + 364
2 libsystem_pthread.dylib 0x1a04 start_wqthread + 8

com.adobe.mobile.persistenthitqueue
0 libsystem_kernel.dylib 0x10f4 semaphore_wait_trap + 8
1 libdispatch.dylib 0x489c + 28
2 libdispatch.dylib 0x4f4c + 132
3 AEPServices 0x310a4 closure #1 in PersistentHitQueue.processNextHit() + 304
4 AEPServices 0x2f478 thunk for @escaping @callee_guaranteed @sendable () -> () + 28 (:28)
5 libdispatch.dylib 0x26a8 + 32
6 libdispatch.dylib 0x4300 + 20
7 libdispatch.dylib 0xb894 + 748
8 libdispatch.dylib 0xc3c4 + 380
9 libdispatch.dylib 0x17004 + 288
10 libdispatch.dylib 0x16878 + 404
11 libsystem_pthread.dylib 0x1964 _pthread_wqthread + 288
12 libsystem_pthread.dylib 0x1a04 start_wqthread + 8

Thread
0 libsystem_kernel.dylib 0x96d0 __workq_kernreturn + 8
1 libsystem_pthread.dylib 0x19b0 _pthread_wqthread + 364
2 libsystem_pthread.dylib 0x1a04 start_wqthread + 8

Thread
0 libsystem_pthread.dylib 0x19fc _pthread_wqthread + 438

Crashed: com.adobe.OperationOrderer(anonymous)
0 libswiftCore.dylib 0x3fde64 swift_unknownObjectRetain + 20
1 libswiftCore.dylib 0xd8d04 $sSS23_bridgeToObjectiveCImplyXlyF + 92
2 Foundation 0x12bd78 + 272
3 AEPServices 0x2ee30 NetworkService.createURLRequest(networkRequest:) + 79 (NetworkService.swift:79)
4 AEPServices 0x2e148 NetworkService.connectAsync(networkRequest:completionHandler:) + 35 (NetworkService.swift:35)
5 AEPServices 0x2ef94 protocol witness for Networking.connectAsync(networkRequest:completionHandler:) in conformance NetworkService + 20 (:20)
6 AEPCore 0xb618 specialized ConfigurationDownloader.loadConfigFromUrl(appId:dataStore:completion:) + 82 (ConfigurationDownloader.swift:82)
7 AEPCore 0x9790 specialized Configuration.processConfigureWith(appId:event:sharedStateResolver:) + 112 (ConfigurationState.swift:112)
8 AEPCore 0x78b0 Configuration.receiveConfigurationRequest(event:) + 96 (Extension.swift:96)
9 AEPCore 0x9d58 partial apply for implicit closure #4 in implicit closure #3 in Configuration.onRegistered() + 20 (:20)
10 AEPCore 0x28404 thunk for @escaping @callee_guaranteed (@guaranteed Event) -> () + 52 (:52)
11 AEPCore 0x28f84 implicit closure #2 in implicit closure #1 in ExtensionContainer.init(::_:completion:) + 181 (ExtensionContainer.swift:181)
12 AEPCore 0x2a0f8 partial apply for thunk for @escaping @callee_guaranteed (@guaranteed Event) -> (@unowned Bool) + 24 (:24)
13 AEPServices 0x3030c OperationOrderer.drain() + 128 (OperationOrderer.swift:128)
14 AEPServices 0x1c36c thunk for @escaping @callee_guaranteed () -> () + 28 (:28)
15 libdispatch.dylib 0x4300 + 20
16 libdispatch.dylib 0x77b8 + 600
17 libdispatch.dylib 0x1b5c0 + 420
18 libdispatch.dylib 0x1a190 + 832
19 libdispatch.dylib 0xb718 + 368
20 libdispatch.dylib 0xc3c4 + 380
21 libdispatch.dylib 0x17004 + 288
22 libdispatch.dylib 0x16878 + 404
23 libsystem_pthread.dylib 0x1964 _pthread_wqthread + 288
24 libsystem_pthread.dylib 0x1a04 start_wqthread + 8

Thread
0 libsystem_pthread.dylib 0x19fc _pthread_wqthread + 438

Thread
0 libsystem_kernel.dylib 0x96d0 __workq_kernreturn + 8
1 libsystem_pthread.dylib 0x19b0 _pthread_wqthread + 364
2 libsystem_pthread.dylib 0x1a04 start_wqthread + 8

com.apple.CoreMotion.MotionThread
0 libsystem_kernel.dylib 0x1178 mach_msg2_trap + 8
1 libsystem_kernel.dylib 0xf10 mach_msg2_internal + 80
2 libsystem_kernel.dylib 0xe28 mach_msg_overwrite + 436
3 libsystem_kernel.dylib 0xc68 mach_msg + 24
4 CoreFoundation 0x35a9c + 160
5 CoreFoundation 0x33994 + 1208
6 CoreFoundation 0x333f8 CFRunLoopRunSpecific + 608
7 CoreFoundation 0x3315c CFRunLoopRun + 64
8 CoreMotion 0x2d22fc CLClientGetDistanceCoordinates + 297196
9 libsystem_pthread.dylib 0x24d4 _pthread_start + 136
10 libsystem_pthread.dylib 0x1a10 thread_start + 8

Thread
0 libsystem_pthread.dylib 0x19fc _pthread_wqthread + 438

Environment

OS: iOS 17.3.1
SDK(s): AEPService 4.2.2
IDE: Xcode 15.3
Device: iPhone 13

Steps to reproduce

No response

Current behavior

No response

Expected behavior

No response

Anything else?

No response

@ramanocs1145 ramanocs1145 added bug Something isn't working. Used by issue templates triage-required Triage required on a new issue logged for this project. Used by issue templates labels Mar 12, 2024
@ramanocs1145
Copy link
Author

@cdhoffmann Kindly look on this bug.

@cdhoffmann
Copy link
Contributor

cdhoffmann commented Mar 12, 2024

@ramanocs1145 I have a few questions.

I noticed you mentioned #958, is this the same customer/app?
Do you happen to have access to a full Xcode symbolicated crash report? This provides more needed information than Crashlytics.

@ramanocs1145
Copy link
Author

@cdhoffmann Regarding your questions,

I noticed you mentioned #958, is this the same customer/app? - I'm sure nope. It's a different app.

Do you happen to have access to a full Xcode symbolicated crash report? This provides more needed information than Crashlytics.

Ah I have checked this crash report on organizer. Here I have provided the details.

Screenshot 2024-03-13 at 2 39 18 PM

So the crash happening on the exact position is,
Screenshot 2024-03-13 at 2 27 39 PM

/// If a value was previously set for the given header
/// field, that value is replaced with the given value. Note that, in
/// keeping with the HTTP RFC, HTTP header field names are
/// case-insensitive.
public mutating func setValue(_ value: String?, forHTTPHeaderField field: String)

So I guess value of String seems optional. But field Key of String seems must. It should be optional means then we need to handle safely unwrap. I hope then this kind of crash will not happen again.

@cdhoffmann cdhoffmann self-assigned this Mar 13, 2024
@cdhoffmann
Copy link
Contributor

@ramanocs1145 Thank you, that is very helpful. I am confused though, because the NetworkRequest.httpHeaders does not take optionals. See here. It looks like you are able to replicate the crash since you captured the exact line, can you share what the actual crash reason is when it happens?

@ramanocs1145
Copy link
Author

@cdhoffmann FYI,

Actually this crash happened to a live user. During my investigation I got the exact crash line when I checked Crash details which is available on Xcode -> Organizer window. But I can't able to reproduce it on my side.

So my assumption our current project implemented Analytics from Adobe. I would say during some event calling there should be missing something related to headerFields. Maybe this reason the crash was happened.

At the moment I have this kind of reasons only. I will let you know If I got more information on later.

@praveek praveek removed the triage-required Triage required on a new issue logged for this project. Used by issue templates label May 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working. Used by issue templates
Projects
None yet
Development

No branches or pull requests

3 participants