Repository navigation
In-proc event listener listening to native runtime event source events crashes on Mono Linux #66854
Copy link
Copy link
Closed
Labels
area-Tracing-monodisabled-testThe test is disabled in source code against the issueThe test is disabled in source code against the issueos-linuxLinux OS (any supported distro)Linux OS (any supported distro)os-macosmacOS aka OSXmacOS aka OSX
Milestone
Description
In PR #66765 I tried to use an in-proc EventListener to listen to a thread pool event. On Mono, this appears to work fine on Windows but is crashing at the following stack on Linux. Also crashed on OSX in the PR's CI.
The test is in System.Threading.ThreadPool tests named 'CooperativeBlockingCanCreateThreadsFaster'. For now, I'll disable the test on Mono in that PR.
=================================================================
Managed Stacktrace:
=================================================================
at <unknown> <0xffffffff>
at System.Runtime.InteropServices.GCHandle:InternalGet <0x00079>
at System.Runtime.InteropServices.GCHandle:get_Target <0x00047>
at HandleManager:FromHandle <0x000ab>
at System.Threading.WaitSubsystem:SetEvent <0x0002b>
at System.Threading.EventWaitHandle:Set <0x0004b>
at System.Diagnostics.Tracing.EventPipeEventDispatcher:StopDispatchTask <0x0009b>
at System.Diagnostics.Tracing.EventPipeEventDispatcher:CommitDispatchConfiguration <0x0007b>
at System.Diagnostics.Tracing.EventPipeEventDispatcher:RemoveEventListener <0x000cb>
at System.Diagnostics.Tracing.EventListener:RemoveReferencesToListenerInEventSources <0x002eb>
at System.Diagnostics.Tracing.EventListener:Dispose <0x0010f>
at <>c:<CooperativeBlockingCanCreateThreadsFaster>b__38_0 <0x0052f>
at System.Object:runtime_invoke_void__this__ <0x00091>
at <unknown> <0xffffffff>
at System.Reflection.RuntimeMethodInfo:InternalInvoke <0x000b9>
at System.Reflection.RuntimeMethodInfo:InvokeWorker <0x0009f>
at System.Reflection.RuntimeMethodInfo:Invoke <0x001d3>
at System.Reflection.MethodBase:Invoke <0x00049>
at Microsoft.DotNet.RemoteExecutor.Program:Main <0x00313>
at <Module>:runtime_invoke_int_object <0x00091>
=================================================================
System.Threading.ThreadPools.Tests.ThreadPoolTests.CooperativeBlockingCanCreateThreadsFaster [FAIL]
Exit code was 134 but it should have been 42
Expected: True
Actual: False
Stack Trace:
/_/src/Microsoft.DotNet.RemoteExecutor/src/RemoteInvokeHandle.cs(239,0): at Microsoft.DotNet.RemoteExecutor.RemoteInvokeHandle.Dispose(Boolean disposing)
/_/src/Microsoft.DotNet.RemoteExecutor/src/RemoteInvokeHandle.cs(57,0): at Microsoft.DotNet.RemoteExecutor.RemoteInvokeHandle.Dispose()
/home/user/runtime/src/libraries/System.Threading.ThreadPool/tests/ThreadPoolTests.cs(914,0): at System.Threading.ThreadPools.Tests.ThreadPoolTests.CooperativeBlockingCanCreateThreadsFaster()
/home/user/runtime/src/mono/System.Private.CoreLib/src/System/Reflection/RuntimeMethodInfo.Mono.cs(386,0): at System.Reflection.RuntimeMethodInfo.InvokeWorker(Object obj, BindingFlags invokeAttr, Span`1 parameters)
Finished: System.Threading.ThreadPool.Tests
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area-Tracing-monodisabled-testThe test is disabled in source code against the issueThe test is disabled in source code against the issueos-linuxLinux OS (any supported distro)Linux OS (any supported distro)os-macosmacOS aka OSXmacOS aka OSX
Activity
lateralusX commentedon Jul 18, 2022
Most likely fixed by #68320. @kouvel is the test still disabled? I couldn't find any reference in the test to this issue anymore. If not, then I guess this issue could be closed.
lateralusX commentedon Jul 26, 2022
I run the CooperativeBlockingCanCreateThreadsFaster from ThreadPoolTests.cs test suite. Test runs and pass on OSX x64, so test is no longer disabled and works, closing issue.