[prev in list] [next in list] [prev in thread] [next in thread] 

List:       ssic-linux-devel
Subject:    Re: [SSI-devel] 1.9 .text.lock.open race with .text.lock.inode
From:       Roger Tsang <roger.tsang () gmail ! com>
Date:       2005-10-05 0:25:29
Message-ID: 498263350510041725g77c36b2cl4ffe55a420ddd70b () mail ! gmail ! com
[Download RAW message or body]

I think the fix would be to acquire i_alloc_sem lock before i_sem, to
prevent this race.

Roger

On 10/4/05, Roger Tsang <roger.tsang@gmail.com> wrote:
>
> John,
>
> I dunno what to think, but it just keeps jumping at me that do_truncate()
> and cfs_setattr() are racing for down(inode->sem). There is no other process
> that has sem, not that I can find so far.
>
> Roger
>
> On 9/26/05, John Byrne <john.l.byrne@hp.com> wrote:
> >
> > Roger Tsang wrote:
> > > Hi,
> > >
> > > I found these two processes in a deadlock at text.lock and I can't
> > kill
> > > them either. Any ideas?
> > >
> > > Roger
> >
> > There is at probably least one more thread involved that has the
> > semaphore and is deadlocked. One way to look for this is to use screen
> > to capture all the output of the "bta" command in kdb (use LINES=10000
> > to keep from having to page the output) and look for 0xc6bd5af4 which is
> >
> > the address of the dentry involved. You may also have to look for the
> > inode address inode address, which you'd have to pull out of the dentry.
> >
> > John
> >
> > >
> > >
> > > 0xccbc5020 120553 1 0 0 D 0xccbc51e0 httpd
> > > EBP EIP Function (args)
> > > 0xdbff1e50 0xc03befc9 schedule+0x2a9 (0xc027fb87, 0xe7f93884,
> > > 0xe7f93804, 0x0, 0xe7f93884)
> > > 0xdbff1e84 0xc03bfb25 rwsem_down_write_failed+0x75 (0xe7f93804, 0x0,
> > > 0x0, 0x48, 0xc027514f)
> > > 0xc0159168 .text.lock.open+0x13
> > > 0xdbff1ee4 0xc015782f do_truncate+0x5f (0xc6bd5af4, 0x0, 0x0,
> > > 0xc6bd5af4, 0xdbff1f58)
> > > 0xdbff1f08 0xc0169185 may_open+0x245 (0xdbff1f58, 0x2, 0x242, 0x0,
> > > 0xdbff1f60)
> > > 0xdbff1f40 0xc01692f6 open_namei+0x126 (0xe1937000, 0x242, 0x1b6,
> > > 0xdbff1f58, 0xc6bd5af4)
> > > 0xdbff1f9c 0xc0158afa filp_open+0x3a (0xe1937000, 0x241, 0x1b6,
> > > 0x89f5e1c, 0x89f5e1c)
> > > 0xdbff1fbc 0xc0158ef5 sys_open+0x55
> > > 0xc0103c55 sysenter_past_esp+0x52
> > >
> > > 0xe9eb5550 123638 1 0 0 D 0xe9eb5710 httpd
> > > EBP EIP Function (args)
> > > 0xd3003dd0 0xc03befc9 schedule+0x2a9 (0xe7f93878, 0x1, 0xe9eb5550,
> > > 0xc0118ea0, 0xe7f93878)
> > > 0xd3003e08 0xc03beb74 __down+0x64 (0x0, 0xe7f93734)
> > > 0xd3003e18 0xc03bece2 __down_failed+0xa (0xe7f93804, 0x0, 0x0, 0x2,
> > 0x0)
> > > 0xc0270095 .text.lock.inode+0x15
> > > 0xd3003e58 0xc026f2f3 cfs_setattr+0x93 (0xc6bd5af4, 0xd3003e98,
> > 0x81a4,
> > > 0x43383bdf, 0x6ebc849)
> > > 0xd3003e88 0xc0175dd0 notify_change+0x240 (0xc6bd5af4, 0xd3003e98,
> > 0x48,
> > > 0xc027514f, 0xe7f93804)
> > > 0xd3003ee4 0xc015783e do_truncate+0x6e (0xc6bd5af4, 0x0, 0x0,
> > > 0xc6bd5af4, 0xd3003f58)
> > > 0xd3003f08 0xc0169185 may_open+0x245 (0xd3003f58, 0x2, 0x242, 0x0,
> > > 0xd3003f60)
> > > 0xd3003f40 0xc01692f6 open_namei+0x126 (0xf6c0f000, 0x242, 0x1b6,
> > > 0xd3003f58, 0xc6bd5af4)
> > > 0xd3003f9c 0xc0158afa filp_open+0x3a (0xf6c0f000, 0x241, 0x1b6,
> > > 0x891481c, 0x891481c)
> > > 0xd3003fbc 0xc0158ef5 sys_open+0x55
> > > 0xc0103c55 sysenter_past_esp+0x52
> >
> >
>

