SOS_PROCESS_AFFINITY_MUTEX

(Republishing, or using this info in a commercial product/website, is prohibited without permission. All other uses are permitted. If in doubt, please ask.)

(Back to main page…)

Description:

This wait type is when a thread is waiting for access to the processor affinity settings when deciding on which processor to place a new task, under some circumstances.

(Books Online description: “Occurs during synchronizing of access to process affinity settings.”)

Questions/comments on this wait type? Click here to send Paul an email, especially if you have any information to add to this topic.

Added in SQL Server version:

Pre-2005/2005

Removed in SQL Server version:

N/A

Extended Events wait_type value:

The map_key value in sys.dm_xe_map_values is 272 in 2008 and 2008 R2, 279 in 2012, and 286 in 2014 RTM. After 2014 RTM, you must check the DMV to get the latest value as some map_key values have changed in later builds.

Other information:

I have not seen this wait type be a noticeable contention point.

Known occurrences in SQL Server (list number matches call stack list):

  1. Waiting for access to the processor affinity settings (in this case, when creating a task to handle Service Broker messages as part of database mirroring)

And other similar call stacks.

Abbreviated call stacks (list number matches known occurrences list):

  1. SOS_Task::PostWait+9e
    EventInternal<SuspendQueueSLock>::Wait+2ca
    SOS_Mutex::Wait+9b
    TAutoMutex<SOS_Mutex,1>::GetAccess+d9
    SOS_Node::SpreadMultipleTasksAcrossNodes+2c7
    SOS_Node::EnqueueMultipleTasks+52
    CSbTask::Submit+143
    CSbTaskManager::KickOffTaskHandler+160
    CSbTaskManager::SubmitIdempotentTask+2e2
    CSbIdempotentTask::IdempotentSubmit+85
    CConnectionEndpoint::KickSendTask+b9
    CConnectionEndpoint::Send+274
    CSbTransportMgr::SendNotify+7dd
    SendDbMirroringMessage+15e
    DbmTransport::SendFlowControlled+4e
    DbmTransport::SendNoFlowControl+71
    DbmConnection::SendSSBMessageNoWait+185
    DbmConnection::SendPing+3ad
    LsConnectionStateMachine::OpenedAction+b2
    LsStateMachineBase::PostEvent+1d7
    LsStateMgr::ProcessEvents+113
    DbmDatabaseStateMgr::MasterThreadRoutine+303