mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@osdl.org>
To: Trond Myklebust <trond.myklebust@fys.uio.no>
Cc: Michal Sabala <lkml@saahbs.net>, linux-kernel@vger.kernel.org
Subject: Re: 2.6.18 mmap hangs unrelated apps
Date: Tue, 19 Dec 2006 14:26:24 -0800	[thread overview]
Message-ID: <20061219142624.230b28c0.akpm@osdl.org> (raw)
In-Reply-To: <1166219054.5761.56.camel@lade.trondhjem.org>

On Fri, 15 Dec 2006 16:44:14 -0500
Trond Myklebust <trond.myklebust@fys.uio.no> wrote:

> However it is true that the
> trace you sent indicated that XFree86 was hanging in iput().

We know what the bug is, don't we?

> > XFree86       D 00000003     0  2471   2453                     (NOTLB)
> >        c4871c0c 00003082 c86b72bc 00000003 cb7c94a4 0000001d 3b67f3ff c0146dd2 
> >        c1184180 cb3e7110 00000000 001ec7ff a60f8097 00000089 c02e1e60 cb3e7000 
> >        c1184180 00000000 c1180030 c4871c18 c028c7d8 c4871c5c c01435b6 c01435f3 
> > Call Trace:
> >  [<c0146dd2>] free_pages_bulk+0x1d/0x1d4
> >  [<c028c7d8>] io_schedule+0x26/0x30
> >  [<c01435b6>] sync_page+0x0/0x40
> >  [<c01435f3>] sync_page+0x3d/0x40
> >  [<c028c9ce>] __wait_on_bit_lock+0x2c/0x52
> >  [<c0143c13>] __lock_page+0x6a/0x72
> >  [<c012ec77>] wake_bit_function+0x0/0x3c
> >  [<c012ec77>] wake_bit_function+0x0/0x3c
> >  [<c0149d2f>] pagevec_lookup+0x17/0x1d
> >  [<c014a085>] truncate_inode_pages_range+0x20a/0x260
> >  [<c014a0e4>] truncate_inode_pages+0x9/0xc
> >  [<c0172c8a>] generic_delete_inode+0xb6/0x10f
> >  [<c0172e73>] iput+0x5f/0x61
> >  [<c01706bd>] dentry_iput+0x68/0x83
> >  [<c01707d8>] dput+0x100/0x118
> >  [<ccb6c334>] put_nfs_open_context+0x67/0x88 [nfs]
> >  [<ccb701ed>] nfs_release_request+0x38/0x47 [nfs]
> >  [<ccb736dd>] nfs_wait_on_requests_locked+0x62/0x98 [nfs]
> >  [<ccb74c32>] nfs_sync_inode_wait+0x4a/0x130 [nfs]
> >  [<ccb6b639>] nfs_release_page+0x0/0x30 [nfs]
> >  [<ccb6b655>] nfs_release_page+0x1c/0x30 [nfs]
> >  [<c015f37c>] try_to_release_page+0x34/0x46
> >  [<c014aa8b>] shrink_page_list+0x263/0x350
> >  [<c0104db8>] do_IRQ+0x48/0x50
> >  [<c01036c6>] common_interrupt+0x1a/0x20
> >  [<c014acd7>] shrink_inactive_list+0x9b/0x248
> >  [<c014b2fd>] shrink_zone+0xb5/0xd0
> >  [<c014b382>] shrink_zones+0x6a/0x7e
> >  [<c014b48e>] try_to_free_pages+0xf8/0x1da
> >  [<c0147a18>] __alloc_pages+0x17c/0x278
> >  [<c014f555>] do_anonymous_page+0x45/0x150
> >  [<c014f9f7>] __handle_mm_fault+0xda/0x1bf
> >  [<c0115849>] do_page_fault+0x1c4/0x4bc
> >  [<c01021b7>] restore_sigcontext+0x10c/0x15f
> >  [<c0115685>] do_page_fault+0x0/0x4bc
> >  [<c0103809>] error_code+0x39/0x40
> 
> nfs_release_page() was called with a locked page.  It's doing a bunch of
> stuff which results in a call to truncate_inode_pages(), which will run
> lock_page(), which is deadlocky.

Now, arguably the VM shouldn't be calling try_to_release_page() with
__GFP_FS when it's holding a lock on a page.

But otoh, NFS should never be running lock_page() within nfs_release_page()
against the page which was passed into nfs_release_page().  It'll deadlock
for sure.

So we could alter the VM to not pass in __GFP_FS in this situation, but
nfs_release_page() would still be deadlocky.


  parent reply	other threads:[~2006-12-19 22:26 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-15  2:30 Michal Sabala
2006-12-15 16:24 ` Trond Myklebust
2006-12-15 17:50   ` Michal Sabala
2006-12-15 19:44     ` Trond Myklebust
2006-12-15 21:06       ` Michal Sabala
2006-12-15 21:12         ` Arjan van de Ven
2006-12-15 21:43           ` Michal Sabala
2006-12-15 21:44         ` Trond Myklebust
2006-12-15 22:05           ` Michal Sabala
2006-12-19 22:26           ` Andrew Morton [this message]
2006-12-19 23:19             ` Trond Myklebust
2006-12-20  0:03               ` Andrew Morton
2006-12-20  0:17                 ` Trond Myklebust
2006-12-20  0:22                   ` Andrew Morton
2006-12-20  1:21                   ` Trond Myklebust
2007-01-08 14:48                     ` [PATCH] NFS: Fix race in nfs_release_page() Peter Zijlstra
2006-12-20 14:51           ` 2.6.18 mmap hangs unrelated apps Michal Sabala
2006-12-15 20:42     ` Andrew Morton
2006-12-15 21:35       ` Michal Sabala
2006-12-15 21:41         ` Andrew Morton
2006-12-16 12:59 ` Christian Kuhn
2006-12-16 18:45   ` Christian Kuhn

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=20061219142624.230b28c0.akpm@osdl.org \
    --to=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkml@saahbs.net \
    --cc=trond.myklebust@fys.uio.no \
    /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

Powered by JetHome