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

Test failure: Loader/binding/tracing/BinderTracingTest.Basic/BinderTracingTest.Basic.sh #45088

Closed
v-haren opened this issue Nov 23, 2020 · 7 comments · Fixed by #45570
Closed
Labels
area-AssemblyLoader-coreclr JitStress CLR JIT issues involving JIT internal stress modes untriaged New issue has not been triaged by the area owner

Comments

@v-haren
Copy link

v-haren commented Nov 23, 2020

failed in job: runtime-coreclr jitstress2-jitstressregs 20201122.1

CoreCLR OSX x64 Checked jitstress2_jitstressregs0x1000 @ OSX.1013.Amd64.Open

Error message

Return code:      1
Raw output file:      /private/tmp/helix/working/C3560A8F/w/AE9E091C/e/Loader/binding/Reports/Loader.binding/tracing/BinderTracingTest.Basic/BinderTracingTest.Basic.output.txt
Raw output:
BEGIN EXECUTION
/tmp/helix/working/C3560A8F/p/corerun BinderTracingTest.Basic.dll ''
[11:36:55 AM] Running LoadFile...
[11:36:56 AM] Running LoadBytes...
[11:36:57 AM] Running LoadFromStream...
[11:36:57 AM] Running LoadFromAssemblyPath...
[11:36:57 AM] Launching process for LoadFromAssemblyName...
[11:36:58 AM] Running LoadFromAssemblyName...

[11:37:00 AM] Launching process for LoadFrom...
[11:37:01 AM] Running LoadFrom...

[11:37:02 AM] Launching process for PlatformAssembly...
[11:37:03 AM] Running PlatformAssembly...

[11:37:04 AM] Launching process for PlatformAssembly_Cached...
[11:37:04 AM] Running PlatformAssembly_Cached...

[11:37:06 AM] Launching process for Reflection...
[11:37:06 AM] Running Reflection...

[11:37:07 AM] Launching process for Reflection_Cached...
[11:37:08 AM] Running Reflection_Cached...

[11:37:09 AM] Launching process for Reflection_CustomALC...
[11:37:10 AM] Running Reflection_CustomALC...

[11:37:11 AM] Launching process for ContextualReflection_DefaultToCustomALC...
[11:37:11 AM] Running ContextualReflection_DefaultToCustomALC...

[11:37:13 AM] Launching process for ContextualReflection_CustomToDefaultALC...
[11:37:13 AM] Running ContextualReflection_CustomToDefaultALC...

[11:37:14 AM] Launching process for JITLoad...
[11:37:15 AM] Running JITLoad...

[11:37:16 AM] Launching process for JITLoad_CustomALC...
[11:37:16 AM] Running JITLoad_CustomALC...

[11:37:18 AM] Running AssemblyInAppPath...
Test AssemblyInAppPath failed: System.AggregateException: One or more errors occurred. (An error occurred when writing to a listener.)
 ---> System.Diagnostics.Tracing.EventSourceException: An error occurred when writing to a listener.
 ---> System.ArgumentNullException: Value cannot be null. (Parameter 'source')
   at System.Linq.ThrowHelper.ThrowArgumentNullException(ExceptionArgument argument) in //src/libraries/System.Linq/src/System/Linq/ThrowHelper.cs:line 12
   at System.Linq.Enumerable.Any[TSource](IEnumerable1 source, Func2 predicate) in //src/libraries/System.Linq/src/System/Linq/AnyAll.cs:line 51
   at BinderTracingTests.BinderEventListener.IsLoadToTrack(String name) in /__w/1/s/src/tests/Loader/binding/tracing/BinderEventListener.cs:line 361
   at BinderTracingTests.BinderEventListener.OnEventWritten(EventWrittenEventArgs data) in /__w/1/s/src/tests/Loader/binding/tracing/BinderEventListener.cs:line 234
   at System.Diagnostics.Tracing.EventSource.DispatchToAllListeners(Int32 eventId, EventWrittenEventArgs eventCallbackArgs)
   --- End of inner exception stack trace ---
   at System.Diagnostics.Tracing.EventSource.DispatchToAllListeners(Int32 eventId, EventWrittenEventArgs eventCallbackArgs)
   at System.Diagnostics.Tracing.EventSource.WriteToAllListeners(Int32 eventId, UInt32* osThreadId, DateTime* timeStamp, Guid* activityID, Guid* childActivityID, Object[] args)
   at System.Diagnostics.Tracing.EventPipeEventDispatcher.DispatchEventsToEventListeners()
   at System.Threading.Tasks.Task.InnerInvoke()
   at System.Threading.Tasks.Task.<>c.<.cctor>b__278_0(Object obj)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location ---
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
   --- End of inner exception stack trace ---
   at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
   at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellation


