* [Cluster-devel] problem about dlm posix file lock (sorry for missing subjuct) [not found] <561D4DDD020000D40000DB70@relay2.provo.novell.com> @ 2015-10-13 14:36 ` David Teigland 2015-10-14 1:09 ` [Cluster-devel] problem about dlm posix file lock (sorry for missing subject) Eric Ren 0 siblings, 1 reply; 2+ messages in thread From: David Teigland @ 2015-10-13 14:36 UTC (permalink / raw) To: cluster-devel.redhat.com 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 ^ permalink raw reply [flat|nested] 2+ messages in thread
* [Cluster-devel] problem about dlm posix file lock (sorry for missing subject) 2015-10-13 14:36 ` [Cluster-devel] problem about dlm posix file lock (sorry for missing subjuct) David Teigland @ 2015-10-14 1:09 ` Eric Ren 0 siblings, 0 replies; 2+ messages in thread From: Eric Ren @ 2015-10-14 1:09 UTC (permalink / raw) To: cluster-devel.redhat.com Hi Divad, Please see comments in lines;-) David Teigland <teigland@redhat.com> write? > >> 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? Yeah,I tried on ext4. Two processes fcntl the same file with F_SETLKW in F_WRLCK mode. The second blocked process can be interrupted by SIGALRM. Also, for ocfs2, on local node did the same as ext4, SIGALRM works! And I noticed that the status of the blocked process on multiple nodes was "Dl",but was "D+" on local ocfs2. Don't know if it matters. It's some odd. > >> 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? OK,I'll try;-) > >> 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. Yeah, more test after change, ensure no unexpected effects. thanks, Eric > > Dave > ^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-10-14 1:09 UTC | newest] Thread overview: 2+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- [not found] <561D4DDD020000D40000DB70@relay2.provo.novell.com> 2015-10-13 14:36 ` [Cluster-devel] problem about dlm posix file lock (sorry for missing subjuct) David Teigland 2015-10-14 1:09 ` [Cluster-devel] problem about dlm posix file lock (sorry for missing subject) Eric Ren
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).