During a deadlock-ish server state, a query being used to examine the problem threw an 8115/arithmetic overflow error. Three views being INNER JOINed in the query were sys.dm_tran_locks, sys.sysprocesses, and sys.databases. A CROSS APPLY with sys.dm_exec_sql_text was then being used. The query executed as expected before the deadlock then threw the error during it. sys.dm_tran_locks and sys.dm_exec_sql_text seemed to work correctly when being run on their own.
) AS [object_name]
FROM sys.dm_tran_locks l
JOIN sys.databases db
ON l.resource_database_id = db.database_id
JOIN sys.sysprocesses sp
ON l.request_session_id = sp.spid
CROSS APPLY sys.dm_exec_sql_text(sp.sql_handle) AS qt