Stack trace
   at Loader_binding._tracing_BinderTracingTest_Basic_BinderTracingTest_Basic_._tracing_BinderTracingTest_Basic_BinderTracingTest_Basic_sh() in /Users/runner/work/1/s/artifacts/tests/coreclr/OSX.x64.Checked/TestWrappers/Loader.binding/Loader.binding.XUnitWrapper.cs:line 902

Runfo Tracking Issue: loader/binding/tracing/bindertracingtest.resolutionflow/bindertracingtest.basic.sh

Build Definition Kind Run Name

Build Result Summary

Day Hit Count Week Hit Count Month Hit Count
0 0 0
@v-haren v-haren added the JitStress CLR JIT issues involving JIT internal stress modes label Nov 23, 2020
@Dotnet-GitSync-Bot Dotnet-GitSync-Bot added area-Tracing-coreclr untriaged New issue has not been triaged by the area owner labels Nov 23, 2020
@ghost
Copy link

ghost commented Nov 25, 2020

Tagging subscribers to this area: @vitek-karas, @agocke, @CoffeeFlux
See info in area-owners.md if you want to be subscribed.

Issue Details

failed in job: runtime-coreclr jitstress2-jitstressregs 20201122.1

CoreCLR OSX x64 Checked jitstress2_jitstressregs0x1000 @ OSX.1013.Amd64.Open

Error message

Return code:      1
Raw output file:      /private/tmp/helix/working/C3560A8F/w/AE9E091C/e/Loader/binding/Reports/Loader.binding/tracing/BinderTracingTest.Basic/BinderTracingTest.Basic.output.txt
Raw output:
BEGIN EXECUTION
/tmp/helix/working/C3560A8F/p/corerun BinderTracingTest.Basic.dll ''
[11:36:55 AM] Running LoadFile...
[11:36:56 AM] Running LoadBytes...
[11:36:57 AM] Running LoadFromStream...
[11:36:57 AM] Running LoadFromAssemblyPath...
[11:36:57 AM] Launching process for LoadFromAssemblyName...
[11:36:58 AM] Running LoadFromAssemblyName...

[11:37:00 AM] Launching process for LoadFrom...
[11:37:01 AM] Running LoadFrom...

[11:37:02 AM] Launching process for PlatformAssembly...
[11:37:03 AM] Running PlatformAssembly...

[11:37:04 AM] Launching process for PlatformAssembly_Cached...
[11:37:04 AM] Running PlatformAssembly_Cached...

[11:37:06 AM] Launching process for Reflection...
[11:37:06 AM] Running Reflection...

[11:37:07 AM] Launching process for Reflection_Cached...
[11:37:08 AM] Running Reflection_Cached...

[11:37:09 AM] Launching process for Reflection_CustomALC...
[11:37:10 AM] Running Reflection_CustomALC...

[11:37:11 AM] Launching process for ContextualReflection_DefaultToCustomALC...
[11:37:11 AM] Running ContextualReflection_DefaultToCustomALC...

[11:37:13 AM] Launching process for ContextualReflection_CustomToDefaultALC...
[11:37:13 AM] Running ContextualReflection_CustomToDefaultALC...

[11:37:14 AM] Launching process for JITLoad...
[11:37:15 AM] Running JITLoad...

[11:37:16 AM] Launching process for JITLoad_CustomALC...
[11:37:16 AM] Running JITLoad_CustomALC...

