mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Trond Myklebust <trond.myklebust@fys.uio.no>
To: Alex Riesen <raa.lkml@gmail.com>
Cc: boi@boi.at, linux-kernel@vger.kernel.org
Subject: Re: blocking file lock functions (lockf,flock,fcntl) do not return after timer signal
Date: Wed, 12 Oct 2005 10:39:07 -0400	[thread overview]
Message-ID: <1129127947.8561.44.camel@lade.trondhjem.org> (raw)
In-Reply-To: <81b0412b0510120548k3464d355ne75cce4e5edcce1a@mail.gmail.com>

on den 12.10.2005 Klokka 14:48 (+0200) skreiv Alex Riesen:
> On 10/12/05, "Dieter Müller (BOI GmbH)" <dieter.mueller@boi.at> wrote:
> > bug description:
> >
> > flock, lockf, fcntl do not return even after the signal SIGALRM  has
> > been raised and the signal handler function has been executed
> > the functions should return with a return value EWOULDBLOCK as described
> > in the man pages

Works for me on a local filesystem.

Desktop$ ./gnurr gnarg
locking...
timeout
timeout
timeout
timeout
timeout

However it is true that it doesn't work over NFSv2/v3. The latter is
probably because we use the synchronous NLM calls which block all
signals during the wait in order to avoid state consistency problems (if
the lock gets granted on server after the client was interrupted, then
the administrator gets to clean up the lock).

We can probably relax this requirement a bit, and rely on the CANCEL
call to get us out of trouble.

Cheers,
 Trond


  parent reply	other threads:[~2005-10-12 14:39 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-12  7:54 "Dieter Müller (BOI GmbH)"
2005-10-12 12:48 ` Alex Riesen
2005-10-12 13:09   ` linux-os (Dick Johnson)
2005-10-12 14:39   ` Trond Myklebust [this message]
2005-10-12 15:10     ` Alex Riesen
2005-10-12 15:20       ` linux-os (Dick Johnson)
2005-10-12 15:37         ` Michael Kerrisk
2005-10-12 15:43           ` linux-os (Dick Johnson)
2005-10-12 16:05             ` Michael Kerrisk
2005-10-12 16:06             ` Mark Lord
2005-10-12 21:15         ` Alex Riesen
2005-10-12 16:36       ` Trond Myklebust

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=1129127947.8561.44.camel@lade.trondhjem.org \
    --to=trond.myklebust@fys.uio.no \
    --cc=boi@boi.at \
    --cc=linux-kernel@vger.kernel.org \
    --cc=raa.lkml@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®