From: Ichiko Sakamoto <i-sakamoto@pb.jp.nec.com>
To: Andrew Morton <akpm@osdl.org>
Cc: linux-fsdevel@vger.kernel.org
Subject: Re: [Bug 2829] New: posix_locks_deadlock() loops infinitely
Date: Fri, 04 Jun 2004 16:15:47 +0900 [thread overview]
Message-ID: <40C021A3.4090000@pb.jp.nec.com> (raw)
In-Reply-To: <20040603225325.52465d89.akpm@osdl.org>
[-- Attachment #1: Type: text/plain, Size: 1306 bytes --]
Andrew Morton wrote:
> Andrew Morton <akpm@osdl.org> wrote:
>
>>
>>
>>Begin forwarded message:
>>
>>Date: Thu, 3 Jun 2004 22:45:56 -0700
>>From: bugme-daemon@osdl.org
>>To: bugme-new@lists.osdl.org
>>Subject: Spam: [Bugme-new] [Bug 2829] New: posix_locks_deadlock() loops infinitely
>>
>
>
> Do you have a test app which demonstrates the bug?
Please compile attached source files.
$ gcc -o proc_A proc_A.c -lpthread
$ gcc -o proc_B proc_B.c -lpthread
$ gcc -o proc_C proc_C.c -lpthread
Then create 3 files.
$ touch ./file1
$ touch ./file2
$ touch ./file3
Run 3 procs.
$ ./proc_A & ./proc_B & ./proc_C &
Create file named "1", then "A1" thread will lock "file1".
$ touch 1
Create file named "2", then "B1" will lock "file2".
$ touch 2
Create file named "3", then "C1" will lock "file3".
$ touch 3
Create file named "4", then "A2" will try to lock "file2".
$ touch 4
Create file named "5", then "A3" will try to lock "file3".
$ touch 5
Create file named "6", then "B2" will try to lock "file1".
$ touch 6
Here, deadlock detection fails.
Create file named "7", then "C1" will unlock "file3".
$ touch 7
Create file named "8", then "A3" will unlock "file3".
$ touch 8
Create file named "9", then "C2" trys to lock "file1".
$ touch 9
Here, posix_locks_deadlock() hangs.
--
Ichiko Sakamoto
[-- Attachment #2: demo.tgz --]
[-- Type: application/x-compressed, Size: 971 bytes --]
next prev parent reply other threads:[~2004-06-04 7:15 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-06-04 5:50 Fw: Spam: [Bugme-new] [Bug 2829] New: posix_locks_deadlock() loops infinitely Andrew Morton
2004-06-04 5:53 ` Andrew Morton
2004-06-04 7:15 ` Ichiko Sakamoto [this message]
2004-06-04 11:20 ` Fw: Spam: [Bugme-new] " Matthew Wilcox
2004-06-05 2:18 ` Andrew Morton
2004-06-05 2:45 ` Trond Myklebust
2004-06-05 3:36 ` Trond Myklebust
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=40C021A3.4090000@pb.jp.nec.com \
--to=i-sakamoto@pb.jp.nec.com \
--cc=akpm@osdl.org \
--cc=linux-fsdevel@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.