mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jan Kara <jack@suse.cz>
To: Andrew Morton <akpm@osdl.org>
Cc: PALFFY Daniel <dpalffy@rainstorm.org>, linux-kernel@vger.kernel.org
Subject: Re: 2.6 deadlock, maybe ext2 related
Date: Mon, 6 Oct 2003 16:15:16 +0200	[thread overview]
Message-ID: <20031006141515.GA23546@atrey.karlin.mff.cuni.cz> (raw)
In-Reply-To: <20031003132938.6f834b69.akpm@osdl.org>

  Hi,

  I see the problem. Actually there are two ways of fixing:
1) dquot_drop() needn't call dqput() inside the lock.
2) dquot_alloc_space() can detect that it was actually called on quota
   file and exit before it tries to acquire the lock.

  I'll probably do the change 2) but I have to think a bit whether 1) is
also desirable...

						Thanks for spotting

								Honza

> PALFFY Daniel <dpalffy@rainstorm.org> wrote:
> >
> > This problem has been around since at least about test1, but this was the
> > first time i could capture a trace.
> 
> It looks like this process is the culprit:
> 
> > apache        D C278A120 77489808  9714    496                9233 (NOTLB)
> > c6befab8 00000086 c278a2a0 c278a120 c0292604 c278a120 c1e1e460 c882a040
> >        c041f460 c35d6abc c2207390 c6befac4 c7e400c0 c01f0cad c35d6ac0 c6bd1ec0
> >        c35d6ac0 c2207390 00000001 00000400 00000400 00000000 c7e400c0 c017069f
> > Call Trace:
> >  [<c0292604>] tcp_v4_rcv+0x654/0x880
> >  [<c01f0cad>] rwsem_down_read_failed+0x8d/0x130
> >  [<c017069f>] .text.lock.dquot+0xcd/0x2fe
> >  [<c02773d5>] ip_local_deliver_finish+0xc5/0x1c0
> >  [<c0277310>] ip_local_deliver_finish+0x0/0x1c0
> >  [<c0194abd>] ext2_new_block+0xad/0x5e0
> 
>   ext2_new_block
>   ->DQUOT_PREALLOC_SPACE_NODIRTY
>     ->dquot_alloc_space
>       ->down_read(dqptr_sem)
> 
> >  [<c019767f>] ext2_alloc_block+0x6f/0xb0
> >  [<c01979b4>] ext2_alloc_branch+0x34/0x230
> >  [<c0197d05>] ext2_get_block+0x155/0x390
> >  [<c026626b>] netif_receive_skb+0x17b/0x200
> >  [<c0149693>] __block_prepare_write+0x1e3/0x420
> >  [<c015e0dd>] inode_update_time+0xcd/0xe0
> >  [<c014a0b4>] block_prepare_write+0x34/0x50
> >  [<c0197bb0>] ext2_get_block+0x0/0x390
> >  [<c012ef4e>] generic_file_aio_write_nolock+0x36e/0xa90
> >  [<c0197bb0>] ext2_get_block+0x0/0x390
> >  [<c027c1c0>] ip_finish_output2+0x0/0x190
> >  [<c027c190>] dst_output+0x0/0x30
> >  [<c027a57c>] ip_queue_xmit+0x40c/0x520
> >  [<c027c190>] dst_output+0x0/0x30
> >  [<c012f6ee>] generic_file_write_nolock+0x7e/0xa0
> >  [<c0148c92>] __find_get_block+0x52/0xc0
> >  [<c0148d2b>] __getblk+0x2b/0x60
> >  [<c0148ddf>] __bread+0x1f/0x40
> >  [<c016f7d3>] dquot_free_space+0x63/0x110
> >  [<c01945f7>] ext2_free_blocks+0xe7/0x2f0
> >  [<c012f7fb>] generic_file_write+0x5b/0x80
> >  [<c0170ac6>] v1_commit_dqblk+0xa6/0x100
> >  [<c016e5de>] commit_dqblk+0x3e/0x60
> >  [<c016e955>] dqput+0x35/0xc0
> >  [<c0148a22>] mark_buffer_dirty+0x32/0x50
> >  [<c016f4ad>] dquot_drop_nolock+0x3d/0x50
> >  [<c016f4ef>] dquot_drop+0x2f/0x60
> 
>    down_write(dqptr_sem);
> 
> >  [<c019687f>] ext2_free_inode+0x14f/0x170
> >  [<c0197530>] ext2_delete_inode+0x0/0x90
> >  [<c0197530>] ext2_delete_inode+0x0/0x90
> >  [<c015dc45>] generic_delete_inode+0x85/0x120
> >  [<c015de75>] iput+0x55/0x80
> >  [<c015b5d4>] dput+0xd4/0x170
> >  [<c01473c9>] __fput+0x99/0xf0
> >  [<c0145bc9>] filp_close+0x59/0x90
> >  [<c0145c50>] sys_close+0x50/0x60
> >  [<c010906f>] syscall_call+0x7/0xb
> > 
> > 
-- 
Jan Kara <jack@suse.cz>
SuSE CR Labs

      reply	other threads:[~2003-10-06 14:15 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-10-03 12:25 PALFFY Daniel
2003-10-03 20:29 ` Andrew Morton
2003-10-06 14:15   ` Jan Kara [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=20031006141515.GA23546@atrey.karlin.mff.cuni.cz \
    --to=jack@suse.cz \
    --cc=akpm@osdl.org \
    --cc=dpalffy@rainstorm.org \
    --cc=linux-kernel@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 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®