From: Jan Kiszka <jan.kiszka@domain.hid>
To: Roderik_Wildenburg@domain.hid
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-help] memset of heap crashes Xenomai-Task
Date: Mon, 10 Jul 2006 19:26:18 +0200 [thread overview]
Message-ID: <44B28DBA.6070606@domain.hid> (raw)
In-Reply-To: <5D63919D95F87E4D9D34FF7748CE2C2A3F91A5@domain.hid>
[-- Attachment #1: Type: text/plain, Size: 1634 bytes --]
Roderik_Wildenburg@domain.hid wrote:
> Xenomai Version : 2.2-rc2
> Skin : native
> Kernel : 2.4.25
> Arch.: PPC
>
> I try to allocate as much memory as possible with the functions :
> rt_heap_create and
> rt_heap_alloc.
> (see also "Xenomai heap services" in this mailing list; see source
> attached)
>
> When I try to use the allocated memory with memset, the Xenomai-task
> crashes with a "Segmentation fault".
>
> Is memset allowed to be used with Xenomai heaps ?
> If so, could somebody try to reproduce this (preferable with a PPC), to
> see whether it is a common problem or just one of my configuration .
> I have the feeling it is timing dependend, as it does not crash every
> time. So try to start it several times, please.
>
Nice test case with a tendency to jump out of every half-opened window
around. :)
First of all, I'm not sure if that 8K of stack is enough on PPC with
2.4, on x86 over 2.6 it isn't. The native skin picks PTHREAD_STACK_MIN*4
for you by default. Is this too much? Unless dealing with dozens of
*simple* threads, reducing this makes no sense to me.
Then there was this bug:
@@ -168,13 +169,13 @@
void root_thread_exit(void)
{
int i;
- RT_HEAP_INFO *hpinfo;
+ RT_HEAP_INFO hpinfo;
printf("UDP->root_thread_exit\n");
for(i=0;i<MAXHEAPBLOCKS;i++)
{
- if( !rt_heap_inquire(&bigheap[i],hpinfo) )
+ if( !rt_heap_inquire(&bigheap[i],&hpinfo) )
rt_heap_delete(&bigheap[i]);
}
Now I get some other strange effects (e.g. kernel oopses after OOM
oopses) that need a closer look under qemu later.
Jan
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 250 bytes --]
prev parent reply other threads:[~2006-07-10 17:26 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-07-10 14:45 [Xenomai-help] memset of heap crashes Xenomai-Task Roderik_Wildenburg
2006-07-10 15:24 ` Gilles Chanteperdrix
2006-07-10 17:40 ` Jan Kiszka
2006-07-10 17:49 ` Gilles Chanteperdrix
2006-07-10 17:26 ` Jan Kiszka [this message]
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=44B28DBA.6070606@domain.hid \
--to=jan.kiszka@domain.hid \
--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.