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

Crash When Enabling Threading Events on Windows #48407

Closed
brianrob opened this issue Feb 17, 2021 · 4 comments · Fixed by #48414
Closed

Crash When Enabling Threading Events on Windows #48407

brianrob opened this issue Feb 17, 2021 · 4 comments · Fixed by #48414
Assignees
Milestone

Comments

@brianrob
Copy link
Member

Description

When running the latest dotnet SDK with threading events enabled, writing out the ThreadPoolWorkerThreadStart event causes a crash.

Steps:

  1. Build the tip of https://github.com/dotnet/installer. The latest official build does not consume the latest runtime yet.
  2. Start a PerfView session: PerfView.exe collect /ThreadTime
  3. Run dotnet new console

The following is output:

Fatal error. Internal CLR error. (0x80131506)
   at System.Diagnostics.Tracing.NativeRuntimeEventSource.ThreadPoolWorkerThreadStart(UInt32, UInt32, UInt16)
   at System.Threading.PortableThreadPool+WorkerThread.WorkerThreadStart()
   at System.Threading.Thread.StartCallback()

This is the full stack under a debugger:

00 (Inline Function) --------`-------- coreclr!ECall::GetQCallImpl+0x19 [D:\workspace\_work\1\s\src\coreclr\vm\ecall.cpp @ 691] 
01 000000bf`e69ff490 00007ffa`689f2605 coreclr!NDirect::NDirectLink+0x85 [D:\workspace\_work\1\s\src\coreclr\vm\dllimport.cpp @ 6373] 
02 000000bf`e69ff7b0 00007ffa`68b1edc3 coreclr!NDirectImportWorker+0x75 [D:\workspace\_work\1\s\src\coreclr\vm\dllimport.cpp @ 6554] 
03 000000bf`e69ff830 00007ffa`642d2cd1 coreclr!NDirectImportThunk+0x43
04 000000bf`e69ff8a0 00007ffa`641ccd7d System_Private_CoreLib!System.Diagnostics.Tracing.NativeRuntimeEventSource.ThreadPoolWorkerThreadStart(UInt32, UInt32, UInt16)+0x91
05 000000bf`e69ff990 00007ffa`641b39b5 System_Private_CoreLib!System.Threading.PortableThreadPool+WorkerThread.WorkerThreadStart()+0x9d
06 000000bf`e69ffa90 00007ffa`68b1f213 System_Private_CoreLib!System.Threading.Thread.StartCallback()+0x65
07 000000bf`e69ffad0 00007ffa`68a08888 coreclr!CallDescrWorkerInternal+0x83
08 000000bf`e69ffb10 00007ffa`68ac0dc9 coreclr!DispatchCallSimple+0x80 [D:\workspace\_work\1\s\src\coreclr\vm\callhelpers.cpp @ 225] 
09 000000bf`e69ffba0 00007ffa`68b3d3cc coreclr!ThreadNative::KickOffThread_Worker+0x89 [D:\workspace\_work\1\s\src\coreclr\vm\comsynchronizable.cpp @ 158] 
0a (Inline Function) --------`-------- coreclr!ManagedThreadBase_DispatchInner+0xd [D:\workspace\_work\1\s\src\coreclr\vm\threads.cpp @ 7299] 
0b 000000bf`e69ffc00 00007ffa`68b3d701 coreclr!ManagedThreadBase_DispatchMiddle+0x8c [D:\workspace\_work\1\s\src\coreclr\vm\threads.cpp @ 7343] 
0c 000000bf`e69ffcc0 00007ffa`68b3d80d coreclr!ManagedThreadBase_DispatchOuter+0xb1 [D:\workspace\_work\1\s\src\coreclr\vm\threads.cpp @ 7503] 
0d 000000bf`e69ffd60 00007ffa`68b0fe1c coreclr!ManagedThreadBase_FullTransition+0x1d [D:\workspace\_work\1\s\src\coreclr\vm\threads.cpp @ 7549] 
0e (Inline Function) --------`-------- coreclr!ManagedThreadBase::KickOff+0x1c [D:\workspace\_work\1\s\src\coreclr\vm\threads.cpp @ 7583] 
0f 000000bf`e69ffdb0 00007ffb`00197034 coreclr!ThreadNative::KickOffThread+0xdc [D:\workspace\_work\1\s\src\coreclr\vm\comsynchronizable.cpp @ 230] 
10 000000bf`e69ffe20 00007ffb`01a5d241 KERNEL32!BaseThreadInitThunk+0x14 [clientcore\base\win32\client\thread.c @ 64] 
11 000000bf`e69ffe50 00000000`00000000 ntdll!RtlUserThreadStart+0x21 [minkernel\ntdll\rtlstrt.c @ 1153] 

Configuration

Windows x64

Regression?

Yes, this is a regression.

@dotnet-issue-labeler dotnet-issue-labeler bot added area-Tracing-coreclr untriaged New issue has not been triaged by the area owner labels Feb 17, 2021
@brianrob
Copy link
Member Author

cc: @sywhang

@sywhang sywhang self-assigned this Feb 17, 2021
@sywhang sywhang removed the untriaged New issue has not been triaged by the area owner label Feb 17, 2021
@sywhang sywhang added this to the 6.0.0 milestone Feb 17, 2021
@sywhang
Copy link
Contributor

sywhang commented Feb 17, 2021

Thanks @brianrob. Seems like it's a dup of #48368 that I've been looking at since last night. This is a regression from #47829

@brianrob
Copy link
Member Author

Definitely could be. Sorry, I did a quick search for dupes, but didn't find this one.

@sywhang
Copy link
Contributor

sywhang commented Feb 17, 2021

@brianrob no worries at all! I've identified the issue and will be following up with a fix soon. Thanks for reporting this

@ghost ghost added the in-pr There is an active PR which will close this issue when it is merged label Feb 17, 2021
@ghost ghost removed the in-pr There is an active PR which will close this issue when it is merged label Feb 18, 2021
jkotas added a commit to dotnet/runtimelab that referenced this issue Feb 27, 2021
jkotas added a commit to jkotas/runtimelab that referenced this issue Feb 27, 2021
@ghost ghost locked as resolved and limited conversation to collaborators Mar 20, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants