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

AccessViolationException at NativeCallTargetDefinition #3199

Closed
Kielek opened this issue Dec 27, 2023 · 2 comments
Closed

AccessViolationException at NativeCallTargetDefinition #3199

Kielek opened this issue Dec 27, 2023 · 2 comments

Comments

@Kielek
Copy link
Contributor

Kielek commented Dec 27, 2023

Hi, I followed your documentation to add auto instrumentation https://opentelemetry.io/docs/instrumentation/net/automatic/nuget-packages/

Executing this command "instrument.cmd Adp.ProductStore.Client.exe" throws the following issue. Any idea on the same please?

Fatal error. System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
Repeat 2 times:

at OpenTelemetry.AutoInstrumentation.NativeMethods+Windows.AddInstrumentations(System.String, OpenTelemetry.AutoInstrumentation.NativeCallTargetDefinition[], Int32)

at OpenTelemetry.AutoInstrumentation.NativeMethods.AddInstrumentations(System.String, OpenTelemetry.AutoInstrumentation.NativeCallTargetDefinition[])
at OpenTelemetry.AutoInstrumentation.Instrumentation.RegisterBytecodeInstrumentations(Payload)
at OpenTelemetry.AutoInstrumentation.Instrumentation.Initialize()
at System.RuntimeMethodHandle.InvokeMethod(System.Object, System.Span1<System.Object> ByRef, System.Signature, Boolean, Boolean) at System.Reflection.RuntimeMethodInfo.Invoke(System.Object, System.Reflection.BindingFlags, System.Reflection.Binder, System.Object[], System.Globalization.CultureInfo) at System.Reflection.MethodBase.Invoke(System.Object, System.Object[]) at OpenTelemetry.AutoInstrumentation.Loader.Loader.TryLoadManagedAssembly() at OpenTelemetry.AutoInstrumentation.Loader.Loader..cctor() at OpenTelemetry.AutoInstrumentation.Loader.Loader..ctor() at System.RuntimeType.CreateInstanceDefaultCtor(Boolean, Boolean) at System.Activator.CreateInstance(System.Type, Boolean, Boolean) at System.RuntimeType.CreateInstanceImpl(System.Reflection.BindingFlags, System.Reflection.Binder, System.Object[], System.Globalization.CultureInfo) at System.Activator.CreateInstance(System.Type, System.Reflection.BindingFlags, System.Reflection.Binder, System.Object[], System.Globalization.CultureInfo, System.Object[]) at System.Reflection.Assembly.CreateInstance(System.String, Boolean, System.Reflection.BindingFlags, System.Reflection.Binder, System.Object[], System.Globalization.CultureInfo, System.Object[]) at System.Reflection.Assembly.CreateInstance(System.String) at StartupHook.Initialize() at System.RuntimeMethodHandle.InvokeMethod(System.Object, System.Span1<System.Object> ByRef, System.Signature, Boolean, Boolean)
at System.Reflection.RuntimeMethodInfo.Invoke(System.Object, System.Reflection.BindingFlags, System.Reflection.Binder, System.Object[], System.Globalization.CultureInfo)
at System.StartupHookProvider.CallStartupHook(StartupHookNameOrPath)
at System.StartupHookProvider.ProcessStartupHooks()

Originally posted by @junaid-git in open-telemetry/opentelemetry.io#3150 (comment)

@Kielek
Copy link
Contributor Author

Kielek commented Dec 27, 2023

@junaid-git, could you please share the Minimal, Reproducible Example with us? It should include all required steps. Simple source code, executed commands, system, privileges you have, etc.

@pellared pellared changed the title AccessVuikatuinException at NativeCallTargetDefinition AccessViolationException at NativeCallTargetDefinition Dec 27, 2023
@pjanotti
Copy link
Contributor

SIG: no repro, closing for now.

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