From: Jan Kiszka <jan.kiszka@domain.hid>
To: Thomas Wiedemann <Thomas.Wiedemann@domain.hid>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-core] [BUG?] registry usage + module removal causes kernel oops (xenomai native)
Date: Thu, 11 Jan 2007 19:05:43 +0100 [thread overview]
Message-ID: <45A67C77.3070006@domain.hid> (raw)
In-Reply-To: <OF4D873F49.344BC96D-ONC1257260.005DC836-C1257260.00617F2A@retarus.de>
[-- Attachment #1: Type: text/plain, Size: 1793 bytes --]
Thomas Wiedemann wrote:
> Hi again,
>
> I observed another wrong(?) behaviour of xenomai, caused by a wrong
> behaviour in our code :) The resources (tested with mutexes) are not
> deleted after the process which created them exits without cleaning up
> (for example, it crashes).
>
> For anonymous objects, i don't see a reason why this would be a
> defined behaviour, since there is no way to reuse those objects.
> Therefore, I consider this to be a bug, as it will finally eat up all
> memory.
> Or are there any technical reasons for this?
-ENOTIMPLEMENTEDYET
We have this desired auto-cleanup for the POSIX skin already, but we are
lacking it for the others. The native objects should be straightforward,
stalled RTDM handles still require a bit thoughts (and the solution of
another issue). Time will come.
For now we here help ourselves by keeping track of those resources in
userspace at framework level and release them - when required - inside a
SEGFAULT signal handler. Of course, covers not all faults.
>
> Another bug appeared for objects registered at the registry. When
> using xeno-native and xeno-rtdm, the order of removal seems to be
> important. I appended a small code sample to register a mutex at
> the registry. After the program exits, the modules can not be unloaded
> in the order
> 1) xeno-native
> 2) xeno-rtdm,
> but the other way around works fine. Instead, rmmod ends up with a
> segmentation fault, dmesg output appended.
>
> I tested this on xenomai 2.3.0/linux 2.6.19 and 2.2.5-svn/linux2.6.17.14.
>
Looks like it's related to the left-over mutex in the registry. Probably
the other order just papers the issue. $Someone should give your code a
try, maybe I can check later with a debugger.
Jan
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 250 bytes --]
next prev parent reply other threads:[~2007-01-11 18:05 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-11 17:44 [Xenomai-core] [BUG?] registry usage + module removal causes kernel oops (xenomai native) Thomas Wiedemann
2007-01-11 18:05 ` Jan Kiszka [this message]
2007-01-11 23:34 ` Jan Kiszka
2007-01-12 9:11 ` 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=45A67C77.3070006@domain.hid \
--to=jan.kiszka@domain.hid \
--cc=Thomas.Wiedemann@domain.hid \
--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.