The problem isn’t with the OS knowing that the lock is lost, it’s with the application being able to find out and react to the fact it’s lost the lock. And that local locks are never lost and NFS locks are only lost when the server reboots, so this case is rare enough that actually testing your application’s implementation of dealing with lost locks is going to be really hard.
Right, it’s a pretty bad case that doesn’t happen very often. If you don’t deliver the signal, and likely kill the process, you’re allowing it to proceed in a totally unsafe condition. Like if you allowed two threads to enter the same mutex. It’s better to whack the thing and have it restart from scratch, at which point it will either get a new lock or at least fail to get a new lock, than to do the wrong thing.
Would a soft Mount option option help with this?
The problem isn’t with the OS knowing that the lock is lost, it’s with the application being able to find out and react to the fact it’s lost the lock. And that local locks are never lost and NFS locks are only lost when the server reboots, so this case is rare enough that actually testing your application’s implementation of dealing with lost locks is going to be really hard.
Right, it’s a pretty bad case that doesn’t happen very often. If you don’t deliver the signal, and likely kill the process, you’re allowing it to proceed in a totally unsafe condition. Like if you allowed two threads to enter the same mutex. It’s better to whack the thing and have it restart from scratch, at which point it will either get a new lock or at least fail to get a new lock, than to do the wrong thing.