All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@domain.hid>
To: Maksym Veremeyenko <verem@domain.hid>
Cc: Xenomai-help@domain.hid
Subject: Re: [Xenomai-help] Strange deadlock.
Date: Sat, 10 Feb 2007 11:34:57 +0100	[thread overview]
Message-ID: <45CD9FD1.9040509@domain.hid> (raw)
In-Reply-To: <45CD44EF.6080807@domain.hid>

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

[Disclaimer: I'm just jumping on this thread without having read all
details.]

Maksym Veremeyenko wrote:
> ...
> I tried to summarize this info and build time sorted table of actions
> (task B - "bus_monitor_proc[0]", task V - "vdcp[0030]m"):
> 
> V    5397829215210    rt_mutex_unlock:ENTER
> V    5397828986260    serial_transact:EXIT
> V    5397810469917    serial_transact:ENTER

You are holding the mutex across the serial transaction, i.e. a
secondary mode switch, right? If you haven't set
CONFIG_XENO_OPT_RPIDISABLE, you might be are affected by the bug in the
priority coupling between Xenomai and the Linux kernel. Already tried
latest v2.3.x SVN?

> V    5397792191552    rt_mutex_lock:EXIT
> V    5397792126988    rt_mutex_lock:ENTER
> V    5397770396236    serial_transact:EXIT
> B    5397750468006    rt_mutex_unlock:ENTER
> B    5397732320388    rt_mutex_lock:EXIT
> B    5397732302828    rt_mutex_lock:ENTER
> V    5397718529990    serial_transact:ENTER
> V    5397718501300    serial_transact:EXIT
> V    5397701107940    serial_transact:ENTER
> V    5397682575612    rt_mutex_unlock:ENTER
> V    5397664304073    rt_mutex_lock:EXIT
> V    5397664238700    rt_mutex_lock:ENTER
> V    5397618710764    rt_mutex_unlock:ENTER
> V    5397600363677    rt_mutex_lock:EXIT
> V    5397600295612    rt_mutex_lock:ENTER
> 
> As i mentioned early task B was executed during serial operation in task
> V, and may be it could cause switching status of task V from 3146112
> (0x00300180) to 3146624 (0x00300380) - rised bit 0x00000200 (XNRELAX
> 0x00000200 Relaxed shadow thread (blocking bit) )
> 
> I am not specialist in Xenomai architecture, but it's not looks like
> stack corruption in my program.
> 
> I rather going to rewrite some code part to use rtserX instead of
> /dev/ttyXX

Given that you hold a lock across the serial transaction, switching to a
deterministic driver is certainly wiser. Still, understanding your
original problem would be good too so that we get aware of any potential
new bug in Xenomai and are able to fix it. So please try the SVN version
with your current code as well.

Jan


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

  reply	other threads:[~2007-02-10 10:34 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-09 19:35 [Xenomai-help] Strange deadlock Maksym Veremeyenko
2007-02-09 20:54 ` Philippe Gerum
2007-02-09 21:39   ` Maksym Veremeyenko
2007-02-09 21:14 ` Dmitry Adamushko
2007-02-09 22:10   ` Maksym Veremeyenko
2007-02-09 23:53     ` Dmitry Adamushko
2007-02-10  4:07 ` Maksym Veremeyenko
2007-02-10 10:34   ` Jan Kiszka [this message]
2007-02-11 18:28     ` Maksym Veremeyenko
2007-02-11 19:05       ` Philippe Gerum

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=45CD9FD1.9040509@domain.hid \
    --to=jan.kiszka@domain.hid \
    --cc=Xenomai-help@domain.hid \
    --cc=verem@domain.hid \
    /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.