Re: [Ocfs2-devel] [PATCH] ocfs2: dlm: fix recursive locking deadlock

2015-12-22 Thread Mark Fasheh
On Mon, Dec 21, 2015 at 01:12:34PM +0800, Junxiao Bi wrote: > Hi Mark, > > On 12/19/2015 07:23 AM, Mark Fasheh wrote: > > On Tue, Dec 15, 2015 at 09:43:48AM +0800, Junxiao Bi wrote: > >> Hi Mark, > >> > >> On 12/15/2015 03:18 AM, Mark Fasheh wrote: > >>> On Mon, Dec 14, 2015 at 02:03:17PM +0800,

Re: [Ocfs2-devel] [PATCH] ocfs2: dlm: fix recursive locking deadlock

2015-12-22 Thread Junxiao Bi
Hi Mark, On 12/23/2015 06:12 AM, Mark Fasheh wrote: > On Mon, Dec 21, 2015 at 01:12:34PM +0800, Junxiao Bi wrote: >> Hi Mark, >> >> On 12/19/2015 07:23 AM, Mark Fasheh wrote: >>> On Tue, Dec 15, 2015 at 09:43:48AM +0800, Junxiao Bi wrote: Hi Mark, On 12/15/2015 03:18 AM, Mark

Re: [Ocfs2-devel] [PATCH] ocfs2: dlm: fix recursive locking deadlock

2015-12-20 Thread Junxiao Bi
Hi Mark, On 12/19/2015 07:23 AM, Mark Fasheh wrote: > On Tue, Dec 15, 2015 at 09:43:48AM +0800, Junxiao Bi wrote: >> Hi Mark, >> >> On 12/15/2015 03:18 AM, Mark Fasheh wrote: >>> On Mon, Dec 14, 2015 at 02:03:17PM +0800, Junxiao Bi wrote: > Second, this issue can be reproduced in old Linux

Re: [Ocfs2-devel] [PATCH] ocfs2: dlm: fix recursive locking deadlock

2015-12-18 Thread Mark Fasheh
On Tue, Dec 15, 2015 at 09:43:48AM +0800, Junxiao Bi wrote: > Hi Mark, > > On 12/15/2015 03:18 AM, Mark Fasheh wrote: > > On Mon, Dec 14, 2015 at 02:03:17PM +0800, Junxiao Bi wrote: > >>> Second, this issue can be reproduced in old Linux kernels (e.g. > >>> 3.16.7-24)? there should not be any

Re: [Ocfs2-devel] [PATCH] ocfs2: dlm: fix recursive locking deadlock

2015-12-14 Thread Junxiao Bi
Hi Mark, On 12/15/2015 03:18 AM, Mark Fasheh wrote: > On Mon, Dec 14, 2015 at 02:03:17PM +0800, Junxiao Bi wrote: >>> Second, this issue can be reproduced in old Linux kernels (e.g. 3.16.7-24)? >>> there should not be any regression issue? >> Maybe just hard to reproduce, ocfs2 supports

Re: [Ocfs2-devel] [PATCH] ocfs2: dlm: fix recursive locking deadlock

2015-12-14 Thread Junxiao Bi
On 12/14/2015 04:44 PM, Eric Ren wrote: > Hi Junxiao, > > On Mon, Dec 14, 2015 at 09:57:38AM +0800, Junxiao Bi wrote: >> The following locking order can cause a deadlock. >> Process A on Node X: Process B on Node Y: >> lock_XYZ(PR) >>

Re: [Ocfs2-devel] [PATCH] ocfs2: dlm: fix recursive locking deadlock

2015-12-14 Thread Eric Ren
Hi, On Mon, Dec 14, 2015 at 05:02:26PM +0800, Junxiao Bi wrote: > On 12/14/2015 04:44 PM, Eric Ren wrote: > > Hi Junxiao, > > > > On Mon, Dec 14, 2015 at 09:57:38AM +0800, Junxiao Bi wrote: > >> The following locking order can cause a deadlock. > >> Process A on Node X: Process

Re: [Ocfs2-devel] [PATCH] ocfs2: dlm: fix recursive locking deadlock

2015-12-14 Thread Junxiao Bi
> 在 2015年12月14日,下午4:57,Eric Ren 写道: > > Hi, > > On Mon, Dec 14, 2015 at 02:03:17PM +0800, Junxiao Bi wrote: >> On 12/14/2015 01:39 PM, Gang He wrote: >>> Hello Junxiao, >>> >>> From the initial description, the second lock_XYZ(PR) should be blocked, >>> since DLM have a fair

Re: [Ocfs2-devel] [PATCH] ocfs2: dlm: fix recursive locking deadlock

2015-12-14 Thread Mark Fasheh
On Mon, Dec 14, 2015 at 02:03:17PM +0800, Junxiao Bi wrote: > > Second, this issue can be reproduced in old Linux kernels (e.g. 3.16.7-24)? > > there should not be any regression issue? > Maybe just hard to reproduce, ocfs2 supports recursive locking. In what sense? The DLM might but the FS

Re: [Ocfs2-devel] [PATCH] ocfs2: dlm: fix recursive locking deadlock

2015-12-14 Thread Eric Ren
Hi Junxiao, On Mon, Dec 14, 2015 at 09:57:38AM +0800, Junxiao Bi wrote: > The following locking order can cause a deadlock. > Process A on Node X: Process B on Node Y: > lock_XYZ(PR) > lock_XYZ(EX) > lock_XYZ(PR) >>> blocked forever by

Re: [Ocfs2-devel] [PATCH] ocfs2: dlm: fix recursive locking deadlock

2015-12-14 Thread Eric Ren
Hi, On Mon, Dec 14, 2015 at 02:03:17PM +0800, Junxiao Bi wrote: > On 12/14/2015 01:39 PM, Gang He wrote: > > Hello Junxiao, > > > > From the initial description, the second lock_XYZ(PR) should be blocked, > > since DLM have a fair queue mechanism, otherwise, it looks to bring a > > write

Re: [Ocfs2-devel] [PATCH] ocfs2: dlm: fix recursive locking deadlock

2015-12-13 Thread Gang He
Hello Junxiao, >From the initial description, the second lock_XYZ(PR) should be blocked, since >DLM have a fair queue mechanism, otherwise, it looks to bring a write lock >starvation. Second, this issue can be reproduced in old Linux kernels (e.g. 3.16.7-24)? there should not be any

[Ocfs2-devel] [PATCH] ocfs2: dlm: fix recursive locking deadlock

2015-12-13 Thread Junxiao Bi
The following locking order can cause a deadlock. Process A on Node X: Process B on Node Y: lock_XYZ(PR) lock_XYZ(EX) lock_XYZ(PR) >>> blocked forever by OCFS2_LOCK_BLOCKED. Use ocfs2-test multiple reflink test can reproduce this on v4.3

Re: [Ocfs2-devel] [PATCH] ocfs2: dlm: fix recursive locking deadlock

2015-12-13 Thread Junxiao Bi
On 12/14/2015 01:39 PM, Gang He wrote: > Hello Junxiao, > > From the initial description, the second lock_XYZ(PR) should be blocked, > since DLM have a fair queue mechanism, otherwise, it looks to bring a write > lock starvation. Should be blocked? No, that is a deadlock. I don't think this