fix deadlock and update spin files