[11:37:18 AM] Running AssemblyInAppPath...
Test AssemblyInAppPath failed: System.AggregateException: One or more errors occurred. (An error occurred when writing to a listener.)
 ---> System.Diagnostics.Tracing.EventSourceException: An error occurred when writing to a listener.
 ---> System.ArgumentNullException: Value cannot be null. (Parameter 'source')
   at System.Linq.ThrowHelper.ThrowArgumentNullException(ExceptionArgument argument) in //src/libraries/System.Linq/src/System/Linq/ThrowHelper.cs:line 12
   at System.Linq.Enumerable.Any[TSource](IEnumerable1 source, Func2 predicate) in //src/libraries/System.Linq/src/System/Linq/AnyAll.cs:line 51
   at BinderTracingTests.BinderEventListener.IsLoadToTrack(String name) in /__w/1/s/src/tests/Loader/binding/tracing/BinderEventListener.cs:line 361
   at BinderTracingTests.BinderEventListener.OnEventWritten(EventWrittenEventArgs data) in /__w/1/s/src/tests/Loader/binding/tracing/BinderEventListener.cs:line 234
   at System.Diagnostics.Tracing.EventSource.DispatchToAllListeners(Int32 eventId, EventWrittenEventArgs eventCallbackArgs)
   --- End of inner exception stack trace ---
   at System.Diagnostics.Tracing.EventSource.DispatchToAllListeners(Int32 eventId, EventWrittenEventArgs eventCallbackArgs)
   at System.Diagnostics.Tracing.EventSource.WriteToAllListeners(Int32 eventId, UInt32* osThreadId, DateTime* timeStamp, Guid* activityID, Guid* childActivityID, Object[] args)
   at System.Diagnostics.Tracing.EventPipeEventDispatcher.DispatchEventsToEventListeners()
   at System.Threading.Tasks.Task.InnerInvoke()
   at System.Threading.Tasks.Task.<>c.<.cctor>b__278_0(Object obj)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location ---
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
   --- End of inner exception stack trace ---
   at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
   at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellation


Stack trace
   at Loader_binding._tracing_BinderTracingTest_Basic_BinderTracingTest_Basic_._tracing_BinderTracingTest_Basic_BinderTracingTest_Basic_sh() in /Users/runner/work/1/s/artifacts/tests/coreclr/OSX.x64.Checked/TestWrappers/Loader.binding/Loader.binding.XUnitWrapper.cs:line 902
Author: v-haren
Assignees: -
Labels:

JitStress, area-AssemblyLoader-coreclr, area-Tracing-coreclr, untriaged

Milestone: -

@tommcdon
Copy link
Member

Looks like a NullReferenceException in the bind event listener

@vitek-karas
Copy link
Member

Looking through the code I don't see a way to make this value null - it's initialized in a .ctor and it will never be null (the .ctor has exactly one callsite and that initializes the value with new string[] or ToArray).

Personally I would wait a bit if it gets another hit...

@elinor-fung - maybe you will see some other way...

@elinor-fung
Copy link
Member

I'm not seeing how it would be null either. I guess maybe if OnEventWritten was somehow being called on BinderEventListener after it had been collected? But I don't see how that would happen.

@AntonLapounov
Copy link
Member

@sywhang Could you please explain why this test used to fail with an ArgumentNullException?

@hoyosjs
Copy link
Member

hoyosjs commented Dec 4, 2020

A task is used to monitor/pump events into listeners. When the last listener waiting was getting disposed (the one used in the test) it tried to remove itself from the interested EventSources. Part of it is to stop said task while the event dispatch configurations get updated. That set of operations triggered a TPL event, which the listener getting disposed was listening to. At that point, the string array had already been disposed of hence the nullref.

@sywhang
Copy link
Contributor

sywhang commented Dec 4, 2020

@hoyosjs is correct. Thanks for jumping in and explaining - I should've done that when I submitted the PR :-)

@ghost ghost locked as resolved and limited conversation to collaborators Jan 3, 2021
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-AssemblyLoader-coreclr JitStress CLR JIT issues involving JIT internal stress modes untriaged New issue has not been triaged by the area owner
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants