All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Teigland <teigland@redhat.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] problem about dlm posix file lock (sorry for missing subjuct)
Date: Tue, 13 Oct 2015 09:36:46 -0500	[thread overview]
Message-ID: <20151013143646.GA15036@redhat.com> (raw)
In-Reply-To: <561D4DDD020000D40000DB70@relay2.provo.novell.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



       reply	other threads:[~2015-10-13 14:36 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <561D4DDD020000D40000DB70@relay2.provo.novell.com>
2015-10-13 14:36 ` David Teigland [this message]
2015-10-14  1:09   ` [Cluster-devel] problem about dlm posix file lock (sorry for missing subject) Eric Ren

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20151013143646.GA15036@redhat.com \
    --to=teigland@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.