Retry on ephemeral fcntl EDEADLK

fcntl isn't thread aware, so it thinks that fcntl locks in unrelated threads
have a locking order dependency problem and bail out. We can just keep
retrying in a loop here.

(not 100% confident that is the explanation, but it's likely since this only
happens if you have multiple fcntl locks going on)