linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mandeep Singh Baines <msb@chromium.org>
To: "Myklebust, Trond" <Trond.Myklebust@netapp.com>
Cc: Ming Lei <ming.lei@canonical.com>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Al Viro <viro@zeniv.linux.org.uk>,
	Jeff Layton <jlayton@redhat.com>,
	"J. Bruce Fields" <bfields@fieldses.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	"linux-nfs@vger.kernel.org" <linux-nfs@vger.kernel.org>,
	"Rafael J. Wysocki" <rjw@sisk.pl>,
	Ben Chan <benchan@chromium.org>, Oleg Nesterov <oleg@redhat.com>,
	Ingo Molnar <mingo@redhat.com>
Subject: Re: LOCKDEP: 3.9-rc1: mount.nfs/4272 still has locks held!
Date: Mon, 4 Mar 2013 12:10:05 -0800	[thread overview]
Message-ID: <CACBanvroaxd-nAJd+7o6eJMW7gOLT+=Dq2fbNPR7adZpXOEN8g@mail.gmail.com> (raw)
In-Reply-To: <CACBanvqfW7P-TfKnVGgsumPdLhx-Z4ZS8wUHyUNRA9mM=txK8A@mail.gmail.com>

On Mon, Mar 4, 2013 at 12:09 PM, Mandeep Singh Baines <msb@chromium.org> wrote:
> On Mon, Mar 4, 2013 at 7:53 AM, Myklebust, Trond
> <Trond.Myklebust@netapp.com> wrote:
>> On Mon, 2013-03-04 at 23:33 +0800, Ming Lei wrote:
>>> Hi,
>>>
>>> CC guys who introduced the lockdep change.
>>>
>>> On Mon, Mar 4, 2013 at 11:04 PM, Jeff Layton <jlayton@redhat.com> wrote:
>>>
>>> >
>>> > I don't get it -- why is it bad to hold a lock across a freeze event?
>>>
>>> At least this may deadlock another mount.nfs during freezing, :-)
>>>
>>> See detailed explanation in the commit log:
>>>
>>> commit 6aa9707099c4b25700940eb3d016f16c4434360d
>>> Author: Mandeep Singh Baines <msb@chromium.org>
>>> Date:   Wed Feb 27 17:03:18 2013 -0800
>>>
>>>     lockdep: check that no locks held at freeze time
>>>
>>>     We shouldn't try_to_freeze if locks are held.  Holding a lock can cause a
>>>     deadlock if the lock is later acquired in the suspend or hibernate path
>>>     (e.g.  by dpm).  Holding a lock can also cause a deadlock in the case of
>>>     cgroup_freezer if a lock is held inside a frozen cgroup that is later
>>>     acquired by a process outside that group.
>>>
>>
>> This is bloody ridiculous... If you want to add functionality to
>> implement cgroup or per-process freezing, then do it through some other
>> api instead of trying to push your problems onto others by adding new
>> global locking rules.
>>
>> Filesystems are a shared resource that have _nothing_ to do with process
>> cgroups. They need to be suspended when the network goes down or other
>> resources that they depend on are suspended. At that point, there is no
>> "what if I launch a new mount command?" scenario.
>>
>
> Hi Trond,
>
> My intention was to introduce new rules. My change simply introduces a

D'oh.

s/was/was not/

Regards,
Mandeep

> check for a deadlock case that can already happen.
>
> I think a deadlock could happen under the following scenario:
>
> 1) An administrator wants to freeze a container. Perhaps to checkpoint
> it and it migrate it some place else.
> 2) An nfs mount was in progress so we hit this code path and freeze
> with a lock held.
> 3) Another container tries to nfs mount.
> 4) Deadlock.
>
> Regards,
> Mandeep
>
>> Trond
>> --
>> Trond Myklebust
>> Linux NFS client maintainer
>>
>> NetApp
>> Trond.Myklebust@netapp.com
>> www.netapp.com

      reply	other threads:[~2013-03-04 20:10 UTC|newest]

