lvm2 uses flock to lock files. In the provided link I explain why this is unsafe. The only mechanism that can possibly avoid the potential issues here is to never ever unlink the lock file. Reproducible: Always
Created attachment 340686 [details, diff] patch to remove lockfile unlinking This is the only instance of unlink in the codebase that seems to have relation to lockfiles and as such should be the only instance that we absolutely HAVE to remove. Patch is compile tested and run-tested and confirmed to no longer remove the lock files.
Leaving dead lockfiles around is not acceptable and it should be safe to remove them in the manner in which the code is doing this: investigations are continuing.
Closing as upstream issue since agk is looking at it, please reopen if unresolved in 2.02.105.