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

OtlpHttpTraceExporter export function crash #607

Open
mamunto opened this issue Sep 26, 2024 · 3 comments
Open

OtlpHttpTraceExporter export function crash #607

mamunto opened this issue Sep 26, 2024 · 3 comments

Comments

@mamunto
Copy link
Contributor

mamunto commented Sep 26, 2024

Hey folks,

Recently we are seeing an elevated crash at OtlpHttpTraceExporter export function. We are still investigating but here is the crash log:

Incident Identifier: 57DA801A-2CBE-42F2-A4A7-15412554E0B8
Hardware Model:      iPhone12,1
AppStoreTools:       15F31e
AppVariant:          1:iPhone12,1:16
Code Type:           ARM-64 (Native)
Role:                Foreground
Parent Process:      launchd [1]

Date/Time:           2024-09-20 16:04:16.2185 -0400
Launch Time:         2024-09-20 16:03:55.8022 -0400
OS Version:          iPhone OS 17.1 (21B74)
Release Type:        User
Baseband Version:    5.00.00
Report Version:      104

Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
Exception Subtype: KERN_INVALID_ADDRESS at 0x0000000000000000
Exception Codes: 0x0000000000000001, 0x0000000000000000
VM Region Info: 0 is not in any region.  Bytes before following region: 4369170432
      REGION TYPE                 START - END      [ VSIZE] PRT/MAX SHRMOD  REGION DETAIL
      UNUSED SPACE AT START
--->  
Termination Reason: SIGNAL 11 Segmentation fault: 11
Terminating Process: exc handler [305]

Triggered by Thread:  24


Kernel Triage:
VM - (arg = 0x3) mach_vm_allocate_kernel failed within call to vm_map_enter
VM - (arg = 0x3) mach_vm_allocate_kernel failed within call to vm_map_enter
VM - (arg = 0x3) mach_vm_allocate_kernel failed within call to vm_map_enter


Thread 24 name:
Thread 24 Crashed:
0   ???                           	0x0000000000000000 0x0 + 0
1   XXXXAPP                     	0x0000000107f83d44 specialized OtlpHttpTraceExporter.export(spans:explicitTimeout:) + 59505988 (OtlpHttpTraceExporter.swift:48)
2   XXXXAPP                     	0x0000000107f83974 protocol witness for SpanExporter.export(spans:explicitTimeout:) in conformance OtlpHttpTraceExporter + 59505012 (<compiler-generated>:26)
3   XXXXAPP                     	0x0000000107ff7e44 closure #1 in BatchWorker.exportAction(spanList:explicitTimeout:) + 59981380 (<compiler-generated>:0)
4   XXXXAPP                     	0x0000000107ff7fc0 specialized Sequence.forEach(_:) + 59981760 (<compiler-generated>:0)
5   XXXXAPP                     	0x0000000107ff7bf8 closure #1 in BatchWorker.exportBatch(spanList:explicitTimeout:) + 59980792 (<compiler-generated>:0)
6   XXXXAPP                     	0x0000000107ff8efc thunk for @escaping @callee_guaranteed @Sendable () -> () + 59985660 (<compiler-generated>:0)
7   Foundation                    	0x000000018ef97cb8 __NSBLOCKOPERATION_IS_CALLING_OUT_TO_A_BLOCK__ + 24 (NSOperation.m:1545)
8   Foundation                    	0x000000018efc913c -[NSBlockOperation main] + 104 (NSOperation.m:1564)
9   Foundation                    	0x000000018efc69c4 __NSOPERATION_IS_INVOKING_MAIN__ + 16 (NSOperation.m:2189)
10  Foundation                    	0x000000018efc5ab4 -[NSOperation start] + 648 (NSOperation.m:1406)
11  Foundation                    	0x000000018efc85cc __NSOPERATIONQUEUE_IS_STARTING_AN_OPERATION__ + 16 (NSOperation.m:2220)
12  Foundation                    	0x000000018efc8338 __NSOQSchedule_f + 172 (NSOperation.m:2231)
13  libdispatch.dylib             	0x0000000197f7c250 _dispatch_block_async_invoke2 + 148 (queue.c:555)
14  libdispatch.dylib             	0x0000000197f6d300 _dispatch_client_callout + 20 (object.m:561)
15  libdispatch.dylib             	0x0000000197f707b8 _dispatch_continuation_pop + 600 (queue.c:306)
16  libdispatch.dylib             	0x0000000197f6fdd4 _dispatch_async_redirect_invoke + 584 (queue.c:830)
17  libdispatch.dylib             	0x0000000197f7ebe4 _dispatch_root_queue_drain + 392 (queue.c:7051)
18  libdispatch.dylib             	0x0000000197f7f3ec _dispatch_worker_thread2 + 156 (queue.c:7119)
19  libsystem_pthread.dylib       	0x00000001f9a11928 _pthread_wqthread + 228 (pthread.c:2642)
20  libsystem_pthread.dylib       	0x00000001f9a11a04 start_wqthread + 8 (:-1)

I truncated and some internal data and provided crash log here. I'm investigating and will update more if I find anything. Please share if anyone has any insight.

@bryce-b
Copy link
Member

bryce-b commented Oct 3, 2024

@mamunto can you also provide your open telemetry initialization?

@bryce-b
Copy link
Member

bryce-b commented Oct 24, 2024

@mamunto just a follow up to refresh this conversation.

@mamunto
Copy link
Contributor Author

mamunto commented Oct 24, 2024

Hey,

There was interesting findings. We found there was another SDK which was using URLSession swizzling and that was causing the issue. I think Nacho mentioned similar point. We will discuss more in our next session but for future anyone facing that issue should double check URLSession swizzling

Thanks

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