CSS SQL Server Engineers

This is the official team Web Log for Microsoft Customer Service and Support (CSS) SQL Support. Posts are provided by the CSS SQL Escalation Services

Why does PREEMPTIVE_OS_GETPROCADDRESS Show a Large Accumulation?

Why does PREEMPTIVE_OS_GETPROCADDRESS Show a Large Accumulation?

  • Comments 7

There is a bug in SQL Server 2008 that causes PREEMPTIVE_OS_GETPROCADDRESS to include and accumulate the execution time of the extended stored procedure (XPROC). The following is an example showing the increase in the GetProcAddress wait time.

select * from sys.dm_os_wait_stats where wait_type = 'PREEMPTIVE_OS_GETPROCADDRESS' or wait_type = 'MSQL_XP'
exec master..xp_dirtree
'f:\'
select * from sys.dm_os_wait_stats where wait_type = 'PREEMPTIVE_OS_GETPROCADDRESS' or wait_type = 'MSQL_XP'

GetProcAddress is used to load the entrypoint in the DLL (XPROC) and should complete quickly but due to the accumulation bug the wait time is inflated.   To get a better idea (ballpark) of how long GetProcAddress really takes you can using the following query.

declare @WaitTime bigint
select @WaitTime = wait_time_ms from sys.dm_os_wait_stats where wait_type =
'MSQL_XP'
select @WaitTime - wait_time_ms from sys.dm_os_wait_stats where wait_type = 'PREEMPTIVE_OS_GETPROCADDRESS'

Bob Dorr - Principal SQL Server Escalation Engineer

Leave a Comment
  • Please add 6 and 3 and type the answer here:
  • Post
  • Hi,

    Is there a fix for this problem ?

    Thank you,

    Victor S.

    DBA

  • Hi Bob,

    Do you know of any documentation on what PREEMPTIVE_OS_GETPROCADDRESS is and what it means?  I have an SQL Server backup through a third party tool that uses extended procs to do the backup.  The backups was killed, however it has been in a killed/rollback state for 3 hours and lists it's wait type as PREEMPTIVE_OS_GETPROCADDRESS.

    Thanks,

    Charley

  • I am seeing this wait in relation to the Quest LiteSpeed extended procedures. Is there a fix for this yet or plans for one?

  • Hi... Even we got the wait types PREEMPTIVE_OS_GETPROCADDRESS and PREEMPTIVE_OS_REPORTEVENT for quest litespeed backup thread. SPID was in hung state and we were not able to run the backup on database. We could not kill the process, server reboot was required.  

  • I have a process with a long waittime (around 4 days) of PREEMPTIVE_OS_GETPROCADDRESS, I am running SQL Server 2008 R2 SP1, the only solution is to restart the sql server service?

    Microsoft: We need urgent and update of this bug.

  • Would be nice to know if this is documented in a KB article and/or has been fixed in subsequent service packs or releases.

  • We are experiencing issues repeatedly with xp_sysmail_format_query waiting on preemptive_os_getprocaddress. The process has to be killed and it is an important production procedure.

    10.50.4260

    Any updates ?

Page 1 of 1 (7 items)