From: Manfred Spraul <manfred@colorfullife.com>
To: Alexander Nyberg <alexn@dsv.su.se>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Livelock with the shmctl04 test program from linux test project
Date: Thu, 28 Oct 2004 19:21:22 +0200 [thread overview]
Message-ID: <41812A92.4020803@colorfullife.com> (raw)
In-Reply-To: <1098961145.787.7.camel@boxen>
Alexander Nyberg wrote:
>Sorry for late reply, but I just can't understand why & how this happens, been trying to grasp
>the IPC/SHM part but I'm missing something. One processor gets locked up and never released.
>
>
Ok - that's a deadlock.
>I did:
>
>printk("taking lock\n");
>spin_lock(&info->lock);
>printk("lock taken\n");
>
>and it never prints out "lock taken" so i know where it locks up. Now the fun part,
>spinlock debugging doesn't catch it,
>
That's not surprising: the full debug code is only active for
uniprocessor kernels. On SMP, only a simple check for unitialized
spinlocks is performed.
Btw, I'd use
printk("thread %d, struct %p: taking lock", current->pid, info);
Then you are certain that you are not fooled by multiple concurrent
operations.
> but I did a simple patch to show who is holding a lock
>at the current time, and it appears noone has taken the lock. I really don't get this.
>
>
>
I must think about it. Who's printed as the last owner that released the
lock? Perhaps there is a race with segment destruction: The structures
are protected by RCU.
Could you enable debug spinlocks and slab debugging? I would have
expected an error message from spinlock debugging due to bad magic.
--
Manfred
next prev parent reply other threads:[~2004-10-28 17:22 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-10-22 17:28 Livelock with the shmctl04 test program from linux test project Manfred Spraul
2004-10-28 10:59 ` Alexander Nyberg
2004-10-28 17:21 ` Manfred Spraul [this message]
-- strict thread matches above, loose matches on Subject: below --
2004-10-20 16:18 Alexander Nyberg
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=41812A92.4020803@colorfullife.com \
--to=manfred@colorfullife.com \
--cc=alexn@dsv.su.se \
--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 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.