linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Deadlock in dlmmaster.c
@ 2009-05-03 20:33 Jan Kucera
  2009-05-04 19:30 ` [Ocfs2-devel] " Sunil Mushran
  0 siblings, 1 reply; 2+ messages in thread
From: Jan Kucera @ 2009-05-03 20:33 UTC (permalink / raw)
  To: mfasheh, joel.becker; +Cc: linux-fsdevel, linux-kernel, ocfs2-devel


[-- Attachment #1.1: Type: text/plain, Size: 674 bytes --]

Hi,

I've found some possible deadlock in fs/ocfs2/dlm/dlmmaster.c - version
2.6.28 (probably this code is in newer versions too).
Could someone confirm this? Thank you.


fs/ocfs2/dlm/dlmmaster.c
==================

function dlm_master_request_handler: (res->spinlock <- dlm->master_lock)
-----------------------------------
spin_lock(&res->spinlock); at line 1427
spin_lock(&dlm->master_lock); at line 1475

function dlm_migrate_request_handler: (dlm->master_lock <- res->spinlock)
-------------------------------------------------------
spin_lock(&dlm->master_lock) at line 3036
spin_lock(&res->spinlock); at line 3039



caught by Stanse
(http://iti.fi.muni.cz/stanse/)

[-- Attachment #1.2: Type: text/html, Size: 845 bytes --]

[-- Attachment #2: Type: text/plain, Size: 150 bytes --]

_______________________________________________
Ocfs2-devel mailing list
Ocfs2-devel@oss.oracle.com
http://oss.oracle.com/mailman/listinfo/ocfs2-devel

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Ocfs2-devel] Deadlock in dlmmaster.c
  2009-05-03 20:33 Deadlock in dlmmaster.c Jan Kucera
@ 2009-05-04 19:30 ` Sunil Mushran
  0 siblings, 0 replies; 2+ messages in thread
From: Sunil Mushran @ 2009-05-04 19:30 UTC (permalink / raw)
  To: Jan Kucera; +Cc: mfasheh, joel.becker, linux-fsdevel, linux-kernel, ocfs2-devel

Jan Kucera wrote:
> I've found some possible deadlock in fs/ocfs2/dlm/dlmmaster.c - 
> version 2.6.28 (probably this code is in newer versions too).
> Could someone confirm this? Thank you.
>
>
> fs/ocfs2/dlm/dlmmaster.c
> ==================
>
> function dlm_master_request_handler: (res->spinlock <- dlm->master_lock)
> -----------------------------------
> spin_lock(&res->spinlock); at line 1427
> spin_lock(&dlm->master_lock); at line 1475
>
> function dlm_migrate_request_handler: (dlm->master_lock <- res->spinlock)
> -------------------------------------------------------
> spin_lock(&dlm->master_lock) at line 3036
> spin_lock(&res->spinlock); at line 3039

So this should not happen.

The first condition can only be hit if the resource has no master and is in
the process of being mastered.

The second condition will only be hit if the resource has a master and is
currently being migrated (remastered) from one node to another.

The two appear to be mutually exclusive. But feel free to file a bugzilla
so that I remember to look into it more carefully when I have more time.
http://oss.oracle.com/bugzilla

Thanks
Sunil

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-05-04 19:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-03 20:33 Deadlock in dlmmaster.c Jan Kucera
2009-05-04 19:30 ` [Ocfs2-devel] " Sunil Mushran

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).