Thread overview: 61+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-04 13:57 LOCKDEP: 3.9-rc1: mount.nfs/4272 still has locks held! Ming Lei
2013-03-04 14:14 ` Myklebust, Trond
2013-03-04 14:23   ` Jeff Layton
2013-03-04 19:55     ` Mandeep Singh Baines
2013-03-04 20:53       ` Oleg Nesterov
2013-03-04 22:08         ` Myklebust, Trond
2013-03-05 13:23           ` Jeff Layton
2013-03-05 17:46             ` Tejun Heo
2013-03-05 17:49               ` Tejun Heo
2013-03-05 19:03                 ` Jeff Layton
2013-03-05 19:09                   ` Tejun Heo
2013-03-05 23:39                     ` Jeff Layton
2013-03-05 23:47                       ` Tejun Heo
2013-03-06 18:16                         ` Oleg Nesterov
2013-03-06 18:53                           ` Tejun Heo
2013-03-06 21:00                             ` Linus Torvalds
2013-03-06 21:24                               ` Tejun Heo
2013-03-06 21:31                                 ` Linus Torvalds
2013-03-06 21:36                                   ` Tejun Heo
2013-03-06 21:40                                     ` Tejun Heo
2013-03-13 15:17                                       ` Jeff Layton
2013-03-31  0:07                                         ` Paul Walmsley
2013-03-07 11:41                                     ` Jeff Layton
2013-03-07 15:25                                       ` Tejun Heo
2013-03-07 15:55                                       ` Linus Torvalds
2013-03-07 15:59                                         ` Myklebust, Trond
2013-03-07 16:25                                           ` Linus Torvalds
2013-03-07 16:45                                             ` Myklebust, Trond
2013-03-07 17:03                                               ` Linus Torvalds
2013-03-07 17:16                                                 ` Myklebust, Trond
2013-03-07 21:43                                                   ` Jeff Layton
2013-03-08 14:01                                                 ` Ingo Molnar
2013-03-07 20:55                                             ` Rafael J. Wysocki
2013-03-07 16:00                                         ` Tejun Heo
2013-03-06 18:17                       ` Oleg Nesterov
2013-03-06 18:40                         ` Jeff Layton
2013-03-06 18:45                           ` Tejun Heo
2013-03-06  1:10                   ` Myklebust, Trond
2013-03-06  1:14                     ` Tejun Heo
2013-03-06  1:28                       ` Tejun Heo
2013-03-06 12:00                     ` Jeff Layton
2013-03-05 23:11                 ` J. Bruce Fields
2013-03-06  0:02                   ` Rafael J. Wysocki
2013-03-06  0:30                   ` [PATCH] lockdep: make lock held while freezing check optional Mandeep Singh Baines
2013-03-07 12:03                     ` Maarten Lankhorst
2013-03-06  0:59                   ` LOCKDEP: 3.9-rc1: mount.nfs/4272 still has locks held! Mandeep Singh Baines
2013-03-06  1:05                     ` J. Bruce Fields
2013-03-06  1:16                       ` Tejun Heo
2013-03-06  3:11                         ` Mandeep Singh Baines
2013-03-06  9:09                           ` Ingo Molnar
2013-03-06 12:06                             ` Jeff Layton
2013-03-06 15:59                               ` Mandeep Singh Baines
2013-03-06 18:23                                 ` Jeff Layton
2013-03-06 18:37                                   ` Myklebust, Trond
2013-03-06 20:15                                     ` Mandeep Singh Baines
2013-03-04 14:40   ` Ming Lei
2013-03-04 15:04     ` Jeff Layton
2013-03-04 15:33       ` Ming Lei
2013-03-04 15:53         ` Myklebust, Trond
2013-03-04 20:09           ` Mandeep Singh Baines
2013-03-04 20:10             ` Mandeep Singh Baines [this message]

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='CACBanvroaxd-nAJd+7o6eJMW7gOLT+=Dq2fbNPR7adZpXOEN8g@mail.gmail.com' \
    --to=msb@chromium.org \
    --cc=Trond.Myklebust@netapp.com \
    --cc=benchan@chromium.org \
    --cc=bfields@fieldses.org \
    --cc=jlayton@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=ming.lei@canonical.com \
    --cc=mingo@redhat.com \
    --cc=oleg@redhat.com \
    --cc=rjw@sisk.pl \
    --cc=torvalds@linux-foundation.org \
    --cc=viro@zeniv.linux.org.uk \
    /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;
as well as URLs for NNTP newsgroup(s).