From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Teigland Date: Tue, 13 Oct 2015 09:36:46 -0500 Subject: [Cluster-devel] problem about dlm posix file lock (sorry for missing subjuct) In-Reply-To: <561D4DDD020000D40000DB70@relay2.provo.novell.com> References: <561D4DDD020000D40000DB70@relay2.provo.novell.com> Message-ID: <20151013143646.GA15036@redhat.com> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit On Tue, Oct 13, 2015 at 04:30:53AM -0600, Zhen Ren wrote: > It expects alarm timeout to send SIGALRM, and wake up the sleep process, > as "man fcntl" says: "If a signal is caught while waiting, then > the call is interrupted and (after the signal handler has returned) > returns immediately (with return value -1 and errno set to EINTR". Hi, thanks for investigating this. Have you verified that SIGALRM interrupts the process on a local fs? Is it any signal? Is this causing problems for a real program? > dlm_posix_lock -> wait_event_killable > And wait_event_killable will put process into "TASK_KILLABLE" state > which's like "UNINTERRUPTABLE" but can be waked up by fatal signals. I > did some tests, SIGTERM can did it, but SIGALRM cannot. Perhaps we should replace that wait_event_killable with wait_event_interruptible. Could you recompile with that change and see if it does what you want? > Did this go against posix file lock semanteme? Any hints would be very > appreciated! I can provide any infos as I can if needed;-) Posix locks on a cluster file system are always going to behave somewhat differently than a local fs, but this may be a case where the difference can be easily avoided with the change above. Changing the behavior after so long is a slightly concerning, though. Dave