Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.

Fix nested spin locks in thread pool etw firing #17677

Merged
merged 1 commit into from Apr 20, 2018
Merged

Commits on Apr 19, 2018

  1. Fix nested spin locks in thread pool etw firing

    `UnManagedPerAppDomainTPCount::QueueUnmanagedWorkRequest` fires an ETW event inside a spin lock and a nested spin lock is taken here:
    
    ```
    SpinLock::GetLock + 0x8E (0x719da71d)
    EventPipeBufferManager::AllocateBufferForThread + 0x7B (0x71afa92e)
    EventPipeBufferManager::WriteEvent + 0x250 (0x71afbe0a)
    EventPipe::WriteEventInternal + 0x125 (0x71951c93)
    EventPipe::WriteEvent + 0x91 (0x71951714)
    EventPipeWriteEventThreadPoolEnqueue + 0x9E (0x71d468a6)
    FireEtwThreadPoolEnqueue + 0xF (0x71b7a04b)
    UnManagedPerAppDomainTPCount::QueueUnmanagedWorkRequest + 0x21D (0x71b7a597)
    ```
    
    Nesting spin locks is not allowed, moved the ETW firing outside the lock.
    kouvel committed Apr 19, 2018
    Configuration menu
    Copy the full SHA
    07f12a2 View commit details
    Browse the repository at this point in the history