All of lore.kernel.org
 help / color / mirror / Atom feed
From: Edward Shishkin <edward.shishkin@gmail.com>
To: Laurent Riffard <laurent.riffard@free.fr>
Cc: ReiserFS Mailing List <reiserfs-devel@vger.kernel.org>
Subject: Re: Reiser4: possible circular locking dependency detected
Date: Tue, 24 Feb 2009 12:23:06 +0300	[thread overview]
Message-ID: <49A3BC7A.3050804@gmail.com> (raw)
In-Reply-To: <499ABE6C.6010904@free.fr>

Laurent Riffard wrote:
> Hello,
>
>   

Hi Laurent

> I've got this warning in my logs with 2.6.29-rc5 + reiser4 patches:
>
> =======================================================
> [ INFO: possible circular locking dependency detected ]
> 2.6.29-rc5-00012-g94aca52 #132
> -------------------------------------------------------
> git/5217 is trying to acquire lock:
>  (&data->latch){----}, at: [<f8bd442b>] get_exclusive_access+0x12/0x1c [reiser4]
>
> but task is already holding lock:
>  (&mm->mmap_sem){----}, at: [<c02067b1>] sys_mmap2+0x44/0x7b
>
> which lock already depends on the new lock.
>
>
> the existing dependency chain (in reverse order) is:
>
> -> #1 (&mm->mmap_sem){----}:
>        [<c0243477>] __lock_acquire+0x98d/0xb00
>        [<c0243645>] lock_acquire+0x5b/0x81
>        [<c0269d02>] might_fault+0x68/0x88
>   

This is a false positive provided by might_fault(),
introduced in the latest kernels.

User page has to be brought in so that major page
fault does not occur here when the non-exclusive
access is acquired (by read_unix_file).

We need to teach the code somehow to not produce
this false alarm. I'll take a look..

Thanks,
Edward.

>        [<f8be0b92>] reiser4_read_tail+0x60/0xc2 [reiser4]
>        [<f8bd3e9f>] read_unix_file+0x2da/0x3a0 [reiser4]
>        [<f8bd5348>] reiser4_read_careful+0xac/0xf4 [reiser4]
>        [<c027cd28>] vfs_read+0x79/0xaa
>        [<c027cdf2>] sys_read+0x3b/0x60
>        [<c0202fff>] sysenter_do_call+0x12/0x43
>        [<ffffffff>] 0xffffffff
>
> -> #0 (&data->latch){----}:
>        [<c024334c>] __lock_acquire+0x862/0xb00
>        [<c0243645>] lock_acquire+0x5b/0x81
>        [<c03c8d5a>] down_write+0x2a/0x46
>        [<f8bd442b>] get_exclusive_access+0x12/0x1c [reiser4]
>        [<f8bd19ff>] get_exclusive_access_careful+0x10/0x32 [reiser4]
>        [<f8bd30d2>] mmap_unix_file+0x48/0x10a [reiser4]
>        [<f8bd516d>] reiser4_mmap_careful+0xa1/0xe6 [reiser4]
>        [<c026fea9>] mmap_region+0x219/0x3b0
>        [<c0270224>] do_mmap_pgoff+0x1e4/0x230
>        [<c02067c7>] sys_mmap2+0x5a/0x7b
>        [<c0202fff>] sysenter_do_call+0x12/0x43
>        [<ffffffff>] 0xffffffff
>
> other info that might help us debug this:
>
> 1 lock held by git/5217:
>  #0:  (&mm->mmap_sem){----}, at: [<c02067b1>] sys_mmap2+0x44/0x7b
>
> stack backtrace:
> Pid: 5217, comm: git Not tainted 2.6.29-rc5-00012-g94aca52 #132
> Call Trace:
>  [<c03c7800>] ? printk+0xf/0x17
>  [<c02428d3>] print_circular_bug_tail+0x5d/0x68
>  [<c024334c>] __lock_acquire+0x862/0xb00
>  [<c0241280>] ? static_obj+0x6d/0x79
>  [<c0243645>] lock_acquire+0x5b/0x81
>  [<f8bd442b>] ? get_exclusive_access+0x12/0x1c [reiser4]
>  [<c03c8d5a>] down_write+0x2a/0x46
>  [<f8bd442b>] ? get_exclusive_access+0x12/0x1c [reiser4]
>  [<f8bd442b>] get_exclusive_access+0x12/0x1c [reiser4]
>  [<f8bd19ff>] get_exclusive_access_careful+0x10/0x32 [reiser4]
>  [<f8bd30d2>] mmap_unix_file+0x48/0x10a [reiser4]
>  [<f8bd516d>] reiser4_mmap_careful+0xa1/0xe6 [reiser4]
>  [<c026fea9>] mmap_region+0x219/0x3b0
>  [<c0270224>] do_mmap_pgoff+0x1e4/0x230
>  [<c02067c7>] sys_mmap2+0x5a/0x7b
>  [<c0202fff>] sysenter_do_call+0x12/0x43
>
>
> The set of reiser4 patches I'm using is available from http://laurent.riffard.free.fr/reiser4/reiser4-for-2.6.29-rc5/:
> 0001-Reiser4-for-Linux-2.6.28.patch                           
> 0002-reiser4-adjust-to-the-new-aops-fixup.patch               
> 0003-Reiser4-fix-BUG-using-smp_processor_id-in-preemp.patch   
> 0004-Reiser4-Change-current-fs-ug-id-to-current_fs-ug-i.patch 
> 0005-Reiser4-fix-__grab_cache_page-usage.patch                
> 0006-Revert-Reiser4-fix-__grab_cache_page-usage.patch         
> 0007-Reiser4-build-fix.patch                                  
> 0008-reiser4-update-names-of-quota-methods.patch              
>
> ~~
> laurent
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe reiserfs-devel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
>   


      reply	other threads:[~2009-02-24  9:23 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-17 13:41 Reiser4: possible circular locking dependency detected Laurent Riffard
2009-02-24  9:23 ` Edward Shishkin [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=49A3BC7A.3050804@gmail.com \
    --to=edward.shishkin@gmail.com \
    --cc=laurent.riffard@free.fr \
    --cc=reiserfs-devel@vger.kernel.org \
    /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.