All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@domain.hid>
To: Philippe Gerum <rpm@xenomai.org>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-core] [bug] zombie mutex owners
Date: Wed, 10 May 2006 13:49:05 +0200	[thread overview]
Message-ID: <4461D331.8040906@domain.hid> (raw)
In-Reply-To: <4461C5D9.3060705@domain.hid>

[-- Attachment #1: Type: text/plain, Size: 1102 bytes --]

Philippe Gerum wrote:
> Jan Kiszka wrote:
>> Dmitry Adamushko wrote:
>>
>> Indeed, this solves the issue more gracefully.
>>
>> Looking at this again from a different perspective and running the test
>> case with your patch in a slightly different way, I think I
>> misinterpreted the crash. If I modify task2 like this
>>
>> void task2_fnc(void *arg)
>> {
>>         printf("started task2\n");
>>         if (rt_mutex_lock(&mtx, 0) < 0) {
>>                 printf("lock failed in task2\n");
>>                 return;
>>         }
>> //        rt_mutex_unlock(&mtx);
>>
>>         printf("done task2\n");
>> }
>>
>> I'm also getting a crash. So the problem seems to be releasing a mutex
>> ownership on task termination. Well, this needs further examination.
>>
> 
> The native skin does not implement robust mutex, indeed.

Yeah, lunch opened my eyes: the skin data structure (RT_MUTEX) is not
updated appropriately on task cleanup. What about some callback hook in
xnsynch_t to invoke a per-skin cleanup handler when running
xnsynch_release_all_ownerships?

Jan


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 250 bytes --]

  reply	other threads:[~2006-05-10 11:49 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-10  7:58 [Xenomai-core] [bug] zombie mutex owners Jan Kiszka
2006-05-10  9:16 ` Dmitry Adamushko
2006-05-10 10:07   ` Jan Kiszka
2006-05-10 10:40     ` Philippe Gerum
2006-05-10 10:52     ` Philippe Gerum
2006-05-10 11:49       ` Jan Kiszka [this message]
2006-05-10 16:39         ` Philippe Gerum
2006-05-10 12:28     ` Philippe Gerum
2006-05-10 16:55     ` [Xenomai-core] Pending ownership and resource stealing Philippe Gerum
2006-05-10 17:34       ` Gilles Chanteperdrix
2006-05-10 18:39         ` Philippe Gerum
2006-05-10 20:00           ` Gilles Chanteperdrix
2006-05-10 21:25             ` Philippe Gerum
2006-05-11 17:17               ` Gilles Chanteperdrix
2006-05-11 22:39                 ` Philippe Gerum
2006-05-10 17:34       ` Jan Kiszka
2006-05-10 21:23         ` Philippe Gerum
2006-05-11  7:56           ` Jan Kiszka

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=4461D331.8040906@domain.hid \
    --to=jan.kiszka@domain.hid \
    --cc=rpm@xenomai.org \
    --cc=xenomai@xenomai.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.