The following error starts a sequence of other errors with the task persistency DB causing some Create User/Modify User tasks to remain "In progress" state.
The error will usually occur on bulk load operations such as mass explore/correlate operation on the provisioning server which will trigger etaCallBackExit (inbound operation).
Sample of error message in the server log:
ERROR [ims.TaskPersistence] DBDAOFactory.fetchObjectById - Exception getting object id:com.microsoft.sqlserver.jdbc.SQLServerException: Transaction (Process ID 66) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.
** Note: The deadlock symptom was spotted only when MS SQL server is used for the TP DB. Oracle does not seem to have this issue.
Solution found is running a procedure on the MS SQL Server: