Skip to content

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

Closed

Description

@v-haren

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

Activity

  1. added
    JitStress
    on Nov 23, 2020
  2. added
    untriaged
    on Nov 23, 2020
  3. tommcdon commented on Nov 25, 2020

    @tommcdon
    Member

    Looks like a NullReferenceException in the bind event listener

  4. vitek-karas commented on Nov 26, 2020

    @vitek-karas
    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...

  5. elinor-fung commented on Dec 1, 2020

    @elinor-fung
    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.

  6. reopened this on Dec 3, 2020
  7. ghost closed this as completedin #45570on Dec 4, 2020
  8. AntonLapounov commented on Dec 4, 2020

    @AntonLapounov
    Contributor

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

  9. hoyosjs commented on Dec 4, 2020

    @hoyosjs
    Member

    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.

  10. sywhang commented on Dec 4, 2020

    @sywhang
    Contributor

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

  11. ghost locked as resolved and limited conversation to collaborators on Jan 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    JitStressarea-AssemblyLoader-coreclruntriaged

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions