Depending on the implementation, local state locks may be reentrant within the same process. Use a separate process to test locked state files.