From: Philippe Gerum <rpm@xenomai.org>
To: Roderik.Wildenburg@domain.hid
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-help] rt_queue_write strange behaviour ++
Date: Fri, 30 Nov 2007 11:55:20 +0100 [thread overview]
Message-ID: <474FEC18.7040304@domain.hid> (raw)
In-Reply-To: <5D63919D95F87E4D9D34FF7748CE2C2AE3C69D@ARVMAIL1.mra.roland-man.biz>
[-- Attachment #1: Type: text/plain, Size: 748 bytes --]
Roderik.Wildenburg@domain.hid wrote:
> Sorry, but in my last mail (see below) I had forgotten to tell you my
> Xenomai-Version and architecture.
> I still use Xenomai 2.3.2 on PPC.
>
> In the meantime I had a deeper look into the Xenomai source code
> and I would say, the case we observed (msg->refcount == 0 ; see below)
> isn´t possible with rt_queue_write, as this function implicitly allocate
> its messagebuffer and rt_queue_alloc initilaizes refcount to 1.
> Immediatelly after this rt_queue_send is called, where the
> plausibility test if( msg->refcount == 0) is done and fails.
> So, I can´t see a gap where refcount falls back to 0.
Does the attached patch trigger any message when your app fails?
--
Philippe.
[-- Attachment #2: heap-check-block-trace.patch --]
[-- Type: text/x-patch, Size: 849 bytes --]
Index: ksrc/nucleus/heap.c
===================================================================
--- ksrc/nucleus/heap.c (revision 3224)
+++ ksrc/nucleus/heap.c (working copy)
@@ -911,8 +911,10 @@
break;
}
- if (!holder)
+ if (!holder) {
+ printk(KERN_DEBUG "XNHEAP: no extent found: block=%p\n", block);
goto bad_block;
+ }
/* Compute the heading page number in the page map. */
pagenum = ((caddr_t) block - extent->membase) >> heap->pageshift;
@@ -922,9 +924,11 @@
ptype = extent->pagemap[pagenum].type;
if (ptype == XNHEAP_PFREE || /* Unallocated page? */
- ptype == XNHEAP_PCONT) /* Not a range heading page? */
+ ptype == XNHEAP_PCONT) { /* Not a range heading page? */
+ printk(KERN_DEBUG "XNHEAP: bad page type: 0x%x\n", ptype);
bad_block:
err = -EINVAL;
+ }
xnlock_put_irqrestore(&heap->lock, s);
next prev parent reply other threads:[~2007-11-30 10:55 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-30 10:42 [Xenomai-help] rt_queue_write strange behaviour ++ Roderik.Wildenburg
2007-11-30 10:55 ` Philippe Gerum [this message]
2007-11-30 12:22 ` Roderik.Wildenburg
2007-12-03 13:31 ` Roderik.Wildenburg
2007-12-03 15:16 ` [Xenomai-help] rt_queue_write strange behaviour ++ testcase !! Roderik.Wildenburg
2007-12-03 16:50 ` Philippe Gerum
2007-12-04 12:05 ` Roderik.Wildenburg
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=474FEC18.7040304@domain.hid \
--to=rpm@xenomai.org \
--cc=Roderik.Wildenburg@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.