[Attachment #3 (text/html)]

I think the fix would be to acquire i_alloc_sem lock before i_sem, to prevent this \
race.<br> <br>
Roger<br>
<br>
<div><span class="gmail_quote">On 10/4/05, <b class="gmail_sendername">Roger \
Tsang</b> &lt;<a href="mailto:roger.tsang@gmail.com">roger.tsang@gmail.com</a>&gt; \
wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, \
204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> John,<br>
<br>
I dunno what to think, but it just keeps jumping at me that
do_truncate() and cfs_setattr() are racing for
down(inode-&gt;sem).&nbsp; There is no other process that has sem, not
that I can find so far.<br><span class="sg">
<br>
Roger</span><div><span class="e" id="q_106be14273a5836c_2"><br><br><div><span \
class="gmail_quote">On 9/26/05, <b class="gmail_sendername">John Byrne</b> &lt;<a \
href="mailto:john.l.byrne@hp.com" target="_blank" onclick="return \
top.js.OpenExtLink(window,event,this)"> john.l.byrne@hp.com</a>&gt; \
wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, \
204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> Roger Tsang wrote:<br>&gt; \
Hi,<br>&gt;<br>&gt; I found these two processes in a deadlock at \
text.lock&nbsp;&nbsp;and I can't kill<br>&gt; them either.&nbsp;&nbsp;Any \
ideas?<br>&gt;<br>&gt; Roger<br><br>There is at probably least one more thread \
involved that has the <br>semaphore and is deadlocked. One way to look for this is to \
use screen<br>to capture all the output of the &quot;bta&quot; command in kdb (use \
LINES=10000<br>to keep from having to page the output) and look for 0xc6bd5af4 which \
is <br>the address of the dentry involved. You may also have to look for the<br>inode \
address inode address, which you'd have to pull out of the \
dentry.<br><br>John<br><br>&gt;<br>&gt;<br>&gt; 0xccbc5020&nbsp;&nbsp;
120553&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;1&nbsp;&nbsp;0&nbsp;&nbsp;&nbsp;&nbsp;0&nbsp;&nbsp;
 D&nbsp;&nbsp;0xccbc51e0&nbsp;&nbsp;httpd<br>&gt; \
EBP&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;EIP&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Function \
(args)<br>&gt; 0xdbff1e50 0xc03befc9 schedule+0x2a9 (0xc027fb87, 0xe7f93884,<br>&gt; \
0xe7f93804, 0x0, 0xe7f93884)<br>&gt; 0xdbff1e84 0xc03bfb25 \
rwsem_down_write_failed+0x75 (0xe7f93804, 0x0, <br>&gt; 0x0, 0x48, \
0xc027514f)<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0xc0159168 \
.text.lock.open+0x13<br>&gt; 0xdbff1ee4 0xc015782f do_truncate+0x5f (0xc6bd5af4, 0x0, \
0x0,<br>&gt; 0xc6bd5af4, 0xdbff1f58)<br>&gt; 0xdbff1f08 0xc0169185 may_open+0x245 \
(0xdbff1f58, 0x2, 0x242, 0x0, <br>&gt; 0xdbff1f60)<br>&gt; 0xdbff1f40 0xc01692f6 \
open_namei+0x126 (0xe1937000, 0x242, 0x1b6,<br>&gt; 0xdbff1f58, 0xc6bd5af4)<br>&gt; \
0xdbff1f9c 0xc0158afa filp_open+0x3a (0xe1937000, 0x241, 0x1b6,<br>&gt; 0x89f5e1c, \
0x89f5e1c) <br>&gt; 0xdbff1fbc 0xc0158ef5 \
sys_open+0x55<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0xc0103c55 \
sysenter_past_esp+0x52<br>&gt;<br>&gt; 0xe9eb5550&nbsp;&nbsp;
123638&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;1&nbsp;&nbsp;0&nbsp;&nbsp;&nbsp;&nbsp;0&nbsp;&nbsp;
 D&nbsp;&nbsp;0xe9eb5710&nbsp;&nbsp;httpd<br>&gt; \
EBP&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;EIP&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Function \
(args)<br>&gt; 0xd3003dd0 0xc03befc9 schedule+0x2a9 (0xe7f93878, 0x1, \
0xe9eb5550,<br>&gt; 0xc0118ea0, 0xe7f93878)<br>&gt; 0xd3003e08 0xc03beb74 __down+0x64 \
(0x0, 0xe7f93734) <br>&gt; 0xd3003e18 0xc03bece2 __down_failed+0xa (0xe7f93804, 0x0, \
0x0, 0x2, 0x0)<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0xc0270095 \
.text.lock.inode+0x15<br>&gt; 0xd3003e58 0xc026f2f3 cfs_setattr+0x93 (0xc6bd5af4, \
0xd3003e98, 0x81a4,<br>&gt; 0x43383bdf, 0x6ebc849) <br>&gt; 0xd3003e88 0xc0175dd0 \
notify_change+0x240 (0xc6bd5af4, 0xd3003e98, 0x48,<br>&gt; 0xc027514f, \
0xe7f93804)<br>&gt; 0xd3003ee4 0xc015783e do_truncate+0x6e (0xc6bd5af4, 0x0, \
0x0,<br>&gt; 0xc6bd5af4, 0xd3003f58)<br>&gt; 0xd3003f08 0xc0169185 may_open+0x245 \
(0xd3003f58, 0x2, 0x242, 0x0, <br>&gt; 0xd3003f60)<br>&gt; 0xd3003f40 0xc01692f6 \
open_namei+0x126 (0xf6c0f000, 0x242, 0x1b6,<br>&gt; 0xd3003f58, 0xc6bd5af4)<br>&gt; \
0xd3003f9c 0xc0158afa filp_open+0x3a (0xf6c0f000, 0x241, 0x1b6,<br>&gt; 0x891481c, \
0x891481c) <br>&gt; 0xd3003fbc 0xc0158ef5 \
sys_open+0x55<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0xc0103c55 \
sysenter_past_esp+0x52<br><br></blockquote></div><br>

</span></div></blockquote></div><br>


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
ssic-linux-devel mailing list
ssic-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ssic-linux-devel

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic